/* ===========================
   Kegstory Global CSS v6 — Synced with Landing/Auth Theme
   =========================== */

/* ----- VARIABLES ----- */
:root {
    --core-bg: #030305;
    --core-surface: rgba(10, 10, 15, 0.6);
    --core-elevated: rgba(18, 18, 25, 0.65);

    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-line: rgba(255, 255, 255, 0.1);

    --text-pure: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --text-ghost: rgba(255, 255, 255, 0.3);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --smooth: cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Theme defaults (overridden per-role) */
    --theme-hex: #3498db;
    --theme-grad: linear-gradient(135deg, #2193b0, #6dd5ed);
    --theme-rgb: 52, 152, 219;
}

/* ----- RESET ----- */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    background: var(--core-bg);
    color: var(--text-pure);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ----- SCROLLBARS ----- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.25); }

/* ----- ANIMATION LIBRARY ----- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.6s var(--smooth) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ----- GLASS PANEL (Shared) ----- */
.glass-panel {
    background: var(--core-surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* ----- MODULE PLACEHOLDER (Portal/Defter empty states) ----- */
.module-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,0.015);
    border: 1px dashed var(--glass-line);
    margin: 20px 0;
}

.placeholder-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    filter: drop-shadow(0 10px 15px rgba(var(--theme-rgb), 0.3));
    animation: float 5s ease-in-out infinite;
}

.placeholder-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-pure);
}

.placeholder-text {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 500px;
}

.placeholder-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.placeholder-features span {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.3s;
}

.placeholder-features span:hover {
    background: rgba(var(--theme-rgb), 0.15);
    color: var(--text-pure);
    transform: translateY(-2px);
}

/* ----- WIKI GRID ----- */
.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.wiki-card {
    background: var(--core-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s var(--smooth);
}

.wiki-card:hover {
    background: rgba(var(--theme-rgb), 0.05);
    border-color: rgba(var(--theme-rgb), 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.wiki-card-icon {
    width: 60px; height: 60px;
    margin-bottom: 8px;
    transition: transform 0.4s var(--smooth);
}
.wiki-card:hover .wiki-card-icon { transform: scale(1.1) rotate(5deg); }
.wiki-card-icon img { width: 100%; height: 100%; object-fit: contain; }

.wiki-card h4 { font-size: 1.25rem; font-weight: 700; color: var(--text-pure); }
.wiki-card p   { font-size: 0.95rem; color: var(--text-dim); line-height: 1.5; }

/* ----- WIKI PAGE ----- */
.back-btn {
    display: inline-flex;
    align-items: center; gap: 8px;
    color: var(--text-dim); font-weight: 600; font-size: 1rem;
    padding: 8px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    margin-bottom: 24px;
    transition: all 0.3s;
}
.back-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-pure); }

.wiki-page-wrapper {
    background: var(--core-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.wiki-page-header {
    margin-bottom: 32px;
    border-bottom: 1px solid var(--glass-line);
    padding-bottom: 24px;
}
.wiki-page-header h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }

.wiki-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(var(--theme-rgb), 0.15);
    color: var(--theme-hex);
    font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    border-radius: 20px;
}

.wiki-page-body { font-size: 1.1rem; color: var(--text-dim); line-height: 1.8; }

/* ----- GLOBAL PROFILE CARD ----- */
.global-profile {
    display: flex; flex-direction: column; align-items: center;
    background: var(--core-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px; text-align: center;
}

.global-profile-avatar {
    width: 100px; height: 100px;
    border-radius: 30px;
    background: var(--theme-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 800; color: white;
    box-shadow: 0 10px 20px rgba(var(--theme-rgb), 0.3);
    margin-bottom: 20px;
    transition: transform 0.4s var(--spring);
}
.global-profile:hover .global-profile-avatar { transform: translateY(-8px) scale(1.05); }

.global-profile-name  { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.global-profile-email { font-size: 1rem; color: var(--text-dim); margin-bottom: 16px; }

.global-profile-role {
    padding: 8px 24px;
    background: rgba(var(--theme-rgb), 0.15);
    border: 1px solid rgba(var(--theme-rgb), 0.3);
    color: var(--theme-hex);
    font-size: 0.9rem; font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 24px;
}

.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 12px 24px;
    font-size: 0.95rem; font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}
.btn-danger:hover {
    background: #e74c3c; color: white;
    box-shadow: 0 8px 15px rgba(231, 76, 60, 0.3);
}

/* ----- RESPONSIVE (GLOBAL) ----- */
@media (max-width: 768px) {
    :root {
        --radius-lg: 16px;
        --radius-xl: 20px;
    }
    .module-placeholder { padding: 40px 20px; }
    .placeholder-title  { font-size: 1.6rem; }
    .wiki-page-wrapper  { padding: 24px; }
    .wiki-page-header h1 { font-size: 2rem; }
    .global-profile     { padding: 32px 20px; }
}