:root {
    --color-bg: #F2F4F5;
    --color-bg2: #FFFFFF;
    --color-surface: #FFFFFF;
    --color-border: #E3E5E8;
    --color-neon-cyan: #14B8A6;
    --color-neon-magenta: #F97316;
    --color-neon-green: #22C55E;
    --color-neon-yellow: #FACC15;
    --color-blue: #335FFF;
    --color-purple: #8B5CF6;
    --color-text: #393B3D;
    --color-text-muted: #60646C;
    --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, monospace;
    --radius: 8px;
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, .08);
    --shadow-card: 0 2px 10px rgba(15, 23, 42, .06);
    --shadow-neon-cyan: 0 10px 24px rgba(20, 184, 166, .22);
    --shadow-neon-magenta: 0 10px 24px rgba(249, 115, 22, .22);
    --shadow-neon-green: 0 10px 24px rgba(34, 197, 94, .22);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    min-height: 100vh;
}
body.light-mode {
    --color-bg: #F6F7FB;
    --color-bg2: #FFFFFF;
    --color-surface: #FFFFFF;
    --color-border: #CCD2E2;
    --color-text: #141426;
    --color-text-muted: #4E5570;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
main { min-height: 70vh; }
.container { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.public-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px clamp(16px, 4vw, 40px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(14px);
}
.brand, .sidebar-logo {
    font-family: var(--font-body);
    color: #111827;
    text-decoration: none;
    text-shadow: none;
    font-size: 1.05rem;
    font-weight: 900;
}
.public-nav nav { display: flex; align-items: center; gap: 18px; font-weight: 700; }
.public-nav nav a { color: var(--color-text-muted); text-decoration: none; }
.public-nav nav a:hover { color: var(--color-blue); }
.nav-auth-button,
.footer-auth-button {
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    font-weight: 800;
}
.nav-auth-button:hover,
.footer-auth-button:hover {
    color: var(--color-blue);
}
button, input, select, textarea { font: inherit; }
.hero {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: grid;
    place-items: center;
    padding: 42px 0 34px;
    background:
        radial-gradient(circle at 18% 18%, rgba(51,95,255,.12), transparent 30%),
        radial-gradient(circle at 80% 22%, rgba(249,115,22,.14), transparent 28%),
        linear-gradient(180deg, #FFFFFF, #F2F4F5);
}
.hero-inner { position: relative; z-index: 2; text-align: left; max-width: 1280px; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--color-text-muted);
    font-weight: 800;
}
.hero h1 { font-family: var(--font-body); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; margin: 0 0 10px; color: var(--color-text); letter-spacing: 0; font-weight: 900; }
.hero p { color: var(--color-text-muted); font-size: clamp(1rem, 1.5vw, 1.15rem); margin: 0 0 18px; font-weight: 600; max-width: 680px; }
.hero-counters { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 28px 0; color: var(--color-text); font-family: var(--font-body); }
.discover-hero .hero-counters { justify-content: flex-start; margin: 18px 0 0; }
.hero-counters span {
    background: rgba(255,255,255,.86);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 10px 14px;
    box-shadow: none;
    font-weight: 800;
}
.btn-neon, .btn-small, .btn-card-play {
    border: 0;
    background: var(--color-blue);
    color: white;
    text-decoration: none;
    text-transform: none;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    cursor: pointer;
    font-weight: 800;
    border-radius: 8px;
    box-shadow: none;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-neon { font-family: var(--font-body); font-size: 1rem; }
.btn-neon:hover, .btn-small:hover, .btn-card-play:hover { transform: translateY(-1px); background: #244BE0; color: white; box-shadow: none; }
.btn-neon-magenta { background: var(--color-neon-magenta); color: white; }
.btn-neon-magenta:hover { background: #EA580C; color: white; box-shadow: var(--shadow-neon-magenta); }
.btn-small { padding: 7px 12px; min-height: 34px; font-size: .95rem; }
.discover-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
}
.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px 180px auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0 16px;
}
.input, input, select, textarea {
    width: 100%;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
textarea { min-height: 130px; resize: vertical; }
.category-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.category-badge, .state-badge, .featured-badge, .achievement {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: #FFFFFF;
    color: var(--color-text);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-size: .85rem;
    font-weight: 700;
}
.featured-badge { --badge-color: var(--color-neon-yellow); }
.section-title { font-family: var(--font-body); color: var(--color-text); font-size: 1.5rem; margin: 0; font-weight: 900; }
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 28px 16px;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-bg2);
}
.site-footer nav { display: flex; justify-content: center; gap: 18px; }
.site-footer button {
    font: inherit;
}
.flash {
    position: fixed;
    right: 16px;
    top: 76px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 6px solid var(--color-neon-cyan);
    padding: 12px 16px;
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius);
    transition: opacity .22s ease, transform .22s ease;
}
.flash-error { border-left-color: var(--color-neon-magenta); box-shadow: var(--shadow-soft); }
.flash.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}
.flash button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: #F3F4F6;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}
.flash button:hover {
    background: #E5E7EB;
    color: var(--color-text);
}
.empty-state { border: 1px dashed var(--color-border); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--color-text-muted); background: #FFFFFF; }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: none; }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
th { color: var(--color-blue); font-weight: 800; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form,
.icon-actions {
    display: inline-flex;
    gap: 6px;
    margin: 0;
}
.icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    box-shadow: none;
}
.icon-btn:hover {
    background: #EEF2FF;
    border-color: #B9C5FF;
}
.icon-success:hover {
    background: #ECFDF3;
    border-color: #86EFAC;
}
.icon-danger:hover {
    background: #FEF2F2;
    border-color: #FCA5A5;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.choice-field {
    border: 0;
    padding: 0;
    margin: 0;
}
.choice-field legend {
    color: var(--color-text-muted);
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.choice-card, .avatar-option {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 58px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255,255,255,.03);
    color: var(--color-text-muted);
    cursor: pointer;
    font-weight: 700;
}
.choice-card input, .avatar-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.choice-card:has(input:checked), .avatar-option:has(input:checked) {
    border-color: var(--color-neon-green);
    color: var(--color-text);
    background: rgba(57,255,20,.12);
    box-shadow: var(--shadow-neon-green);
}
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: 10px;
}
.avatar-option {
    min-height: 74px;
    font-size: 2rem;
    border-radius: 8px;
}
.avatar-upload-field {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--color-text-muted);
    font-weight: 800;
}
.avatar-upload-field input {
    padding: 10px;
}
.table-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    overflow: hidden;
    vertical-align: middle;
}
.table-avatar img,
.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.panel, .stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-card);
}
.auth-page {
    padding: 42px 0 70px;
    max-width: 860px;
}
.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 18px;
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
    padding: 4px;
    background: #EEF0F3;
    border-radius: 10px;
}
.auth-tab {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    font-weight: 800;
    padding: 11px 14px;
}
.auth-tab.active {
    background: #FFFFFF;
    color: var(--color-text);
    box-shadow: 0 1px 6px rgba(15, 23, 42, .08);
}
.auth-panel { display: none; }
.auth-panel.active { display: grid; gap: 14px; }
.auth-entry-card {
    display: grid;
    gap: 14px;
}
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(17, 24, 39, .56);
    backdrop-filter: blur(10px);
}
.auth-modal-overlay.is-open {
    display: flex;
}
body.modal-open {
    overflow: hidden;
}
.auth-modal {
    position: relative;
    width: min(460px, 100%);
    max-height: min(88vh, 760px);
    overflow: auto;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    padding: 22px;
}
.auth-modal-wide {
    width: min(880px, 100%);
}
.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}
.auth-modal-close:hover {
    background: #F3F4F6;
}
.auth-modal-form {
    display: grid;
    gap: 14px;
}
.auth-modal-form h2 {
    margin: 0;
    padding-right: 42px;
    color: var(--color-text);
    font-size: 1.65rem;
    font-weight: 950;
}
.auth-inline-message {
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #F6F7FB;
    color: var(--color-text);
    font-weight: 800;
    line-height: 1.35;
}
.auth-inline-error {
    border-color: #FCA5A5;
    background: #FEF2F2;
    color: #991B1B;
}
.auth-inline-success {
    border-color: #86EFAC;
    background: #ECFDF3;
    color: #166534;
}
.auth-inline-info {
    border-color: #B9C5FF;
    background: #EEF2FF;
    color: #1D3B8B;
}
.auth-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-weight: 700;
}
.auth-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.auth-modal-actions .btn-small,
.auth-modal-actions .btn-neon {
    width: 100%;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card strong { display: block; font-family: var(--font-body); color: var(--color-blue); margin-top: 8px; font-size: 1.8rem; font-weight: 800; }
.muted { color: var(--color-text-muted); }
.game-detail-page {
    padding: 30px 0 54px;
    background:
        radial-gradient(circle at 12% 8%, rgba(51, 95, 255, .10), transparent 24%),
        radial-gradient(circle at 88% 10%, rgba(34, 197, 94, .10), transparent 25%),
        var(--color-bg);
}
.game-spotlight {
    display: grid;
    grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 44px);
    align-items: center;
    padding: clamp(12px, 2vw, 22px);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.88));
    border: 1px solid var(--color-border);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
}
.game-hero-cover {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #DDE1E6;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
}
.game-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.game-hero-cover:hover img {
    transform: scale(1.035);
}
.game-hero-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.24));
}
.hero-play-bubble {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: #22C55E;
    color: #FFFFFF;
    font-size: 2.15rem;
    box-shadow: 0 18px 42px rgba(34, 197, 94, .45);
}
.game-hero-info {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 16px;
}
.game-hero-info h1 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1;
    letter-spacing: 0;
    font-weight: 950;
}
.creator-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #FFFFFF;
}
.creator-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #EEF2FF;
    font-size: 1.45rem;
    overflow: hidden;
}
.creator-pill strong,
.creator-pill small {
    display: block;
}
.creator-pill strong {
    font-weight: 900;
}
.creator-pill small {
    color: var(--color-text-muted);
    font-weight: 700;
}
.game-description {
    max-width: 760px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    font-weight: 650;
}
.play-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 320px);
    min-height: 58px;
    padding: 14px 24px;
    border: 0;
    border-radius: 8px;
    background: #22C55E;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 950;
    box-shadow: 0 14px 32px rgba(34, 197, 94, .34);
}
.play-primary:hover {
    background: #16A34A;
    transform: translateY(-1px);
}
.detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 520px;
}
.detail-stats span {
    display: grid;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #FFFFFF;
}
.detail-stats strong {
    color: var(--color-text);
    font-size: 1.35rem;
    font-weight: 950;
}
.detail-stats small {
    color: var(--color-text-muted);
    font-weight: 800;
}
.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
    gap: 16px;
    margin-top: 18px;
}
.detail-panel {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: var(--shadow-card);
}
.detail-panel p {
    margin: 12px 0 0;
    color: var(--color-text-muted);
    line-height: 1.55;
    font-weight: 650;
}
.metadata-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.metadata-list span {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border-radius: 8px;
    background: #F6F7FB;
}
.metadata-list strong {
    color: var(--color-text-muted);
    font-size: .78rem;
    text-transform: uppercase;
    font-weight: 900;
}
.related-section {
    margin-top: 22px;
}
.awards-strip {
    padding: 8px 0 4px;
}
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin: 14px 0 10px;
}
.award-card {
    min-height: 142px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 16px;
    color: var(--color-text);
    text-decoration: none;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}
.award-card:hover {
    transform: translateY(-1px);
    border-color: #B9C5FF;
}
.award-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: #FFF7D6;
    border-radius: 8px;
}
.award-label {
    color: var(--color-text-muted);
    font-size: .86rem;
    font-weight: 800;
}
.award-card strong {
    font-size: 1.05rem;
}
.award-card small {
    color: var(--color-blue);
    font-weight: 800;
}
.evaluation-section {
    margin-top: 22px;
}
.evaluation-form {
    display: grid;
    gap: 16px;
}
.evaluation-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.evaluation-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    background: #F6F7FB;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-weight: 800;
}
.rating-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border: 0;
    padding: 0;
    margin: 0;
}
.rating-group legend {
    grid-column: 1 / -1;
    color: var(--color-text);
    font-weight: 900;
    margin-bottom: 2px;
}
.rating-option {
    position: relative;
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 112px;
    padding: 14px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
}
.rating-option.inline {
    min-height: 54px;
    align-content: center;
}
.rating-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.rating-option span {
    color: var(--color-text);
    font-weight: 900;
}
.rating-option small {
    color: var(--color-text-muted);
    line-height: 1.35;
    font-weight: 700;
}
.rating-option:has(input:checked) {
    border-color: var(--color-neon-green);
    background: #ECFDF3;
    box-shadow: var(--shadow-neon-green);
}
.rating-option:has(input:focus-visible) {
    outline: 3px solid rgba(51, 95, 255, .28);
    outline-offset: 2px;
}
.evaluation-form.is-saving {
    opacity: .72;
    pointer-events: none;
}
@keyframes blinkGlow { 0%,100% { box-shadow: var(--shadow-card); } 50% { box-shadow: var(--shadow-soft); } }
@media (max-width: 760px) {
    .public-nav { align-items: flex-start; gap: 16px; flex-direction: column; }
    .public-nav nav { flex-wrap: wrap; }
    .filters, .form-grid { grid-template-columns: 1fr; }
    .discover-heading { align-items: flex-start; flex-direction: column; }
    .choice-grid { grid-template-columns: 1fr; }
    .rating-group { grid-template-columns: 1fr; }
    .game-spotlight, .detail-content-grid { grid-template-columns: 1fr; }
    .detail-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-play-bubble { width: 66px; height: 66px; font-size: 1.75rem; }
    .play-primary { width: 100%; }
    .auth-choice, .auth-modal-actions { align-items: stretch; flex-direction: column; }
}
@media (max-width: 460px) {
    .detail-stats { grid-template-columns: 1fr; }
}

/* Home catalog */
.public-nav {
    background: rgba(11, 15, 28, .88);
    border-bottom: 1px solid rgba(255,255,255,.12);
    color: #FFFFFF;
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #FFFFFF;
    font-size: 1.35rem;
}
.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(36, 230, 255, .14);
    box-shadow: 0 0 18px rgba(36, 230, 255, .32);
    overflow: hidden;
}
.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.brand-logo-img {
    width: auto;
    max-width: 170px;
    height: 40px;
    object-fit: contain;
}
.brand span:last-child::first-letter {
    color: #5EF2FF;
}
.public-nav nav a,
.nav-auth-button {
    color: rgba(255,255,255,.88);
}
.public-nav nav a:hover,
.nav-auth-button:hover {
    color: #5EF2FF;
}
.nav-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 8px;
    background: rgba(255,255,255,.10);
    overflow: hidden;
    font-size: 1.15rem;
}
button.nav-avatar {
    cursor: pointer;
    appearance: none;
    padding: 0;
    transition: border-color .15s, box-shadow .15s;
}
button.nav-avatar:hover {
    border-color: rgba(94,242,255,.7);
    box-shadow: 0 0 0 2px rgba(94,242,255,.25);
}
.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #11182B 0%, #090D18 260px, #0C101D 100%);
    color: #FFFFFF;
}
.sil-hero {
    position: relative;
    overflow: hidden;
    min-height: 310px;
    display: grid;
    place-items: center;
    padding: 44px 0 30px;
    background:
        linear-gradient(90deg, rgba(10, 18, 38, .94), rgba(85, 72, 168, .78), rgba(16, 26, 52, .94)),
        linear-gradient(135deg, #111827, #3743A1 48%, #111827);
}
.sil-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.18), transparent 78%);
    pointer-events: none;
}
.sil-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    text-align: center;
}
.sil-hero h1 {
    margin: 0 0 12px;
    color: #FFFFFF;
    font-size: clamp(3rem, 7vw, 5.4rem);
    line-height: .95;
    font-weight: 950;
    text-shadow: 0 12px 32px rgba(0,0,0,.38);
}
.sil-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: rgba(255,255,255,.92);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.45;
    font-weight: 650;
}
.sil-hero .hero-counters {
    margin: 24px 0 0;
    gap: 12px;
}
.home-counter {
    min-width: 190px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(11, 15, 28, .72);
    box-shadow: 0 16px 34px rgba(0,0,0,.26);
    backdrop-filter: blur(10px);
}
.home-counter strong {
    color: #FFFFFF;
    font-size: 2rem;
    line-height: 1;
    font-weight: 950;
}
.home-counter small {
    grid-column: 2;
    color: rgba(255,255,255,.76);
    font-weight: 700;
}
.counter-icon {
    grid-row: 1 / span 2;
    font-size: 2.1rem;
    line-height: 1;
}
.counter-played { border-color: rgba(94, 242, 255, .78); box-shadow: 0 0 24px rgba(94, 242, 255, .26); }
.counter-rated { border-color: rgba(255, 181, 77, .78); box-shadow: 0 0 24px rgba(255, 181, 77, .24); }
.counter-recommended { border-color: rgba(219, 95, 255, .78); box-shadow: 0 0 24px rgba(219, 95, 255, .24); }
.home-discover {
    position: relative;
    padding: 24px 0 42px;
    background: #080C16;
}
.home-discover .section-title {
    position: relative;
    color: #FFFFFF;
    font-size: 1.65rem;
    text-shadow: 0 8px 20px rgba(0,0,0,.32);
}
.home-discover .section-title::after {
    content: "";
    display: block;
    width: 92px;
    height: 3px;
    margin-top: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, #5EF2FF, #7C8BFF 70%, transparent);
}
.home-discover .discover-heading {
    margin-top: 0;
}
.home-discover .filters {
    grid-template-columns: minmax(260px, 1fr) minmax(210px, 250px) minmax(160px, 210px);
    padding: 12px 0 16px;
}
.search-field {
    position: relative;
    display: block;
}
.search-field span {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.62);
    pointer-events: none;
}
.home-discover .input,
.home-discover select {
    min-height: 52px;
    border-color: rgba(167, 182, 255, .45);
    background: rgba(20, 28, 44, .82);
    color: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.home-discover .input::placeholder {
    color: rgba(255,255,255,.58);
}
.home-discover select option {
    color: #111827;
}
.home-discover .category-row {
    margin-bottom: 18px;
}
.home-discover .category-badge {
    border-color: color-mix(in srgb, var(--badge-color) 70%, rgba(255,255,255,.24));
    background: color-mix(in srgb, var(--badge-color) 18%, rgba(18, 24, 39, .82));
    color: #FFFFFF;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--badge-color) 26%, transparent);
}
.home-discover .empty-state {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
}
.home-discover .awards-strip {
    padding: 10px 0 0;
}
.home-discover .award-card {
    background: rgba(18, 24, 39, .86);
    border-color: rgba(255,255,255,.14);
    color: #FFFFFF;
}
.home-discover .award-label,
.home-discover .award-card small {
    color: rgba(255,255,255,.72);
}
.site-footer {
    border-top: 1px solid rgba(255,255,255,.12);
    background: #090D18;
    color: rgba(255,255,255,.75);
}
.site-footer a,
.site-footer button {
    color: rgba(255,255,255,.82);
}
@media (max-width: 760px) {
    .public-nav {
        align-items: center;
        flex-direction: row;
    }
    .sil-hero {
        min-height: 360px;
        padding-top: 56px;
    }
    .home-counter {
        min-width: min(100%, 260px);
    }
    .home-discover .filters {
        grid-template-columns: 1fr;
    }
}

/* ── Modal de perfil (accesible desde el layout público) ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 7, 18, .72);
    backdrop-filter: blur(8px);
}
.modal-overlay[hidden] { display: none !important; }
.modal-overlay.is-open { display: flex; }
.modal-overlay:popover-open { display: flex; }
.modal-overlay::backdrop { background: rgba(3, 7, 18, .62); }
.modal-panel {
    /* variables dark-theme para que todo hijo las herede */
    --color-text: rgba(255,255,255,.92);
    --color-text-muted: rgba(255,255,255,.6);
    --color-surface: rgba(255,255,255,.07);
    --color-border: rgba(167, 182, 255, .28);
    width: min(860px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    background: rgba(18, 24, 39, .97);
    border: 1px solid rgba(167, 182, 255, .26);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
    border-radius: 8px;
    padding: 22px;
    color: rgba(255,255,255,.92);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.modal-header h2 {
    margin: 0;
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 1.35rem;
    font-weight: 800;
}
.modal-close {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(167, 182, 255, .24);
    color: rgba(255,255,255,.6);
    font-size: 1.6rem;
    line-height: 1;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
}
.modal-close:hover { color: #FFFFFF; }
.modal-actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.modal-actions > .btn-small,
.modal-actions > .btn-neon {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-block: 12px;
    line-height: 1;
}
.modal-panel input::placeholder { color: rgba(255,255,255,.35); }
@media (max-width: 760px) {
    .modal-panel { padding: 16px; }
}
