/* =========================================
   index.css | THE DEL GAMES · GERMANY
   v2.0 — featured career simulator + polish
   ========================================= */

:root {
    --bg-black: #050505;
    --bg-deep: #3a0000;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;

    --card-bg: rgba(20, 0, 0, 0.8);
    --card-bg-hover: rgba(40, 0, 0, 0.9);
    --card-border: #cc0000;

    --accent: #ffcc00;
    --accent-soft: rgba(255, 204, 0, 0.14);
    --accent-line: rgba(255, 204, 0, 0.35);
    --accent-glow: rgba(255, 204, 0, 0.5);
    --accent-peak: #ffcc00;

    --badge-bg: #cc0000;
    --badge-fg: #ffcc00;
    --cta-bg: #ffcc00;
    --cta-fg: #1f1600;

    --feat-bg: rgba(32, 2, 2, 0.92);
    --track-bg: rgba(16, 0, 0, 0.6);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-black);
    background-image: radial-gradient(circle at top, var(--bg-deep) 0%, var(--bg-black) 70%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, svg { max-width: 100%; }

/* --- ACCESIBILIDAD --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--accent);
    color: var(--cta-fg);
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 0 0 10px 0;
    text-decoration: none;
}

.skip-link:focus { left: 0; }

a:focus-visible,
.game-card:focus-visible,
.league-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 12px;
}

/* --- HUB HERO --- */
.hub-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    text-align: center;
}

.hub-title {
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin: 0 0 0.6rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hub-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0 auto 3rem;
    max-width: 48ch;
    line-height: 1.5;
}

/* Compatibilidad con el título antiguo */
.selection-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4rem;
    letter-spacing: -0.5px;
}

/* --- GAME CARDS --- */
.games-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.game-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #fff;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: var(--card-bg-hover);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 15px var(--accent-soft);
}

.card-glow {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.game-card:hover .card-glow { opacity: 1; }

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

.game-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    color: #fff;
}

.game-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0 0 25px;
}

/* =========================================
   TARJETA DESTACADA · CAREER SIMULATOR
   (ocupa el ancho de 3 tarjetas)
   ========================================= */
.game-card.featured-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 34px;
    align-items: center;
    text-align: left;
    padding: 64px 36px 36px;
    border-radius: 24px;
    border: 1px solid var(--accent-line);
    background:
        radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
        var(--feat-bg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.game-card.featured-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-soft);
}

.card-badge.featured-flag {
    position: absolute;
    top: 20px;
    left: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--badge-bg);
    border: 1px solid var(--accent);
    border-radius: 50px;
    padding: 6px 16px;
    color: var(--badge-fg);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 0 14px 1px var(--accent-soft);
    z-index: 10;
}

.featured-main {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.featured-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 14px;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5));
}

.featured-title {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -1.2px;
    line-height: 1.05;
    margin: 0 0 14px;
    color: #fff;
}

.featured-desc {
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 20px;
    max-width: 54ch;
}

.featured-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
}

.featured-facts li {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50px;
    padding: 6px 13px;
}

.featured-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--cta-bg);
    color: var(--cta-fg);
    font-weight: 900;
    font-size: 0.95rem;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--accent-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-card:hover .featured-action {
    transform: translateX(4px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.featured-card:hover .featured-action svg { transform: none; }

/* --- LÍNEA TEMPORAL DE LA CARRERA --- */
.career-track {
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: var(--track-bg);
    padding: 22px 20px;
    min-width: 0;
}

.track-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.track-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 20px;
    position: relative;
}

.track-list::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    opacity: 0.6;
}

.track-step {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-size: 0.87rem;
}

.track-step::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg-black);
    border: 2px solid var(--accent-line);
}

.track-step.is-peak::before {
    border-color: var(--accent-peak);
    box-shadow: 0 0 10px var(--accent-soft);
}

.track-step.is-end::before { border-color: rgba(255, 255, 255, 0.25); }

.track-age {
    font-weight: 900;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.track-event {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-ovr {
    font-weight: 800;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 3px 8px;
    min-width: 38px;
    text-align: center;
}

.track-step.is-peak .track-ovr {
    color: var(--accent-peak);
    background: var(--accent-soft);
}

.track-step.is-end .track-ovr { color: rgba(255, 255, 255, 0.35); }

@media (max-width: 880px) {
    .game-card.featured-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 58px 24px 28px;
    }

    .card-badge.featured-flag { left: 24px; }

    .featured-desc { font-size: 0.96rem; }
}

@media (max-width: 420px) {
    .track-event { font-size: 0.8rem; }
    .career-track { padding: 18px 14px; }
}

/* --- ETIQUETA "DAILY" --- */
.card-badge.daily {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--badge-bg);
    border: 1px solid var(--accent);
    border-radius: 50px;
    padding: 6px 16px;
    color: var(--badge-fg);
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 0 10px 1px var(--accent-soft);
    z-index: 10;
}

/* --- CARD ACTION (BOTTOM) --- */
.card-action {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.play-text {
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.game-card:hover .card-action {
    color: var(--accent);
    border-top-color: var(--accent-line);
}

.card-action svg { transition: transform 0.3s ease; }

.game-card:hover svg { transform: translateX(5px); }

/* =========================================
   FAQ SECTION
   ========================================= */
.faq-section {
    width: 100%;
    margin: 4rem 0 0 0;
    padding: 4rem 2rem;
    border-top: 1px solid var(--accent-line);
    border-bottom: 1px solid var(--accent-line);
    background: rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.faq-title .accent { color: var(--accent); }

.faq-question {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    letter-spacing: -0.3px;
}

.faq-answer {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 70ch;
}

.faq-answer strong {
    color: #fff;
    font-weight: 700;
}

/* =========================================
   COMING SOON & LOCKED CARDS
   ========================================= */
.card-badge.coming-soon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #111;
    border: 1px solid #666;
    border-radius: 50px;
    padding: 6px 16px;
    color: #999;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 10;
}

.game-card.locked {
    cursor: not-allowed !important;
    background: rgba(5, 5, 5, 0.8) !important;
    border: 1px dashed #333 !important;
    position: relative;
    z-index: 1;
}

.game-card.locked::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
    pointer-events: none;
    z-index: -1;
}

.game-card.locked > .card-icon,
.game-card.locked > .card-content {
    opacity: 0.45;
    filter: grayscale(0.8);
    transition: opacity 0.3s ease;
}

.game-card.locked:hover {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
    border-color: #555 !important;
}

.game-card.locked:hover > .card-icon,
.game-card.locked:hover > .card-content { opacity: 0.6; }

.game-card.locked .card-glow { display: none !important; }
.game-card.locked .card-action { color: #555 !important; border-top-color: #333 !important; }
.game-card.locked:hover svg { transform: none !important; }

/* =========================================
   LEAGUES BAR (HORIZONTAL)
   ========================================= */
.leagues-bar {
    display: flex;
    flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    max-width: 760px;
    margin: 0 auto 2.5rem auto;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.league-item {
    flex: 1 1 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}

.league-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.league-item:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.league-item.active {
    background: linear-gradient(to bottom, transparent, var(--accent-soft));
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.league-item.locked {
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.25);
    background: rgba(5, 5, 5, 0.4);
}

.league-lock {
    color: #888;
    opacity: 0.7;
}

.league-item.locked:hover { background: rgba(255, 255, 255, 0.02); }

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .hub-container { padding: 2rem 1rem 3.5rem; }
    .hub-subtitle { margin-bottom: 2rem; }

    /* Fila deslizable: en columna cada liga medía 130px de alto */
    .leagues-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .leagues-bar::-webkit-scrollbar { display: none; }
    .leagues-bar .league-item { flex: 0 0 auto; padding: 12px 14px; white-space: nowrap; }

    .league-item:not(:last-child)::after { display: none; }

    .league-item.active { box-shadow: inset 0 -3px 0 var(--accent); }

    .faq-section { padding: 3rem 1.25rem; }
}

/* --- MOVIMIENTO REDUCIDO --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- MÁS LIGAS (ligas que vendrán) --- */
.more-leagues {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: -8px auto 26px;
    max-width: 100%;
}
.more-leagues-label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-secondary, #8b949e);
}
.more-leagues { width: 100%; }
.leagues-bar.leagues-more { margin: 0 auto; flex-wrap: nowrap; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.leagues-bar.leagues-more::-webkit-scrollbar { display: none; }
.leagues-bar.leagues-more .league-item { flex: 0 0 auto; white-space: nowrap; padding: 10px 18px; font-size: .9rem; }
.card-badge.featured-flag { white-space: nowrap; }
.game-card .card-badge.featured-flag { width: max-content; height: auto; }

/* =========================================
   LEAGUES BAR POR NIVELES
   Fila 1: América · Fila 2: Finlandia, Suiza, Alemania, Suecia
   Fila 3: Eslovaquia, Chequia, Austria
   ========================================= */
.leagues-bar.tiered {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    flex-wrap: initial;
    overflow: hidden;
}
.leagues-bar.tiered .league-item { padding: 14px 8px; min-width: 0; white-space: nowrap; }
.leagues-bar.tiered .league-item::after { display: none; }
.leagues-bar.tiered .tier-1 { grid-column: span 12; font-size: 1.05rem; padding: 16px 10px; }
.leagues-bar.tiered .tier-2 { grid-column: span 3; }
.leagues-bar.tiered .tier-3 { grid-column: span 4; font-size: .88rem; }
.leagues-bar.tiered .tier-2,
.leagues-bar.tiered .tier-3 { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.leagues-bar.tiered .tier-2 + .tier-2,
.leagues-bar.tiered .tier-3 + .tier-3 { border-left: 1px solid rgba(255, 255, 255, 0.08); }

@media (max-width: 600px) {
    .leagues-bar.tiered { flex-direction: initial; overflow: hidden; }
    .leagues-bar.tiered .league-item { padding: 12px 6px; font-size: .85rem; gap: 6px; }
    .leagues-bar.tiered .tier-1 { font-size: .98rem; }
    .leagues-bar.tiered .tier-2 { grid-column: span 6; }
    .leagues-bar.tiered .tier-1 + .tier-2 + .tier-2 + .tier-2 { border-left: 0; }
    .leagues-bar.tiered .league-item.active { box-shadow: inset 0 -3px 0 var(--accent, rgba(0, 242, 255, 0.8)); }
}
