/* =========================================================
   Discover Play Hub — Global Theme (drop-in replacement)
   Palette: teal + gold + plum | Framework tokens preserved
   ========================================================= */

/* ---------- CSS Variables (framework --ffg-* tokens) ---------- */
:root {
    /* Core brand */
    --ffg-primary-900: #0B2030;
    --ffg-primary-800: #123452;
    --ffg-primary-700: #0F4C81;
    --ffg-primary-600: #1497A9;
    --ffg-primary-500: #17B1C4;
    --ffg-primary-300: #72E5F2;
    /* Accents */
    --ffg-gold-700: #C8851A;
    --ffg-gold-600: #E3A12D;
    --ffg-gold-500: #F6BD3A;
    --ffg-gold-300: #F9D97E;
    --ffg-plum-600: #6F2DBD;
    --ffg-magenta-500: #B83E95;
    --ffg-red-500: #F0634C;
    /* Neutrals */
    --ffg-ink-900: #0C1116;
    --ffg-ink-700: #1A2430;
    --ffg-ink-600: #223040;
    --ffg-ink-500: #2A3644;
    --ffg-cloud-000: #FFFFFF;
    --ffg-cloud-100: #F6F8FA;
    --ffg-cloud-200: #ECF1F5;
    --ffg-cloud-300: #E1E8EE;
    /* Layout */
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;
    /* Shadows */
    --shadow-soft: 0 4px 16px rgba(0,0,0,.18);
    --shadow-elev: 0 10px 28px rgba(0,0,0,.25);
}

/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}


/* ===== GAME MODAL ===== */
.game-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0,0,0,0.86);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

    .game-modal-overlay.open {
        display: flex;
    }

.game-modal-window {
    background: #0C1116;
    border-radius: 16px;
    width: min(1100px, 95%);
    height: min(90vh, 800px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}


/* FIX spotlight picks square images */
.games-collection-wrapper.layout-simple_row_scroll .game-row-simple a {
    display: block;
    width: 140px; /* control size */
    height: 140px;
}

.games-collection-wrapper.layout-simple_row_scroll .game-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.icon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 20px;
    margin-top: 24px;
}

.icon-feature {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

    .icon-feature h3 {
        margin-top: 12px;
        font-weight: 700;
    }

    .icon-feature p {
        margin-top: 4px;
        opacity: .85;
    }


.game-modal-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    padding: 14px 20px;
}

.game-modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 34px;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
}

.game-modal-frame-wrapper {
    flex: 1;
    background: #000;
}

#game-modal-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

html, body {
    height: 100%;
}

html, body {
    background: var(--ffg-cloud-100);
    color: var(--ffg-ink-700);
    margin: 0;
    font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    line-height: 1.55;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--ffg-primary-600);
    text-decoration: none;
}

    a:hover {
        color: var(--ffg-primary-500);
    }

section {
    padding: 56px 0;
}

.section-dark {
    background: var(--ffg-ink-900);
    color: #fff;
}

.section-leaf {
    background: linear-gradient(180deg,var(--ffg-primary-900),var(--ffg-primary-700));
    color: #fff;
}

.section-cloud {
    background: var(--ffg-cloud-000);
}

.section-title {
    font-weight: 900;
    font-size: 2.4rem;
    margin: 0 0 10px;
}

.section-sub {
    opacity: .86;
    max-width: 740px;
    margin: 0 auto 28px;
}

/* ---------- Buttons ---------- */
.btn, .cta, .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: .02em;
    transition: transform .08s ease, opacity .2s ease, filter .2s ease, box-shadow .2s ease;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: linear-gradient(90deg,var(--ffg-primary-700),var(--ffg-primary-500));
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--ffg-cloud-300);
    color: var(--ffg-ink-700);
}

.btn-accent, .cta, .cta-button {
    color: #111;
    background: linear-gradient(90deg,var(--ffg-gold-700),var(--ffg-gold-500));
    box-shadow: 0 6px 20px rgba(245,194,66,.35);
}

    .cta:hover, .cta-button:hover {
        transform: translateY(-2px);
        filter: saturate(1.08);
        box-shadow: 0 10px 28px rgba(245,194,66,.45);
    }

    .cta-button.secondary {
        color: #fff;
        background: linear-gradient(90deg,var(--ffg-plum-600),var(--ffg-magenta-500));
        box-shadow: 0 10px 28px rgba(111,45,189,.35);
    }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(140%) blur(8px);
    background: color-mix(in srgb, var(--ffg-cloud-000) 78%, transparent);
    border-bottom: 1px solid var(--ffg-cloud-300);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .brand img {
        height: 40px;
        width: auto;
    }

    .brand .site-name {
        font-weight: 900;
        font-size: 1.25rem;
        color: var(--ffg-primary-700);
    }

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

    .nav-links a {
        font-weight: 700;
        color: var(--ffg-ink-700);
        padding: 8px 10px;
        border-radius: 10px;
    }

        .nav-links a:hover {
            background: var(--ffg-cloud-200);
        }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--ffg-ink-700);
}

@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    background: linear-gradient(180deg,var(--ffg-ink-900), var(--ffg-ink-700));
    color: #fff;
}

    .mobile-menu.open {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        padding: 40px;
    }

    .mobile-menu a {
        color: #fff;
        font-size: 1.5rem;
        font-weight: 800;
    }

.mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 36px;
    color: #fff;
}

/* ---------- Hero (banner_character + hero.php) ---------- */
.hero-intro {
    background: radial-gradient(1000px 800px at 10% -10%, rgba(23,177,196,.35), transparent), radial-gradient(900px 700px at 90% -20%, rgba(246,189,58,.15), transparent), linear-gradient(180deg, var(--ffg-primary-900), var(--ffg-primary-700));
    color: #fff;
}

    .hero-intro .title,
    .hero-intro h1,
    .hero-intro h2 {
        color: #fff;
    }

    .hero-intro p,
    .hero-intro .subtitle {
        color: #E8F3F7;
    }

.mascot-hero {
    max-width: 420px;
    width: 36vw;
    min-width: 260px;
    filter: drop-shadow(0 16px 40px rgba(0,0,0,.25));
}

@media (max-width:900px) {
    .mascot-hero {
        width: 60vw;
        margin: 12px auto 0;
    }
}

.banner-character {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 28px;
    align-items: center;
}

    .banner-character .character {
        background: linear-gradient(180deg, rgba(246,189,58,.12), rgba(23,177,196,.08));
        border: 1px dashed rgba(0,0,0,.08);
    }

/* ---------- Icon Features ---------- */
.icon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 18px;
    margin-top: 24px;
}

.icon-feature {
    padding: 16px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--ffg-cloud-300);
    box-shadow: var(--shadow-soft);
}

    .icon-feature h3 {
        margin: 8px 0 6px;
        font-size: 1.05rem;
        color: var(--ffg-ink-700);
    }

    .icon-feature p {
        margin: 0;
        color: var(--ffg-ink-600);
    }

/* ---------- Simple Row Scroll ---------- */
.games-collection-wrapper.layout-simple_row_scroll .game-row-simple {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 2px 14px;
    scroll-snap-type: x mandatory;
}

    .games-collection-wrapper.layout-simple_row_scroll .game-row-simple::-webkit-scrollbar {
        display: none;
    }

.games-collection-wrapper.layout-simple_row_scroll .game-row-item {
    flex: 0 0 180px;
    scroll-snap-align: start;
}

@media (min-width:768px) {
    .games-collection-wrapper.layout-simple_row_scroll .game-row-item {
        flex-basis: 220px;
    }

    .games-collection-wrapper.layout-simple_row_scroll .game-row-simple {
        gap: 18px;
    }
}

.games-collection-wrapper.layout-simple_row_scroll .game-card-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 16px;
}

/* ---------- Reviews ---------- */
.reviews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

    .reviews .review-item {
        display: grid;
        grid-template-columns: 48px 1fr 120px;
        align-items: center;
        gap: 14px;
    }

    .reviews .avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: var(--ffg-primary-500);
        color: #fff;
        font-weight: 900;
    }

    .reviews .stars i {
        color: var(--ffg-gold-500);
    }

/* ---------- detailed_grid_4col_video (FINAL CLEAN VERSION) ---------- */
.games-collection-wrapper.layout-detailed_grid_4col_video .game-grid,
.games-collection-wrapper.layout-detailed_grid_4col_video .games-grid,
.games-collection-wrapper.layout-detailed_grid_4col_video .collection-body,
.games-collection-wrapper.layout-detailed_grid_4col_video > .games-collection {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    align-items: stretch;
}

.games-collection-wrapper.layout-detailed_grid_4col_video .game-card,
.games-collection-wrapper.layout-detailed_grid_4col_video .game-card-detailed {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0A1C17;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

/* Thumbnails */
.games-collection-wrapper.layout-detailed_grid_4col_video .thumb,
.games-collection-wrapper.layout-detailed_grid_4col_video .game-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

    /* <img> or <video> */
    .games-collection-wrapper.layout-detailed_grid_4col_video .thumb img,
    .games-collection-wrapper.layout-detailed_grid_4col_video .game-thumb img,
    .games-collection-wrapper.layout-detailed_grid_4col_video .thumb video,
    .games-collection-wrapper.layout-detailed_grid_4col_video .game-thumb video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* background-image thumbs */
    .games-collection-wrapper.layout-detailed_grid_4col_video .thumb[style*="background"],
    .games-collection-wrapper.layout-detailed_grid_4col_video .game-thumb[style*="background"] {
        background-size: cover !important;
        background-position: center !important;
    }

/* Meta / Title / CTA */
.games-collection-wrapper.layout-detailed_grid_4col_video .meta,
.games-collection-wrapper.layout-detailed_grid_4col_video .game-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 14px;
    color: #fff;
    margin-top: auto;
}

.games-collection-wrapper.layout-detailed_grid_4col_video .title,
.games-collection-wrapper.layout-detailed_grid_4col_video .game-title {
    font-weight: 900;
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.games-collection-wrapper.layout-detailed_grid_4col_video .game-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .92rem;
    opacity: .9;
}

.games-collection-wrapper.layout-detailed_grid_4col_video .game-rating i {
    color: var(--ffg-gold-500);
}

/* CTA alignment */
.games-collection-wrapper.layout-detailed_grid_4col_video .cta-button {
    align-self: flex-start;
    margin-top: auto;
    color: #111;
    background: linear-gradient(90deg,var(--ffg-gold-700),var(--ffg-gold-500));
    box-shadow: 0 6px 20px rgba(245,194,66,.35);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
}

/* Hide autoplay videos */
.games-collection-wrapper.layout-detailed_grid_4col_video video {
    display: none !important;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ffg-ink-900);
    color: #b7c2cf;
    padding: 44px 20px;
    text-align: center;
}

    .site-footer .footer-logo {
        max-height: 50px;
        margin: 0 auto 12px;
    }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    justify-content: center;
    margin: 12px 0;
}

    .footer-links a {
        color: #fff;
        font-weight: 700;
    }

        .footer-links a:hover {
            color: var(--ffg-gold-500);
        }

.responsible-gaming-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

    .responsible-gaming-logos img {
        max-height: 36px;
        filter: grayscale(100%);
        opacity: .8;
        transition: all .2s;
    }

        .responsible-gaming-logos img:hover {
            filter: none;
            opacity: 1;
        }

.footer-disclaimer-full p {
    font-size: .85rem;
    color: #9fb1c3;
    line-height: 1.5;
}

/* Remove accidental gap above footer */
main > section:last-of-type {
    padding-bottom: 70px;
    margin-bottom: 0;
}

/* ---------- Cookie & Age Gate ---------- */
#cookie-popup {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12,17,22,.98);
    color: #fff;
    padding: 18px;
    z-index: 1200;
    display: none;
}

/* ---------- Utilities ---------- */
.text-center {
    text-align: center;
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

/* ---------- Home-only stray loader fix ---------- */
body.page-home #gameMount,
body.page-home #gameFrame,
body.page-home .game-loader,
body.page-home .loading-game {
    display: none !important;
}
