/* =============================================================
   Knightoria V2 — Component-specific styles
   Hero, analyze flow, board, classifications, etc.
   ============================================================= */


/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-h));
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 3rem;
    padding: 4rem 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
    overflow: hidden;
}
@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; min-height: auto; gap: 3rem; padding: 3rem 1.5rem; }
}
.hero__particles {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.hero__particle {
    position: absolute;
    font-size: 1.8rem;
    color: var(--gold);
    opacity: 0.06;
    animation: float 20s ease-in-out infinite;
}
.hero__particle:nth-child(1) { top: 8%;   right: 8%;  animation-delay: 0s; }
.hero__particle:nth-child(2) { top: 22%;  left: 12%;  animation-delay: -4s; opacity: 0.05; }
.hero__particle:nth-child(3) { bottom: 18%; right: 22%; animation-delay: -8s; }
.hero__particle:nth-child(4) { top: 60%;  left: 40%;  animation-delay: -12s; opacity: 0.04; }
.hero__particle:nth-child(5) { bottom: 30%; right: 6%; animation-delay: -16s; opacity: 0.05; }
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-30px) rotate(8deg); }
}

.hero__content {
    position: relative;
    z-index: 2;
    animation: slideUp 0.8s var(--t) both;
}
.hero__title {
    margin: 1.25rem 0 1.5rem;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.05;
}
.hero__title-line { display: block; }
.hero__title-accent {
    background: linear-gradient(120deg, var(--gold-bright), var(--gold), var(--crimson-bright));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__lead {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
}
.hero__lead strong { color: var(--text); }
.hero__cta {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.hero__trust {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.hero__trust-item { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.hero__trust-icon {
    width: 22px; height: 22px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 900;
}

/* Hero visual: 3D chessboard */
.hero__visual {
    position: relative;
    z-index: 1;
    perspective: 1400px;
    animation: fadeIn 1s 0.3s both;
}
.hero__board {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    aspect-ratio: 1;
    transform: rotateX(22deg) rotateZ(-4deg);
    transform-style: preserve-3d;
    box-shadow:
        0 50px 100px rgba(0,0,0,0.6),
        var(--shadow-gold);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--gold);
}
.hero__rank { display: grid; grid-template-columns: repeat(8, 1fr); }
.hero__sq {
    aspect-ratio: 1;
    position: relative;
}
.hero__sq--light { background: #ead6b6; }
.hero__sq--dark  { background: #8b4a3a; }
.hero__board-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle, var(--gold-glow), transparent 70%);
    z-index: -1;
    filter: blur(40px);
    animation: glow 4s ease-in-out infinite;
}

/* ===== Section heading ===== */
.section-head {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 720px;
    margin-inline: auto;
}
.section-head__title {
    margin: 0.85rem 0 0.75rem;
}
.section-head__sub {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.7;
}

/* ===== Feature cards (homepage) ===== */
.feature {
    padding: 1.75rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--t);
}
.feature:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow), var(--shadow-gold);
}
.feature__icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--gold-soft), transparent);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 1rem;
}
.feature__title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}
.feature__desc {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ===== Step (how-it-works) ===== */
.step {
    display: flex; gap: 1rem;
    padding: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.step__num {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--crimson), #962039);
    color: #fff;
    border-radius: 50%;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    box-shadow: var(--shadow-sm), var(--shadow-crimson);
}
.step__body strong { display: block; margin-bottom: 0.25rem; color: var(--text); }
.step__body span { color: var(--text-soft); font-size: 0.9rem; line-height: 1.7; }


/* ===== Auth pages ===== */
.auth-page {
    min-height: calc(100vh - var(--header-h));
    display: grid;
    place-items: center;
    padding: 3rem 1.5rem;
}
.auth-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 880px) {
    .auth-shell { grid-template-columns: minmax(0, 460px) minmax(0, 440px); }
}
.auth-card {
    padding: 2.5rem 2rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 400px 200px at 30% 0%, var(--gold-soft), transparent 60%);
    pointer-events: none;
}
.auth-card > * { position: relative; }
.auth-card__head { text-align: center; margin-bottom: 2rem; }
.auth-card__title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.auth-card__sub { color: var(--text-soft); font-size: 0.95rem; }
.auth-card__foot {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.92rem;
    color: var(--text-soft);
}
.auth-card__foot a { color: var(--gold); font-weight: 700; }
.auth-card__foot a:hover { text-decoration: underline; }
.auth-card__legal {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}
.auth-card__legal a { color: var(--text-soft); text-decoration: underline; }

.auth-side {
    padding: 2.5rem 2rem;
    background: linear-gradient(160deg, var(--surface-2), rgba(200,40,75,0.08));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.auth-side::after {
    content: "";
    position: absolute; bottom: -4rem; left: -4rem;
    width: 240px; height: 240px;
    background: radial-gradient(circle, var(--crimson-glow), transparent 65%);
    filter: blur(20px);
}
.auth-side__crown {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1.25rem;
    line-height: 1;
    filter: drop-shadow(0 0 14px var(--gold-glow));
}
.auth-side__title { font-size: 1.45rem; margin-bottom: 1rem; }
.auth-side__lead { color: var(--text-soft); font-size: 0.95rem; line-height: 1.75; margin-bottom: 1.5rem; }
.auth-side__list { display: flex; flex-direction: column; gap: 0.75rem; position: relative; }
.auth-side__list li {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 0.9rem;
}
.auth-side__list li span:first-child { font-size: 1.1rem; }


/* ===== Dashboard ===== */
.dash-greet {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1.25rem;
    margin-bottom: 2rem;
}
.dash-greet__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.dash-greet__sub { color: var(--text-soft); margin-top: 0.25rem; }
.dash-greet__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.dash-tile {
    display: flex; flex-direction: column;
    padding: 1.5rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--t);
    position: relative;
    overflow: hidden;
}
.dash-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.dash-tile--cta {
    background: linear-gradient(160deg, rgba(200,40,75,0.18), var(--surface-2));
    border-color: rgba(237,64,103,0.32);
    box-shadow: var(--shadow), var(--shadow-crimson);
}
.dash-tile__head {
    display: flex; align-items: center; gap: 0.6rem;
    margin-bottom: 0.85rem;
}
.dash-tile__icon {
    font-size: 1.5rem;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold);
    border-radius: 8px;
}
.dash-tile__title {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}
.dash-tile__heading { font-size: 1.15rem; margin-bottom: 0.5rem; line-height: 1.3; }
.dash-tile__desc { color: var(--text-soft); font-size: 0.92rem; line-height: 1.6; flex: 1; margin-bottom: 1.25rem; }


/* ===== ANALYZE PAGE ===== */
.analyze-hero {
    padding: 2rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.analyze-hero__inner {
    display: flex; align-items: center; gap: 1.25rem;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.analyze-hero__icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--gold-soft), transparent);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    color: var(--gold);
    flex-shrink: 0;
}
.analyze-hero__text { flex: 1; }
.analyze-hero__crumb {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.analyze-hero__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0.2rem 0 0.4rem; }
.analyze-hero__sub { color: var(--text-soft); font-size: 0.95rem; }

.analyze-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1080px) { .analyze-grid { grid-template-columns: 1.7fr 1fr; } }

/* Tabs for analyze methods */
.tabs {
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.tab {
    flex: 1;
    min-width: 120px;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--t);
    cursor: pointer;
    white-space: nowrap;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab.is-active {
    background: linear-gradient(135deg, var(--gold), #b58731);
    color: var(--bg);
    box-shadow: var(--shadow-sm);
}
.tab__icon { font-size: 1.05rem; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn 0.4s both; }

.tab-panel__head { margin-bottom: 1.5rem; }
.tab-panel__title { font-size: 1.2rem; margin-bottom: 0.4rem; }
.tab-panel__desc { color: var(--text-soft); font-size: 0.92rem; line-height: 1.7; }

/* Games picker */
.games-picker {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.games-picker__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.games-picker__title { font-size: 1.05rem; margin: 0; }
.games-list {
    display: flex; flex-direction: column;
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
    padding-inline-end: 0.25rem;
}
.game-item {
    display: block;
    width: 100%;
    text-align: start;
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--t);
    cursor: pointer;
}
.game-item:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    transform: translateX(-2px);
}
.game-item__players {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.game-item__player { display: inline-flex; align-items: center; gap: 0.35rem; }
.game-item__player em {
    font-style: normal;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
}
.game-item__vs {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.game-item__meta {
    display: flex; align-items: center; gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.game-item__result {
    padding: 0.2rem 0.55rem;
    background: var(--surface-2);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
}
.game-item__result--white { color: var(--text); }
.game-item__result--black { color: var(--text); }
.game-item__result--draw  { color: var(--text-muted); }

/* Sidebar */
.analyze-side { display: flex; flex-direction: column; gap: 1.25rem; }
.side-card {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.side-card__head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.side-card__icon { font-size: 1.2rem; color: var(--gold); }
.side-card__title { font-size: 1.05rem; margin: 0; }
.side-list { display: flex; flex-direction: column; gap: 0.6rem; }
.side-list li {
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
    padding-inline-start: 1rem;
    position: relative;
}
.side-list li::before {
    content: "♞";
    position: absolute;
    inset-inline-start: 0;
    color: var(--gold);
    opacity: 0.7;
}
.side-list--steps {
    counter-reset: step;
    gap: 1rem;
}
.side-list--steps li {
    counter-increment: step;
    padding-inline-start: 2.25rem;
    min-height: 28px;
}
.side-list--steps li::before {
    content: counter(step);
    width: 24px; height: 24px;
    display: grid; place-items: center;
    background: var(--gold);
    color: var(--bg);
    border-radius: 50%;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 0.78rem;
    top: 0;
}
.side-list--steps li strong { display: block; color: var(--text); }

/* Recent games on sidebar */
.recent-game {
    display: block;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: var(--t);
}
.recent-game:hover { border-color: var(--border-strong); background: var(--surface-2); }
.recent-game__players {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
    display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
}
.recent-game__meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    display: flex; gap: 0.5rem;
    flex-wrap: wrap;
}


/* ===== Loading overlay ===== */
.overlay {
    position: fixed; inset: 0;
    background: rgba(6,5,10,0.85);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: grid; place-items: center;
    padding: 2rem;
    animation: fadeIn 0.3s both;
}
.overlay__card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.overlay__title { margin: 1.25rem 0 0.5rem; }
.overlay__desc { color: var(--text-soft); font-size: 0.92rem; }
.overlay__actions {
    display: flex; gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}


/* ===== Empty state ===== */
.empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-soft);
}
.empty__icon { font-size: 3rem; opacity: 0.7; margin-bottom: 1rem; color: var(--gold); }
.empty__title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.empty__desc { color: var(--text-muted); margin-bottom: 1.5rem; }


/* ===== Error pages ===== */
.error-page {
    min-height: calc(100vh - var(--header-h));
    display: grid; place-items: center;
    padding: 3rem 1.5rem;
}
.error-page__inner {
    max-width: 580px;
    width: 100%;
    text-align: center;
}
.error-page__visual {
    position: relative;
    margin-bottom: 1.75rem;
    line-height: 1;
}
.error-page__piece {
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--gold);
    opacity: 0.4;
    filter: drop-shadow(0 0 30px var(--gold-glow));
}
.error-page__code {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-family: 'Cinzel', serif;
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 900;
    background: linear-gradient(180deg, var(--text), var(--crimson-bright));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.error-page__title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.85rem; }
.error-page__desc {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.error-page__actions {
    display: flex; gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.error-page__quick {
    color: var(--text-muted);
    font-size: 0.88rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}
.error-page__quick a { color: var(--gold); font-weight: 700; }


/* ===== Legal pages ===== */
.legal-hero {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 2.5rem;
    padding: 2rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.legal-hero__title { margin: 1rem 0 0.85rem; }
.legal-hero__lead {
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 580px;
    margin: 0 auto;
}
.legal-hero__updated {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.legal-doc {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 2.25rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.legal-doc section {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border);
}
.legal-doc section:last-of-type { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.legal-doc h2 {
    font-size: 1.15rem;
    margin-bottom: 0.85rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.legal-doc h2::before {
    content: "";
    flex: 0 0 auto;
    width: 4px; height: 22px;
    background: linear-gradient(180deg, var(--gold), var(--crimson));
    border-radius: 2px;
}
.legal-doc p, .legal-doc li {
    color: var(--text-soft);
    line-height: 1.85;
    font-size: 0.95rem;
}
.legal-doc strong { color: var(--text); }
.legal-doc a { color: var(--gold); font-weight: 700; }
.legal-doc a:hover { text-decoration: underline; }
.legal-list { padding: 0; margin-top: 0.75rem; }
.legal-list li {
    padding: 0.4rem 0 0.4rem 1.25rem;
    position: relative;
}
.legal-list li::before {
    content: "•";
    position: absolute;
    inset-inline-start: 0;
    color: var(--gold);
    font-size: 1.2rem;
    line-height: 1;
}
.legal-cta {
    display: flex; gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Contact grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    max-width: 980px;
    margin: 0 auto;
}
.contact-card {
    display: flex; flex-direction: column;
    padding: 1.5rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--t);
}
.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}
.contact-card__icon {
    font-size: 2.4rem;
    margin-bottom: 0.85rem;
    color: var(--gold);
}
.contact-card__title { font-size: 1.05rem; margin-bottom: 0.4rem; }
.contact-card__sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; flex: 1; }
.contact-card__value {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Cinzel', monospace;
    font-weight: 700;
    color: var(--gold);
    font-size: 0.9rem;
}


/* ===== Profile ===== */
.profile-header {
    position: relative;
    padding: 2rem;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}
.profile-header::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 600px 200px at 80% 0%, var(--gold-soft), transparent 65%);
    pointer-events: none;
}
.profile-header__content {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}
.profile-avatar {
    position: relative;
    width: 88px; height: 88px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--crimson), #962039);
    color: #fff;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow), var(--shadow-gold);
}
.profile-avatar__letter {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}
.profile-avatar__crown {
    position: absolute; top: -10px; right: -8px;
    font-size: 1.6rem;
    color: var(--gold);
    filter: drop-shadow(0 0 8px var(--gold-glow));
}
.profile-header__name { margin: 0 0 0.2rem; font-size: clamp(1.4rem, 3vw, 1.85rem); }
.profile-header__email {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
    word-break: break-all;
}
.profile-header__chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 720px) {
    .profile-header__content { grid-template-columns: auto 1fr; }
    .profile-header__actions { grid-column: 1 / -1; justify-self: center; margin-top: 1rem; }
}


/* ===== Games list page ===== */
.games-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.games-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: var(--t);
}
.games-row:last-child { border-bottom: none; }
.games-row:hover { background: var(--surface-2); }
.games-row__title { font-weight: 700; }
.games-row__meta { color: var(--text-muted); font-size: 0.88rem; }
@media (max-width: 700px) {
    .games-row { grid-template-columns: 1fr auto; gap: 0.5rem; }
    .games-row__source { display: none; }
}


/* ===== Mobile menu open lock ===== */
body.menu-open { overflow: hidden; }


/* ===== Tooltips ===== */
[data-tip] { position: relative; }
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%; transform: translateX(-50%);
    padding: 0.4rem 0.7rem;
    background: var(--surface-3);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity var(--t);
    z-index: 10;
}
[data-tip]:hover::after { opacity: 1; }
