/* TriviLearn Hub — Premium visual design */

:root {
    --hub-bg: #070b14;
    --hub-surface: rgba(255, 255, 255, 0.04);
    --hub-surface-hover: rgba(255, 255, 255, 0.08);
    --hub-border: rgba(255, 255, 255, 0.08);
    --hub-border-hover: rgba(255, 255, 255, 0.18);
    --hub-text: #e8edf5;
    --hub-text-muted: rgba(255, 255, 255, 0.68);
    --hub-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --hub-gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --hub-glow: 0 0 60px rgba(99, 102, 241, 0.25);
    --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --content-inset: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.32);
    --accent-trivia: #818cf8;
    --accent-mapa: #34d399;
    --accent-globillo: #fbbf24;
    --accent-geoguessr: #22d3ee;
    --site-header-height: 58px;
    --game-chrome-height: 120px;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

html { scroll-behavior: smooth; }

/* Accesibilidad */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 10001;
    padding: 12px 20px;
    background: #fff;
    color: #070b14;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

body.nav-open {
    overflow: hidden;
}

/* Navegación activa */
.site-nav-link.is-active {
    color: #fff;
    background: rgba(99, 102, 241, 0.22);
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.25);
}

.site-nav-link.is-active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--hub-gradient);
}

body.hub-body,
body.app-body {
    background: var(--hub-bg);
    color: var(--hub-text);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body.hub-body::before,
body.app-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 15% 5%, rgba(99, 102, 241, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 90% 15%, rgba(139, 92, 246, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 75% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
    animation: hubMesh 20s ease-in-out infinite;
}

body.hub-body::after,
body.app-body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes hubMesh {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

@keyframes hubGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@keyframes hubPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.5); }
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 11, 20, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--hub-gradient);
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px var(--content-inset);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.site-logo:hover {
    transform: translateY(-1px);
}

.site-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.site-logo-copy {
    display: flex;
    align-items: center;
}

.site-logo-text {
    font-size: clamp(1.65rem, 4vw, 2.125rem);
    font-weight: 800;
    font-family: var(--font-display);
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1;
}

.site-logo-accent {
    background: var(--hub-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-logo-badge {
    padding: 2px 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.12));
    color: #6ee7b7;
    font-size: 9px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(16, 185, 129, 0.3);
    line-height: 1.4;
}

.site-nav-shell {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.site-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.site-nav-link-accent {
    color: #fde68a !important;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.site-nav-link-accent:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fef3c7 !important;
}

.site-nav-link-icon {
    font-size: 14px;
    line-height: 1;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lang-switcher { position: relative; }

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hub-border);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-switcher-icon {
    color: #a5b4fc;
    flex-shrink: 0;
}

.lang-switcher-chevron {
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.lang-switcher-btn[aria-expanded="true"] .lang-switcher-chevron {
    transform: rotate(180deg);
}

.lang-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.35);
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #12182b;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 6px;
    min-width: 150px;
    list-style: none;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: headerDropdownIn 0.18s ease;
}

@keyframes headerDropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-switcher-menu a {
    display: block;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.lang-switcher-menu a:hover,
.lang-switcher-menu a.active {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
}

.btn-header-primary {
    background: var(--hub-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-header-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

.btn-header-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--hub-border);
}

.btn-header-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #fff;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-chip:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

.user-chip-photo,
.user-chip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.user-chip-photo {
    border: 2px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.user-chip-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.user-chip-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.user-chip-chevron {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin-left: -2px;
    transition: transform 0.2s ease;
}

.account-menu-btn[aria-expanded="true"] .user-chip-chevron {
    transform: rotate(180deg);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.35);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    width: min(320px, 88vw);
    display: flex;
    flex-direction: column;
    padding: 0 0 24px;
    border-left: 1px solid var(--hub-border);
    background: rgba(7, 11, 20, 0.98);
    backdrop-filter: blur(24px);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-site-nav.is-open {
    transform: translateX(0);
}

.mobile-site-nav[hidden] {
    display: none !important;
}

.mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hub-border);
    margin-bottom: 4px;
    position: sticky;
    top: 0;
    background: rgba(7, 11, 20, 0.98);
    z-index: 1;
}

.mobile-nav-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.mobile-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.35);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.mobile-nav-overlay:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-label {
    margin: 12px 0 4px;
    padding: 0 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
}

.mobile-site-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-site-nav a .tl-icon {
    color: #a5b4fc;
    flex-shrink: 0;
}

.mobile-site-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.mobile-nav-accent {
    color: #fde68a !important;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin-top: 4px;
}

.mobile-nav-muted {
    color: rgba(255, 255, 255, 0.55) !important;
}

.mobile-nav-cta {
    margin-top: 12px;
    text-align: center;
    color: #fff !important;
    font-weight: 700 !important;
    background: var(--hub-gradient) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* Hero */
.hub-hero {
    position: relative;
    z-index: 1;
    padding: 88px var(--content-inset) 60px;
    text-align: center;
}

.hub-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 32px;
}

.hub-badge {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.hub-badge-green {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.hub-hero h1 {
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 800;
    font-family: var(--font-display);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
    color: #fff;
}

.hub-hero h1 .gradient {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 35%, #22d3ee 70%, #34d399 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hubGradientShift 6s ease infinite;
}

.hub-hero-sub {
    font-size: clamp(17px, 2vw, 21px);
    color: rgba(255, 255, 255, 0.6);
    max-width: 700px;
    margin: 0 auto 44px;
    line-height: 1.75;
}

.hub-hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.hub-btn-primary {
    background: var(--hub-gradient);
    color: #fff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.hub-btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.55);
}

.hub-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

.hub-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hub-stats {
    display: flex;
    justify-content: center;
    gap: clamp(28px, 5vw, 72px);
    flex-wrap: wrap;
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 900px;
    margin: 0 auto;
}

.hub-stat-num {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hub-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    margin-top: 6px;
}

/* Features strip */
.hub-features {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 0 var(--content-inset) 70px;
    max-width: 1400px;
    margin: 0 auto;
}

.hub-feature {
    padding: 28px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 20px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hub-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.hub-feature:hover {
    background: var(--hub-surface-hover);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.hub-feature:hover::before { opacity: 1; }

.hub-feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
    animation: hubFloat 4s ease-in-out infinite;
}

.hub-feature:nth-child(2) .hub-feature-icon { animation-delay: -1s; }
.hub-feature:nth-child(3) .hub-feature-icon { animation-delay: -2s; }
.hub-feature:nth-child(4) .hub-feature-icon { animation-delay: -3s; }

.hub-feature h3 {
    font-size: 17px;
    font-weight: 700;
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 10px;
}

.hub-feature p {
    font-size: 14px;
    color: var(--hub-text-muted);
    line-height: 1.65;
}

/* Temáticas grid */
.hub-section {
    position: relative;
    z-index: 1;
    padding: 70px var(--content-inset) 90px;
}

.hub-section-header {
    text-align: center;
    margin-bottom: 56px;
}

.hub-section-header h2,
.hub-section-header h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    font-family: var(--font-display);
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.hub-section-header p {
    font-size: 18px;
    color: var(--hub-text-muted);
}

.hub-tematicas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    max-width: 1600px;
    margin: 0 auto;
}

.hub-tematica {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 22px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 210px;
}

.hub-tematica::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, #6366f1);
    opacity: 0.8;
    transition: height 0.3s;
}

.hub-tematica::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, var(--card-accent, #6366f1) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.4s;
}

@media (hover: hover) {
    .hub-tematica:hover {
        transform: translateY(-8px) scale(1.015);
        border-color: var(--hub-border-hover);
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    .hub-tematica:hover::before { height: 4px; }
    .hub-tematica:hover::after { opacity: 0.1; }

    .hub-tematica:hover .hub-tematica-icon {
        transform: scale(1.12) rotate(-4deg);
    }

    .hub-tematica:hover .hub-tematica-play { gap: 10px; }
}

.hub-tematica-icon {
    font-size: 52px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    transition: transform 0.4s;
}

.hub-tematica h3 {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.hub-tematica p {
    font-size: 14px;
    color: var(--hub-text-muted);
    line-height: 1.65;
    flex: 1;
    position: relative;
    z-index: 1;
}

.hub-tematica-play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--card-accent, #a5b4fc);
    position: relative;
    z-index: 1;
    transition: gap 0.3s;
}

.hub-tematica:nth-child(6n+1) { --card-accent: #6366f1; }
.hub-tematica:nth-child(6n+2) { --card-accent: #a855f7; }
.hub-tematica:nth-child(6n+3) { --card-accent: #10b981; }
.hub-tematica:nth-child(6n+4) { --card-accent: #f59e0b; }
.hub-tematica:nth-child(6n+5) { --card-accent: #ef4444; }
.hub-tematica:nth-child(6n+6) { --card-accent: #06b6d4; }

/* CTA */
.hub-cta {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px var(--content-inset);
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.08));
    overflow: hidden;
}

.hub-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hub-cta h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 18px;
    position: relative;
    letter-spacing: -0.03em;
}

.hub-cta p {
    color: var(--hub-text-muted);
    margin-bottom: 36px;
    font-size: 18px;
    position: relative;
}

.hub-cta-note {
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    position: relative;
}

/* Dashboard */
.hub-dashboard-hero {
    padding: 48px 40px;
    background: var(--hub-gradient);
    border-radius: 24px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35);
}

.hub-dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.hub-dashboard-hero h2,
.hub-dashboard-hero h1 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 10px;
    position: relative;
}

.hub-dashboard-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    position: relative;
    max-width: 560px;
}

.hub-dashboard-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
}

.hub-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    border-top: 1px solid var(--hub-border);
    padding: 0 0 28px;
    background: linear-gradient(180deg, rgba(7, 11, 20, 0.4) 0%, rgba(4, 6, 12, 0.95) 100%);
    overflow: hidden;
}

.site-footer-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 100vw);
    height: 280px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.2) 0%, rgba(6, 182, 212, 0.08) 45%, transparent 72%);
    pointer-events: none;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5) 20%, rgba(6, 182, 212, 0.5) 80%, transparent);
    opacity: 0.8;
}

.site-footer-cta {
    position: relative;
    padding: 40px var(--content-inset) 0;
    max-width: 1380px;
    margin: 0 auto;
}

.site-footer-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 32px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.06) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.site-footer-cta-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a5b4fc;
}

.site-footer-cta-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
}

.site-footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 48px;
    max-width: 1380px;
    margin: 0 auto;
    padding: 48px var(--content-inset) 32px;
    position: relative;
}

.site-footer-brand {
    max-width: 420px;
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 14px;
    color: #fff;
    transition: opacity 0.2s ease;
}

.site-footer-logo:hover {
    opacity: 0.92;
}

.site-footer-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.site-footer-logo-text {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-display);
    color: #fff;
    letter-spacing: -0.3px;
}

.site-footer-free-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.site-footer-tagline {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    margin: 0 0 10px;
    font-family: var(--font-display);
}

.site-footer-desc {
    font-size: 14px;
    color: var(--hub-text-muted);
    line-height: 1.65;
    margin: 0 0 18px;
}

.site-footer-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer-pill-green {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.28);
}

.site-footer-pill .tl-icon {
    width: 14px;
    height: 14px;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.site-footer-heading {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-body);
}

.site-footer-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    color: var(--hub-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer-nav a::after {
    content: '';
    width: 14px;
    height: 14px;
    margin-left: auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 6l6 6-6 6' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 6l6 6-6 6' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-footer-nav a:hover {
    color: #c4b5fd;
    transform: translateX(3px);
}

.site-footer-nav a:hover::after {
    opacity: 0.7;
    transform: translateX(0);
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px var(--content-inset) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

.site-footer-bottom-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer-langs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hub-border);
}

.site-footer-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--hub-text-muted);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-footer-lang:hover,
.site-footer-lang.active {
    background: rgba(99, 102, 241, 0.18);
    color: #c4b5fd;
}

.site-footer-copy,
.site-footer-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
}

.site-footer-note {
    color: rgba(255, 255, 255, 0.28);
}

/* Guest banner */
.guest-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.06));
    border: none;
    border-bottom: 1px solid rgba(245, 158, 11, 0.35);
    color: #fcd34d;
    padding: 10px var(--content-inset);
    border-radius: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s, transform 0.3s;
    width: 100%;
}

body.game-play .guest-banner {
    padding: 8px var(--content-inset);
    font-size: 12px;
}

.guest-banner.is-dismissed {
    opacity: 0;
    transform: translateY(-8px);
}

.guest-banner-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.guest-banner-text {
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.guest-banner a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guest-banner-dismiss {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.guest-banner-dismiss:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Session notices (guest / logged) */
.session-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--hub-border);
}

.session-notice-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.session-notice-body {
    flex: 1;
    min-width: 0;
}

.session-notice-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    font-family: var(--font-display);
}

.session-notice-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--hub-text-muted);
}

.session-notice-guest {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.03));
    border-color: rgba(245, 158, 11, 0.3);
}

.session-notice-user {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.06));
    border-color: rgba(16, 185, 129, 0.28);
}

.session-notice-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.session-perk {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.session-perk-user {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.session-notice-cta {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--hub-gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: transform 0.2s ease;
}

.session-notice-cta:hover {
    transform: translateY(-1px);
    color: #fff;
}

.logged-perks-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: 100%;
    padding: 8px var(--content-inset);
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #6ee7b7;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(99, 102, 241, 0.08));
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
}

.logged-perks-bar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.game-results-upsell {
    margin-top: 28px;
    padding: 22px 20px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.game-results-upsell h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-display);
}

.game-results-upsell p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--hub-text-muted);
    line-height: 1.55;
}

.game-results-upsell .btn-primary {
    display: inline-flex;
}

.game-results-logged {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 14px;
    text-align: center;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.game-results-logged p {
    margin: 0;
    font-size: 14px;
    color: #6ee7b7;
    line-height: 1.5;
}

/* App pages */
.app-main {
    position: relative;
    z-index: 1;
    padding: 28px 0;
    max-width: 100%;
    width: 100%;
}

.app-main-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--content-inset);
}

.app-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 22px;
    padding: 36px;
    backdrop-filter: blur(12px);
}

.app-card h2,
.app-card h1 {
    font-size: 30px;
    font-weight: 800;
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 32px;
}

.app-game-card,
.app-nivel-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 18px;
    padding: 26px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-game-card::before,
.app-nivel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hub-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.app-game-card:hover,
.app-nivel-card:not(.locked):hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    background: var(--hub-surface-hover);
}

.app-game-card:hover::before,
.app-nivel-card:not(.locked):hover::before { opacity: 1; }

.app-game-card h3,
.app-nivel-card h4 {
    color: #fff;
    font-size: 18px;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 8px;
}

.app-game-card .hub-game-type {
    margin-bottom: 0;
}

.app-game-card .hub-tematica-meta,
.app-nivel-card .hub-tematica-meta {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.app-game-card .btn-app {
    margin-top: auto;
}

.app-game-card p,
.app-nivel-card p {
    color: var(--hub-text-muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 18px;
}

.app-nivel-card.locked {
    opacity: 0.85;
    filter: none;
}

.app-nivel-card.completed {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
}

.app-nivel-card.completed::after,
.app-nivel-card.current::after,
.app-nivel-card.locked::after {
    display: none;
}

.app-nivel-card.completed:has(.nivel-badge-done) {
    border-color: rgba(16, 185, 129, 0.25);
}

.app-nivel-card.current {
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2), 0 8px 32px rgba(99, 102, 241, 0.15);
}

@media (prefers-reduced-motion: no-preference) {
    .app-nivel-card.current {
        animation: hubPulse 2.5s ease-in-out infinite;
    }
}

.hub-btn-continue-level {
    display: inline-flex;
    margin-bottom: 24px;
    width: 100%;
    max-width: 360px;
    justify-content: center;
}

/* Breadcrumb */
.hub-breadcrumb {
    margin-bottom: 16px;
}

.hub-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.hub-breadcrumb a {
    color: var(--hub-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.hub-breadcrumb a:hover {
    color: #a5b4fc;
}

.hub-breadcrumb span[aria-current] {
    color: var(--hub-text);
    font-weight: 500;
}

.hub-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.25);
}

.hub-section-header h1 .tl-icon-xl {
    vertical-align: -4px;
    margin-right: 8px;
    color: #a5b4fc;
}

.logged-perks-bar .tl-icon {
    opacity: 0.85;
}

.hub-stat-card .hub-stat-num {
    font-size: clamp(28px, 3.5vw, 40px);
}

.btn-app {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--hub-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

.btn-app-ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--hub-border);
    box-shadow: none;
}

.btn-app:disabled,
.btn-app[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-back-app {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hub-text-muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 28px;
    transition: color 0.2s;
    padding: 8px 0;
}

.btn-back-app:hover { color: #a5b4fc; }

.nivel-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Featured games carousel */
.hub-section-featured {
    padding-top: 20px;
}

.hub-featured-wrap {
    position: relative;
    padding: 0 48px;
}

.hub-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--hub-border);
    background: rgba(7, 11, 20, 0.9);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hub-scroll-btn:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.2);
}

.hub-scroll-prev { left: 4px; }
.hub-scroll-next { right: 4px; }

@media (max-width: 700px) {
    .hub-scroll-btn { display: none; }
    .hub-featured-wrap { padding: 0; }
}

.hub-featured-wrap::before,
.hub-featured-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 24px;
    width: 56px;
    z-index: 2;
    pointer-events: none;
}

.hub-featured-wrap::before {
    left: 0;
    background: linear-gradient(90deg, var(--hub-bg) 20%, transparent 100%);
}

.hub-featured-wrap::after {
    right: 0;
    background: linear-gradient(270deg, var(--hub-bg) 20%, transparent 100%);
}

.hub-featured-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 32px 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) transparent;
}

.hub-featured-scroll::-webkit-scrollbar { height: 6px; }
.hub-featured-scroll::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

.hub-featured-card {
    flex: 0 0 min(280px, 85vw);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: hubFeaturedGlow 4s ease-in-out infinite;
}

@keyframes hubFeaturedGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(99, 102, 241, 0); }
    50% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12); }
}

.hub-featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hub-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.hub-featured-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 24px 56px rgba(99, 102, 241, 0.22);
}

.hub-featured-card:hover::before { opacity: 0.08; }

.hub-featured-icon {
    font-size: 40px;
    margin-bottom: 12px;
    position: relative;
}

.hub-featured-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    position: relative;
}

.hub-featured-card p {
    font-size: 13px;
    color: var(--hub-text-muted);
    flex: 1;
    position: relative;
}

.hub-featured-cta {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #a5b4fc;
    position: relative;
    transition: transform 0.25s, color 0.25s;
}

.hub-featured-card:hover .hub-featured-cta {
    transform: translateX(4px);
    color: #c4b5fd;
}

/* Continue playing */
.hub-section-continue {
    padding: 0 32px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.hub-continue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.hub-continue-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-continue-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hub-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

@media (hover: hover) {
    .hub-continue-card:hover {
        border-color: rgba(99, 102, 241, 0.45);
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(99, 102, 241, 0.18);
    }

    .hub-continue-card:hover::before {
        opacity: 0.06;
    }

    .hub-continue-card:hover .hub-continue-arrow {
        transform: translateX(4px);
    }
}

.hub-continue-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    position: relative;
}

.hub-continue-card p {
    font-size: 13px;
    color: var(--hub-text-muted);
    margin: 0;
    position: relative;
}

.hub-continue-meta {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4fc;
    position: relative;
}

.hub-continue-arrow {
    margin-left: auto;
    font-size: 20px;
    color: #6366f1;
    opacity: 0.6;
    transition: transform 0.25s, opacity 0.25s;
    position: relative;
}

.hub-continue-card:hover .hub-continue-arrow {
    transform: translateX(4px);
    opacity: 1;
}

.hub-game-type {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #c4b5fd;
    margin-bottom: 12px;
    width: fit-content;
    position: relative;
}

.hub-tematica-meta {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    position: relative;
}

/* How it works */
.hub-how {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 32px 60px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hub-how-step {
    text-align: center;
    padding: 28px 20px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-how-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hub-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.hub-how-step:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.hub-how-step:hover::before {
    opacity: 1;
}

.hub-how-step:hover .hub-how-num {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.hub-how-num {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--hub-gradient);
    border-radius: 50%;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    margin-bottom: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.hub-how-step h3 {
    font-family: var(--font-display);
    font-size: 17px;
    color: #fff;
    margin-bottom: 8px;
}

.hub-how-step p {
    font-size: 14px;
    color: var(--hub-text-muted);
    line-height: 1.6;
}

/* Search */
.hub-search-wrap {
    max-width: 480px;
    margin: 0 auto 32px;
    padding: 0 32px;
    position: relative;
}

.hub-search-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: var(--hub-gradient);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.hub-search-wrap:focus-within::before {
    opacity: 0.35;
}

.hub-tematica.is-hidden {
    display: none !important;
}

.hub-tematica.filter-match {
    animation: hubCardPop 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes hubCardPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.hub-hero-scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    pointer-events: none;
    animation: hubScrollBounce 2.2s ease-in-out infinite;
}

.hub-hero-scroll::after {
    content: '';
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent);
}

@keyframes hubScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

.hub-search {
    width: 100%;
    padding: 16px 20px 16px 48px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%236366f1' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.06a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
}

.hub-search:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.hub-search::placeholder { color: rgba(255, 255, 255, 0.35); }

.hub-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.hub-search-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.hub-no-results {
    text-align: center;
    color: var(--hub-text-muted);
    padding: 24px;
}

/* Topic hero */
.hub-topic-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 36px;
    padding: 32px 36px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}

.hub-topic-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hub-gradient);
}

.hub-topic-hero-icon {
    font-size: 64px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
    animation: hubFloat 4s ease-in-out infinite;
}

.hub-topic-hero h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.hub-topic-hero p { color: var(--hub-text-muted); font-size: 15px; }

.hub-topic-desc {
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin: 8px 0;
    max-width: 640px;
}

.hub-topic-meta {
    font-size: 14px;
    color: var(--hub-text-muted);
    margin-top: 4px;
}

.hub-section-how .hub-how {
    padding-left: var(--content-inset);
    padding-right: var(--content-inset);
    padding-bottom: 0;
}

.hub-section-faq {
    padding-bottom: 72px;
}

.hub-faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 var(--content-inset);
}

.hub-faq-item {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hub-faq-item[open] {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.hub-faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.hub-faq-item summary::-webkit-details-marker { display: none; }

.hub-faq-item summary::after {
    content: '+';
    font-size: 22px;
    font-weight: 400;
    color: #a5b4fc;
    flex-shrink: 0;
}

.hub-faq-item[open] summary::after { content: '−'; }

.hub-faq-item p {
    padding: 0 24px 20px;
    color: var(--hub-text-muted);
    line-height: 1.7;
    font-size: 15px;
    margin: 0;
}

.hub-btn-random {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);
    background-size: 200% 200%;
    color: #fff;
    animation: hubGradientShift 4s ease infinite;
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.35);
}

.hub-btn-random:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 36px rgba(245, 158, 11, 0.45);
}


/* Level progress on juego page */
.level-progress-wrap {
    margin: 20px 0 24px;
}

.level-progress-label {
    font-size: 13px;
    color: var(--hub-text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.level-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    width: var(--progress, 0%);
    background: var(--hub-gradient);
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
    position: relative;
    overflow: hidden;
}

.level-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: levelShine 2.5s ease-in-out infinite;
}

@keyframes levelShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.app-card-desc {
    color: var(--hub-text-muted);
    line-height: 1.65;
    margin-bottom: 8px;
}

.app-progress-summary {
    padding: 14px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    margin-bottom: 20px;
    color: #c4b5fd;
    font-size: 14px;
}

.app-section-title {
    color: #fff;
    font-size: 20px;
    font-family: var(--font-display);
    margin-bottom: 6px;
}

.app-section-hint {
    color: var(--hub-text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.app-actions-row {
    margin-bottom: 20px;
}

/* Login on dark theme */
body.hub-body.login-page .login-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 100px 20px 60px;
}

body.hub-body.login-page .login-box {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    padding: 44px 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 440px;
    width: 100%;
}

body.hub-body.login-page .login-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 28px;
}

body.hub-body.login-page .login-title {
    color: #fff;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

body.hub-body.login-page .login-subtitle {
    color: #6ee7b7;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

body.hub-body.login-page .login-benefits {
    list-style: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 0 0 28px;
    text-align: left;
}

body.hub-body.login-page .login-benefits li {
    color: var(--hub-text-muted);
    padding: 8px 0 8px 28px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

body.hub-body.login-page .login-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #6ee7b7;
    font-weight: 700;
}

body.hub-body.login-page .login-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 14px;
}

body.hub-body.login-page .login-error strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
}

body.hub-body.login-page .btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #fff;
    color: #1e293b;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body.hub-body.login-page .btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

body.hub-body.login-page .login-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--hub-text-muted);
}

body.hub-body.login-page .logo-text {
    color: #fff;
    font-family: var(--font-display);
}

body.hub-body.login-page .login-back {
    display: inline-block;
    margin-top: 24px;
    color: #a5b4fc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

body.hub-body.login-page .login-back:hover {
    color: #c7d2fe;
}

/* ── Utilidades de página app ── */
.app-card-desc {
    color: var(--hub-text-muted);
    margin-bottom: 20px;
    line-height: 1.65;
}

.app-section-title {
    color: #fff;
    font-size: 20px;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 8px;
}

.app-section-hint {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    margin-bottom: 24px;
}

.app-actions-row {
    margin-bottom: 24px;
}

.app-progress-summary {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: #c7d2fe;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.app-progress-summary strong {
    color: #fff;
}

.btn-app-stack {
    margin-top: 10px;
    display: block;
    text-align: center;
}

.app-card h3 {
    font-size: 18px;
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.hub-empty-state {
    text-align: center;
    padding: 56px 32px;
}

.hub-empty-state p {
    font-size: 18px;
    margin-bottom: 28px;
    color: var(--hub-text-muted);
}

.hub-cta-center {
    text-align: center;
    margin-top: 36px;
}

/* ── Tarjetas de estadísticas ── */
.hub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.hub-stat-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.hub-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hub-gradient);
    opacity: 0.6;
}

.hub-stat-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15), 0 0 40px rgba(99, 102, 241, 0.08);
}

.hub-stat-card:nth-child(1) { --stat-accent: #6366f1; }
.hub-stat-card:nth-child(2) { --stat-accent: #10b981; }
.hub-stat-card:nth-child(3) { --stat-accent: #f59e0b; }

.hub-stat-card:nth-child(1)::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.hub-stat-card:nth-child(2)::before { background: linear-gradient(90deg, #10b981, #06b6d4); }
.hub-stat-card:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.hub-stat-card-num {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-display);
    background: var(--hub-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hub-stat-card-label {
    font-size: 0.78rem;
    color: var(--hub-text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ── Historial ── */
.hub-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-history-item {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 18px;
    padding: 22px 26px;
    transition: all 0.25s;
    border-left: 3px solid transparent;
}

.hub-history-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    border-left-color: #6366f1;
    background: var(--hub-surface-hover);
    transform: translateX(4px);
}

.hub-history-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hub-history-head h4 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    flex: 1;
    font-family: var(--font-display);
}

.hub-history-head time {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.hub-history-details {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
}

.hub-history-details span {
    color: var(--hub-text-muted);
    font-weight: 500;
    min-width: 120px;
    display: inline-block;
}

.hub-history-details .wrong {
    color: #fca5a5;
}

.hub-history-details .wrong span {
    color: rgba(252, 165, 165, 0.7);
}

.hub-history-details .right {
    color: #6ee7b7;
}

.hub-history-details .right span {
    color: rgba(110, 231, 183, 0.7);
}

/* ── Rankings ── */
.hub-rankings-filters,
.hub-rankings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.hub-filter-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    color: var(--hub-text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
}

.hub-filter-btn:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.08);
}

.hub-filter-btn.active {
    background: var(--hub-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.hub-rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.hub-rankings-empty {
    color: var(--hub-text-muted);
    text-align: center;
    padding: 32px 16px;
    font-size: 15px;
}

.hub-rankings-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hub-ranking-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.hub-ranking-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.hub-ranking-row.me {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.hub-ranking-row:nth-child(1) .hub-ranking-pos {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-text-fill-color: #fff;
    color: #fff;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
}

.hub-ranking-row:nth-child(2) .hub-ranking-pos {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    -webkit-text-fill-color: #1e293b;
    color: #1e293b;
}

.hub-ranking-row:nth-child(3) .hub-ranking-pos {
    background: linear-gradient(135deg, #b45309, #d97706);
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.hub-ranking-pos {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text-muted);
    font-family: var(--font-display);
}

.hub-ranking-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.hub-ranking-name {
    flex: 1;
    color: var(--hub-text);
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-ranking-score {
    font-weight: 700;
    color: #a5b4fc;
    font-size: 14px;
    font-family: var(--font-display);
    flex-shrink: 0;
}

/* Header scrolled */
.site-header.scrolled,
.site-header.is-scrolled {
    background: rgba(7, 11, 20, 0.94);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.site-header.scrolled::after {
    opacity: 0.55;
}

.site-header.is-scrolled::after {
    opacity: 0.55;
}

/* Mobile menu active */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-btn span {
    transition: all 0.3s ease;
}

/* Progreso en tarjetas de temática */
.app-game-progress {
    margin: 8px 0 12px;
}

.app-game-progress-bar {
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 6px;
}

.app-game-progress-fill {
    height: 100%;
    width: var(--progress, 0%);
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.4s ease;
}

.app-game-progress-label {
    font-size: 12px;
    color: #a5b4fc;
    font-weight: 500;
}

.app-card-meta {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--hub-text-muted);
}

/* PWA toast e instalación */
.tl-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 10000;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--hub-border);
    color: var(--hub-text);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: min(90vw, 360px);
    text-align: center;
}

.tl-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.tl-toast-warn { border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }
.tl-toast-ok { border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }

.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(7, 11, 20, 0.96);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    max-width: min(94vw, 480px);
    animation: pwaSlideUp 0.4s ease;
}

@keyframes pwaSlideUp {
    from { transform: translateX(-50%) translateY(100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.pwa-install-icon { font-size: 24px; flex-shrink: 0; }
.pwa-install-text { flex: 1; font-size: 14px; color: var(--hub-text); }
.pwa-install-text strong { font-weight: 600; }

.pwa-install-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.pwa-install-dismiss {
    background: none;
    border: none;
    color: var(--hub-text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* Volver arriba */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--hub-border);
    background: rgba(7, 11, 20, 0.92);
    backdrop-filter: blur(12px);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, border-color 0.2s, opacity 0.2s;
}

.back-to-top .tl-icon {
    width: 20px;
    height: 20px;
}

.back-to-top:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.back-to-top[hidden] {
    display: none;
}

body.game-play .back-to-top {
    bottom: 88px;
}

/* Responsive */
@media (max-width: 1100px) {
    .site-nav-shell { display: none; }
    .mobile-menu-btn { display: flex; }
    .user-chip-name { display: none; }
    .user-chip { padding: 4px; }
}

@media (max-width: 900px) {
    .site-footer-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .site-footer-brand {
        max-width: none;
    }

    .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    :root { --content-inset: 12px; }
    .site-header-inner { padding: 8px var(--content-inset); }
    .site-footer {
        padding: 0 0 24px;
    }
    .site-footer-cta {
        padding-top: 28px;
    }
    .site-footer-cta-inner {
        padding: 20px;
    }
    .site-footer-cta-actions {
        width: 100%;
    }
    .site-footer-cta-actions .hub-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    .site-footer-inner,
    .site-footer-bottom {
        padding-left: var(--content-inset);
        padding-right: var(--content-inset);
    }
    .site-footer-inner {
        gap: 28px;
        padding-top: 36px;
    }
    .site-footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .site-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-footer-bottom-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .btn-header-ghost { display: none; }
    .hub-hero { padding-top: 72px; padding-bottom: 48px; }
    .hub-section { padding-top: 48px; padding-bottom: 56px; }
    .hub-features { padding-bottom: 48px; }
    .hub-featured-scroll { padding-bottom: 20px; }
    .hub-how { grid-template-columns: 1fr; padding-bottom: 32px; }
    .hub-search-wrap { padding: 0; }
    .hub-stats-grid { grid-template-columns: 1fr; }
    .app-main { padding: 20px 0; }
    .hub-dashboard-hero { padding: 32px var(--content-inset); }
    .hub-topic-hero { flex-direction: column; text-align: center; }
}

/* ── Accesibilidad y UX ── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 10001;
    padding: 12px 20px;
    background: #6366f1;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:where(a, button, input, select, textarea, [tabindex="0"]):focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.btn-google:focus-visible {
    outline-color: #4285f4;
}

body.mobile-nav-open {
    overflow: hidden;
}

.hub-empty-hint {
    font-size: 15px;
    color: var(--hub-text-muted);
    margin: -12px 0 24px;
    line-height: 1.6;
}

.hub-rankings-empty {
    text-align: center;
    padding: 24px 12px;
}

.hub-rankings-empty p {
    margin: 0 0 8px;
    color: var(--hub-text-muted);
}

.hub-rankings-empty .btn-app {
    margin-top: 16px;
}

.btn-app-sm {
    padding: 10px 18px;
    font-size: 13px;
}

.mobile-lang-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--hub-border);
    color: var(--hub-text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: all 0.2s;
}

.mobile-lang-link.active,
.mobile-lang-link:hover {
    border-color: rgba(99, 102, 241, 0.5);
    color: #c4b5fd;
    background: rgba(99, 102, 241, 0.12);
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    .lang-switcher-btn {
        min-height: 44px;
        padding: 10px 16px;
    }

    .btn-header {
        min-height: 44px;
        padding: 10px 20px;
    }

    .hub-filter-btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .mobile-site-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 12px 0;
    }

    .btn-back-app {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 10px 0;
    }
}

/*
 * Botones: hub-btn = marketing/landing | btn-app = acciones en hub de juego | btn-header = header
 */

.hub-btn:focus-visible,
.btn-app:focus-visible,
.btn-header:focus-visible,
.hub-filter-btn:focus-visible,
.site-nav-link:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.hub-game-card {
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hub-game-card:hover,
.hub-game-card:focus-within {
    border-color: var(--hub-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.auth-footer {
    text-align: center;
    padding: 24px 16px 32px;
    color: var(--hub-text-muted);
    font-size: 0.875rem;
}

body.login-page .auth-footer {
    margin-top: auto;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Refined design system ── */
.tl-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    color: currentColor;
}

.tl-icon-lg { width: 22px; height: 22px; }
.tl-icon-xl { width: 28px; height: 28px; }
.tl-icon-logo { width: 26px; height: 26px; color: #a5b4fc; }

.hub-body .hub-hero {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.22), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(6, 182, 212, 0.12), transparent);
}

.hub-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    max-width: 920px;
    padding-top: var(--space-5);
    border-top: 1px solid var(--hub-border);
}

.hub-stat-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
}

@media (max-width: 767px) {
    .hub-stats-cards { grid-template-columns: repeat(2, 1fr); }
}

.site-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(44px, 8vw, 52px);
    height: clamp(44px, 8vw, 52px);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
    flex-shrink: 0;
}

.site-header.is-scrolled .site-header-inner {
    padding-top: 8px;
    padding-bottom: 8px;
}

.account-menu { position: relative; }

.account-menu-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--hub-border);
    background: rgba(12, 16, 28, 0.98);
    box-shadow: var(--shadow-md);
    z-index: 1100;
}

.account-menu-dropdown a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--hub-text);
    text-decoration: none;
    font-size: 14px;
}

.account-menu-dropdown a:hover {
    background: var(--hub-surface-hover);
}

.account-menu-muted { color: var(--hub-text-muted) !important; }

.hub-featured-grid-wrap { position: relative; }

@media (min-width: 768px) {
    .hub-featured-grid {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--space-4);
        overflow: visible !important;
        scroll-snap-type: none;
    }
    .hub-scroll-mobile-only { display: none !important; }
}

.hub-featured-card {
    border-top: 3px solid var(--accent-trivia);
}

.game-accent-geoguessr { border-top-color: var(--accent-geoguessr); }
.game-accent-globillo { border-top-color: var(--accent-globillo); }
.game-accent-mapa { border-top-color: var(--accent-mapa); }
.game-accent-trivia { border-top-color: var(--accent-trivia); }
.game-accent-minijuego { border-top-color: #8b5cf6; }

.hub-featured-type-icon {
    display: inline-flex;
    margin-bottom: var(--space-2);
    color: #a5b4fc;
}

.juego-hero {
    border-left: 4px solid var(--accent-trivia);
    margin-bottom: var(--space-5);
}

.juego-hero.game-accent-geoguessr { border-left-color: var(--accent-geoguessr); }
.juego-hero.game-accent-globillo { border-left-color: var(--accent-globillo); }
.juego-hero.game-accent-mapa { border-left-color: var(--accent-mapa); }

.juego-hero-head {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.juego-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    flex-shrink: 0;
}

.app-nivel-card {
    border-left: 3px solid transparent;
    position: relative;
}

.app-nivel-card.game-accent-geoguessr { border-left-color: var(--accent-geoguessr); }
.app-nivel-card.game-accent-globillo { border-left-color: var(--accent-globillo); }
.app-nivel-card.game-accent-mapa { border-left-color: var(--accent-mapa); }
.app-nivel-card.game-accent-trivia { border-left-color: var(--accent-trivia); }
.app-nivel-card.game-accent-minijuego { border-left-color: #8b5cf6; }

.app-nivel-card.current {
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.45);
}

.nivel-badge-done {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #34d399;
}

.segmented-control {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hub-border);
}

.segmented-item {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-text-muted);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.segmented-item.is-active,
.segmented-item[aria-current="page"] {
    background: rgba(99, 102, 241, 0.22);
    color: #fff;
}

.segmented-item:hover {
    color: #fff;
    background: var(--hub-surface-hover);
}

@media (prefers-reduced-motion: reduce) {
    .hub-hero h1 .gradient { animation: none; }
    .hub-topic-hero-icon { animation: none; }
    .hub-btn:hover,
    .hub-featured-card:hover,
    .hub-tematica:hover,
    .hub-game-card:hover {
        transform: none;
    }
}

/* ── Dashboard mini-home ── */
.hub-dashboard-page .hub-dashboard-hero {
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}

.hub-dashboard-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hub-dashboard-user {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-width: 0;
}

.hub-dashboard-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.hub-dashboard-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.hub-dashboard-copy {
    min-width: 0;
}

.hub-dashboard-cta {
    flex-shrink: 0;
}

.hub-dashboard-stats {
    margin-bottom: var(--space-5);
}

.hub-stat-card-icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-2);
    color: #a5b4fc;
}

.hub-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-7);
}

.hub-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    text-decoration: none;
    color: var(--hub-text);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.hub-quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: #c4b5fd;
}

.hub-quick-action-accent .hub-quick-action-icon {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
}

.hub-quick-action-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.hub-continue-card.game-accent-geoguessr { border-left: 3px solid var(--accent-geoguessr); }
.hub-continue-card.game-accent-globillo { border-left: 3px solid var(--accent-globillo); }
.hub-continue-card.game-accent-mapa { border-left: 3px solid var(--accent-mapa); }
.hub-continue-card.game-accent-trivia { border-left: 3px solid var(--accent-trivia); }

.hub-continue-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--hub-border);
    color: #a5b4fc;
}

.hub-continue-body {
    flex: 1;
    min-width: 0;
    position: relative;
}

.hub-continue-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-continue-arrow {
    display: flex;
    align-items: center;
    color: #818cf8;
}

.hub-tematica-play {
    gap: 6px;
}

/* ── Página temática ── */
.hub-topic-page .hub-topic-hero-copy {
    min-width: 0;
}

.hub-topic-page .hub-topic-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hub-topic-games-header {
    margin-bottom: var(--space-4);
}

.hub-topic-games-header h2 {
    font-size: 1.25rem;
}

.hub-topic-games .hub-game-card {
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--accent-trivia);
    position: relative;
}

.hub-topic-games .hub-game-card.game-accent-geoguessr { border-left-color: var(--accent-geoguessr); }
.hub-topic-games .hub-game-card.game-accent-globillo { border-left-color: var(--accent-globillo); }
.hub-topic-games .hub-game-card.game-accent-mapa { border-left-color: var(--accent-mapa); }

.hub-game-card-icon {
    display: inline-flex;
    margin-bottom: var(--space-2);
    color: #a5b4fc;
}

.hub-empty-state .hub-empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-3);
    color: #94a3b8;
}

/* ── Touch + contraste móvil ── */
.hub-btn-ghost {
    border-color: rgba(255, 255, 255, 0.22);
}

.hub-tematica:focus-visible,
.hub-continue-card:focus-visible,
.hub-quick-action:focus-visible,
.hub-game-card:focus-within,
.hub-featured-card:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

@media (hover: hover) {
    .hub-quick-action:hover {
        border-color: rgba(99, 102, 241, 0.4);
        background: var(--hub-surface-hover);
    }

    .hub-stat-card:hover {
        transform: translateY(-3px);
    }
}

@media (hover: none) {
    .hub-tematica:active,
    .hub-continue-card:active,
    .hub-quick-action:active,
    .hub-game-card:active,
    .hub-featured-card:active,
    .hub-btn:active {
        transform: scale(0.98);
    }

    .hub-tematica:active {
        border-color: rgba(99, 102, 241, 0.45);
        background: var(--hub-surface-hover);
    }
}

@media (max-width: 767px) {
    .hub-dashboard-hero-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-dashboard-cta {
        width: 100%;
        justify-content: center;
    }

    .hub-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-dashboard-page .hub-tematicas {
        grid-template-columns: 1fr;
    }

    .hub-topic-hero {
        padding: var(--space-5);
    }

    .hub-topic-games {
        grid-template-columns: 1fr;
    }
}

/* Minijuegos — sección destacada en home */
.hub-section-minijuegos {
    position: relative;
    overflow: hidden;
}

.hub-section-minijuegos::before {
    content: '';
    position: absolute;
    inset: -20% -10% auto;
    height: 60%;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hub-section-badge {
    display: inline-block;
    margin-bottom: var(--space-2);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-minijuegos-wrap {
    position: relative;
}

.hub-minijuegos-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px 32px 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.45) transparent;
}

.hub-minijuegos-scroll::-webkit-scrollbar { height: 6px; }
.hub-minijuegos-scroll::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 3px;
}

.hub-minijuego-card {
    flex: 0 0 min(240px, 78vw);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-top: 3px solid var(--hub-mj-accent, #8b5cf6);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hub-minijuego-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--hub-mj-accent, #8b5cf6) 0%, transparent 55%);
    opacity: 0.04;
    pointer-events: none;
}

.hub-minijuego-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--hub-mj-accent, #8b5cf6) 45%, transparent);
    box-shadow: 0 20px 48px color-mix(in srgb, var(--hub-mj-accent, #8b5cf6) 22%, transparent);
}

.hub-minijuego-icon {
    display: inline-flex;
    margin-bottom: var(--space-2);
    color: var(--hub-mj-accent, #a78bfa);
}

.hub-minijuego-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    position: relative;
}

.hub-minijuego-card p {
    font-size: 12px;
    color: var(--hub-text-muted);
    flex: 1;
    position: relative;
}

.hub-minijuego-cta {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hub-mj-accent, #c4b5fd);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.hub-minijuego-verdadero_falso { --hub-mj-accent: #f59e0b; }
.hub-minijuego-detective     { --hub-mj-accent: #818cf8; }
.hub-minijuego-coordenadas   { --hub-mj-accent: #d97706; }
.hub-minijuego-pares         { --hub-mj-accent: #34d399; }
.hub-minijuego-orden         { --hub-mj-accent: #c084fc; }
.hub-minijuego-pixel         { --hub-mj-accent: #22d3ee; }
.hub-minijuego-mercadillo    { --hub-mj-accent: #facc15; }
.hub-minijuego-palabras      { --hub-mj-accent: #f472b6; }
.hub-minijuego-laberinto     { --hub-mj-accent: #2dd4bf; }
.hub-minijuego-simon         { --hub-mj-accent: #a78bfa; }

@media (min-width: 768px) {
    .hub-minijuegos-scroll {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--space-4);
        overflow: visible;
        scroll-snap-type: none;
        padding: 8px 0 24px;
    }

    .hub-minijuego-card {
        flex: none;
    }
}

@media (max-width: 767px) {
    .hub-minijuegos-scroll {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.hub-section-seo {
    padding-bottom: 48px;
}

.hub-section-seo .seo-content {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Contenido SEO (hubs de juego y temática) ── */
.seo-content {
    margin-top: var(--space-7, 48px);
    padding: var(--space-6, 32px);
    border-radius: var(--radius-xl, 20px);
    border: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.03);
}

.seo-content-title {
    margin: 0 0 var(--space-4, 16px);
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    font-weight: 700;
    color: #fff;
}

.seo-content-body p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--hub-text-muted);
}

.seo-content-body p:last-child {
    margin-bottom: 0;
}

.seo-faq {
    margin-top: var(--space-5, 24px);
    padding-top: var(--space-5, 24px);
    border-top: 1px solid var(--hub-border);
}

.seo-faq-title {
    margin: 0 0 var(--space-3, 12px);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}

.seo-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seo-faq-item {
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.seo-faq-item summary {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hub-text);
    cursor: pointer;
    list-style: none;
}

.seo-faq-item summary::-webkit-details-marker {
    display: none;
}

.seo-faq-item summary::after {
    content: '+';
    float: right;
    color: #a5b4fc;
    font-weight: 700;
}

.seo-faq-item[open] summary::after {
    content: '−';
}

.seo-faq-item p {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--hub-text-muted);
}

@media (max-width: 600px) {
    .seo-content {
        padding: var(--space-5, 24px) var(--space-4, 16px);
        margin-top: var(--space-6, 32px);
    }
}
