/* ========================================
   DEFAULT DARK MODE
======================================== */

html {
    color-scheme: dark;
}

body {
    margin: 0;
    background: #0b1123;
    color: #ffffff;
    transition: background .25s ease, color .25s ease;
}


/* ========================================
   LIGHT MODE
======================================== */

html[data-theme="light"] {
    color-scheme: light;
}

    html[data-theme="light"] body {
        background: #f3f6fb;
        color: #172037;
    }


    /* HEADER */

    html[data-theme="light"] .store-header {
        background: rgba(255,255,255,.96) !important;
        border-bottom-color: rgba(20,35,70,.10) !important;
    }

    html[data-theme="light"] .brand-name {
        color: #13203c !important;
    }

    html[data-theme="light"] .brand-tagline {
        color: #697797 !important;
    }

    html[data-theme="light"] .language-button,
    html[data-theme="light"] .theme-button {
        background: #eef2f8 !important;
        border-color: rgba(20,35,70,.12) !important;
        color: #172037 !important;
    }


    /* CATEGORY BAR */

    html[data-theme="light"] .category-tabs {
        background: rgba(255,255,255,.97) !important;
        border-color: rgba(20,35,70,.08) !important;
    }

    html[data-theme="light"] .tab {
        color: #566681 !important;
    }

        html[data-theme="light"] .tab.active {
            color: #009fc9 !important;
        }


    /* MAIN PAGE */

    html[data-theme="light"] .store-page {
        background: linear-gradient( 180deg, #f4f7fc, #eaf0f8 ) !important;
    }


    /* SECTION TITLES */

    html[data-theme="light"] .section-header h2 {
        color: #172037 !important;
    }

    html[data-theme="light"] .section-header p {
        color: #64718c !important;
    }


    /* PRODUCT CARDS */

    html[data-theme="light"] .package-card {
        background: linear-gradient( 180deg, #ffffff, #f6f8fc ) !important;
        border-color: rgba(20,35,70,.10) !important;
        box-shadow: 0 12px 28px rgba(27,46,85,.08) !important;
    }

    html[data-theme="light"] .uc-amount {
        color: #172037 !important;
    }

    html[data-theme="light"] .game-label {
        color: #697797 !important;
    }


    /* CHECKOUT */

    html[data-theme="light"] .checkout-card,
    html[data-theme="light"] .success-card {
        background: #ffffff !important;
        border-color: rgba(20,35,70,.10) !important;
        color: #172037 !important;
    }

        html[data-theme="light"] .checkout-card h2,
        html[data-theme="light"] .success-card h2 {
            color: #172037 !important;
        }

/* =========================================================
   V26.7 DESIGN 1 — MODERN & CLEAN
   Visual-only redesign. No storefront features are added.
   ========================================================= */
:root {
    --ds-blue: #0f6fff;
    --ds-blue-dark: #075ad6;
    --ds-blue-soft: #eef5ff;
    --ds-navy: #10213f;
    --ds-text: #17243a;
    --ds-muted: #6f7f95;
    --ds-bg: #f5f9ff;
    --ds-surface: #ffffff;
    --ds-border: #dce7f5;
    --ds-border-soft: #eaf0f7;
    --ds-success: #1fa968;
    --ds-danger: #d84455;
    --ds-shadow: 0 14px 36px rgba(28, 73, 132, .08);
    --ds-shadow-soft: 0 7px 20px rgba(28, 73, 132, .055);
}

html { color-scheme: light; }
body {
    background: var(--ds-bg) !important;
    color: var(--ds-text) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

/* Header */
.store-header {
    background: rgba(255,255,255,.97) !important;
    border-bottom: 1px solid var(--ds-border-soft) !important;
    box-shadow: 0 4px 18px rgba(31, 66, 113, .05) !important;
}
.header-inner { min-height: 76px !important; }
.brand-name { color: var(--ds-navy) !important; }
.brand-tagline { color: #708099 !important; }
.nav-link { color: #42516a !important; }
.nav-link:hover,
.nav-link.active { color: var(--ds-blue) !important; }
.nav-link::after { background: var(--ds-blue) !important; }
.quick-actions {
    min-height: 46px !important;
    background: var(--ds-blue) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 18px rgba(15,111,255,.18) !important;
}
.duluf-account-dropdown,
.mobile-menu-panel {
    border-color: var(--ds-border) !important;
    box-shadow: var(--ds-shadow) !important;
}

/* Hero — same current hero/content, Design 1 styling */
.game-hero {
    height: 390px !important;
    background: #eaf5ff !important;
    border-bottom: 1px solid #e3edf8 !important;
}
.hero-content-overlay {
    background: linear-gradient(90deg, rgba(246,251,255,.99) 0%, rgba(246,251,255,.94) 29%, rgba(246,251,255,.58) 43%, rgba(246,251,255,.08) 62%, transparent 72%) !important;
}
.hero-container {
    width: min(1460px, calc(100% - 56px)) !important;
    grid-template-columns: minmax(390px, .9fr) minmax(260px, 1fr) 280px !important;
}
.hero-kicker { color: var(--ds-blue) !important; }
.hero-copy h1 {
    font-size: clamp(48px, 4.7vw, 72px) !important;
    line-height: .96 !important;
}
.blue-title,
.dark-title { color: var(--ds-navy) !important; }
.title-accent { display: none !important; }
.hero-description { color: #53647d !important; }
.hero-cta,
.topup-button,
.disabled-topup-button,
.pay-button,
.done-button,
.continue-payment,
.login-submit,
.register-primary,
.forgot-submit,
.verify-submit,
.change-primary {
    background: var(--ds-blue) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 9px 20px rgba(15,111,255,.18) !important;
}
.hero-cta:hover,
.topup-button:hover:not(:disabled),
.pay-button:hover:not(:disabled),
.done-button:hover,
.continue-payment:hover,
.login-submit:hover:not(:disabled),
.register-primary:hover:not(:disabled),
.forgot-submit:hover:not(:disabled),
.verify-submit:hover:not(:disabled),
.change-primary:hover:not(:disabled) {
    background: var(--ds-blue-dark) !important;
    box-shadow: 0 12px 24px rgba(15,111,255,.22) !important;
}
.benefits-panel {
    padding: 18px !important;
    border: 1px solid rgba(255,255,255,.8) !important;
    background: rgba(255,255,255,.88) !important;
    color: var(--ds-navy) !important;
    box-shadow: var(--ds-shadow-soft) !important;
}
.benefit-icon { background: var(--ds-blue-soft) !important; color: var(--ds-blue) !important; }
.benefit-icon.orange { color: var(--ds-blue) !important; }
.benefit-item span { color: #718096 !important; }
.benefit-divider { background: var(--ds-border-soft) !important; }

/* Page/purchase shell */
.home-page {
    /* V29.9: keep Home on the same warm storefront surface used by How It Works/Help Center.
       This intentionally overrides the older V27 blue page shell. */
    background: radial-gradient(circle at 12% 20%, rgba(255,185,76,.08), transparent 28%),
                radial-gradient(circle at 88% 34%, rgba(38,106,255,.07), transparent 30%),
                linear-gradient(180deg, #fffdf8 0%, #fffaf2 46%, #fffdf9 100%) !important;
}
.home-content { padding-top: 24px !important; }
.purchase-area {
    border: 1px solid var(--ds-border) !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: var(--ds-shadow) !important;
}
.section-heading h2,
.empty-checkout h2,
.checkout-title-row h2 { color: var(--ds-navy) !important; }
.section-heading p,
.empty-checkout p,
.checkout-header p { color: var(--ds-muted) !important; }
.heading-icon,
.small-label { color: var(--ds-blue) !important; }

/* Packages */
.packages-grid { gap: 12px !important; }
.package-card {
    border: 1px solid var(--ds-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.package-card:hover:not(:disabled) {
    border-color: #9ec4ff !important;
    box-shadow: 0 10px 24px rgba(15,111,255,.10) !important;
}
.package-card.selected {
    border-color: var(--ds-blue) !important;
    background: #f5f9ff !important;
    box-shadow: 0 0 0 2px rgba(15,111,255,.08) !important;
}
.package-amount { color: var(--ds-navy) !important; }
.package-price,
.package-card.selected .package-price { color: var(--ds-blue) !important; }
.popular-badge { background: #ff7a1a !important; }
.selected-check { background: var(--ds-blue) !important; }

/* Trust row */
.trust-strip {
    border-color: var(--ds-border-soft) !important;
    background: #f8fbff !important;
    box-shadow: none !important;
}
.trust-item { color: #52627a !important; }
.trust-icon { color: var(--ds-blue) !important; }
.trust-divider { background: #dce7f4 !important; }

/* Checkout/player */
.checkout-panel,
.empty-checkout {
    border: 1px solid var(--ds-border) !important;
    background: #fff !important;
    box-shadow: var(--ds-shadow-soft) !important;
}
.selected-package {
    border-color: var(--ds-border-soft) !important;
    background: #f8fbff !important;
}
.selected-package-info strong { color: var(--ds-navy) !important; }
.selected-package-price { color: var(--ds-blue) !important; }
.input-shell,
.fake-input,
.login-field input,
.register-field input,
.forgot-field input,
.verify-field input,
.change-field input {
    border-color: #cfdced !important;
    background: #fff !important;
    color: var(--ds-text) !important;
}
.input-shell:focus-within,
.login-field input:focus,
.register-field input:focus,
.forgot-field input:focus,
.verify-field input:focus,
.change-field input:focus {
    border-color: var(--ds-blue) !important;
    box-shadow: 0 0 0 3px rgba(15,111,255,.10) !important;
}
.security-box,
.security-note {
    border-color: #cfe0ff !important;
    background: #f3f7ff !important;
}
.security-icon { background: var(--ds-blue) !important; }

/* Lower content */
.how-it-works-card,
.trusted-card {
    border: 1px solid var(--ds-border) !important;
    background: #fff !important;
    color: var(--ds-text) !important;
    box-shadow: var(--ds-shadow-soft) !important;
}
.trusted-heading,
.stat-item strong { color: var(--ds-navy) !important; }
.stat-item span { color: var(--ds-muted) !important; }
.stat-icon { color: var(--ds-blue) !important; }
.stat-separator { background: var(--ds-border-soft) !important; }
.step-number { background: var(--ds-blue) !important; }
.step-icon,
.step-icon.orange { background: var(--ds-blue-soft) !important; color: var(--ds-blue) !important; }

/* Payment/success/orders */
.payment-modal,
.success-modal,
.orders-dialog,
.order-card {
    border: 1px solid var(--ds-border) !important;
    background: #fff !important;
    box-shadow: var(--ds-shadow) !important;
}
.payment-summary { background: var(--ds-navy) !important; }
.payment-method { border-color: var(--ds-border) !important; background: #f8fbff !important; }
.payment-method.selected { border-color: var(--ds-blue) !important; background: #eef5ff !important; }
.orders-content { background: #f7faff !important; }
.order-notice { border-color: #dbe8f8 !important; background: #f3f7fc !important; color: #52647d !important; }

/* Authentication modals */
.login-backdrop,
.register-backdrop,
.forgot-backdrop,
.verify-backdrop,
.change-backdrop,
.orders-backdrop,
.payment-modal::before { backdrop-filter: blur(4px); }
.login-modal,
.register-modal,
.forgot-modal,
.verify-modal,
.change-modal {
    border: 1px solid var(--ds-border) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 28px 70px rgba(24,55,98,.17) !important;
}
.login-heading h2,
.register-heading h2,
.forgot-heading h2,
.verify-heading h2,
.change-heading h2 { color: var(--ds-navy) !important; }
.login-heading p,
.register-heading p,
.forgot-heading p,
.verify-heading p,
.change-heading p { color: var(--ds-muted) !important; }
.login-logo,
.register-logo,
.forgot-logo,
.verify-logo,
.change-logo { background: var(--ds-blue-soft) !important; color: var(--ds-blue) !important; }
.register-password-guide,
.change-password-guide { border-color: var(--ds-border) !important; background: #f8fbff !important; }

/* Consistent focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(15,111,255,.24) !important;
    outline-offset: 2px;
}

/* Tablet */
@media (max-width: 1150px) {
    .game-hero { height: 360px !important; }
    .hero-container { grid-template-columns: minmax(350px, .9fr) 1fr !important; }
    .benefits-panel { display: none !important; }
}

/* Mobile: PLAYER FIRST, then package selection — requested flow */
@media (max-width: 800px) {
    .header-inner {
        width: min(100% - 24px, 1460px) !important;
        min-height: 66px !important;
        gap: 12px !important;
    }
    .brand-logo { width: 66px !important; height: 40px !important; }
    .brand-name { font-size: 15px !important; }
    .brand-tagline { font-size: 7px !important; margin-top: 3px !important; }
    .game-hero { height: 250px !important; }
    .hero-background { background-position: 64% center !important; }
    .hero-content-overlay {
        background: linear-gradient(90deg, rgba(246,251,255,.98) 0%, rgba(246,251,255,.91) 47%, rgba(246,251,255,.18) 75%, transparent 100%) !important;
    }
    .hero-container {
        width: calc(100% - 28px) !important;
        display: block !important;
        padding-top: 30px !important;
    }
    .hero-copy { width: 62% !important; }
    .hero-kicker { font-size: 8px !important; }
    .hero-copy h1 { font-size: clamp(27px, 8.5vw, 40px) !important; line-height: 1 !important; }
    .hero-description { margin: 9px 0 13px !important; font-size: 11px !important; }
    .hero-cta { min-width: 135px !important; min-height: 42px !important; padding: 0 16px !important; gap: 9px !important; border-radius: 9px !important; font-size: 12px !important; }

    .purchase-area {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 10px !important;
        border-radius: 16px !important;
    }
    .checkout-panel-shell { order: 1 !important; width: 100% !important; }
    .package-panel { order: 2 !important; width: 100% !important; }
    .checkout-panel,
    .empty-checkout { min-height: 0 !important; padding: 16px !important; border-radius: 14px !important; }
    .checkout-header { margin-bottom: 12px !important; }
    .selected-package { margin-bottom: 12px !important; }
    .section-heading { margin-top: 4px !important; }
    .section-heading h2 { font-size: 19px !important; }
    .trust-strip { margin-top: 10px !important; }

    .payment-modal,
    .success-modal,
    .orders-dialog,
    .login-modal,
    .register-modal,
    .forgot-modal,
    .verify-modal,
    .change-modal {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        max-height: calc(100dvh - 20px) !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 520px) {
    .home-content { width: calc(100% - 12px) !important; }
    .game-hero { height: 230px !important; }
    .hero-copy { width: 67% !important; }
    .hero-copy h1 { font-size: 27px !important; }
    .hero-description br { display: none; }
    .packages-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 7px !important; }
    .package-card { min-width: 0 !important; padding-left: 6px !important; padding-right: 6px !important; }
    .package-amount { font-size: 13px !important; }
    .package-price { font-size: 14px !important; }
    .uc-art { transform: scale(.9); }
}


/* =========================================================
   V27.1 LAYOUT OVERRIDES
   The hero component owns its responsive height.
   ========================================================= */
.game-hero {
    height: auto !important;
    min-height: 0 !important;
}

.home-content {
    padding-top: 18px !important;
}

@media (max-width: 800px) {
    .game-hero { height: auto !important; }
    .home-content { padding-top: 12px !important; }
}

@media (max-width: 520px) {
    .game-hero { height: auto !important; }
}


/* V27.2: hero is rendered only when Admin has active slides. */


/* =========================================================
   V27.4 FINAL STOREFRONT SAFEGUARDS
   ========================================================= */
.game-hero {
    height: auto !important;
    min-height: 0 !important;
}

.player-id-bar-icon,
.player-id-bar-icon svg {
    max-width: 44px !important;
    max-height: 44px !important;
}

.player-id-bar-icon svg {
    width: 23px !important;
    height: 23px !important;
    display: block;
    fill: none !important;
    stroke: currentColor !important;
}

@media (max-width: 800px) {
    .player-id-bar-icon,
    .player-id-bar-icon svg {
        max-width: 40px !important;
        max-height: 40px !important;
    }
    .player-id-bar-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
}


/* =========================================================
   V27.5 MOBILE FIT / NO FRAME OVERLAP
   ========================================================= */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

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

.home-page,
.store-header,
.game-hero,
.hero-slider,
.home-content,
.player-id-bar,
.purchase-area,
.package-panel,
.checkout-panel-shell,
.lower-content,
.how-it-works-card,
.trusted-card {
    min-width: 0 !important;
    max-width: 100% !important;
}

.player-id-bar-icon {
    overflow: hidden !important;
}

.player-id-bar-icon svg,
.quick-modal-icon svg,
.quick-modal-input svg,
.player-id-modal svg {
    display: block !important;
    flex: 0 0 auto !important;
    max-width: 24px !important;
    max-height: 24px !important;
}

/* Every dialog stays inside the visual viewport. */
.quick-player-modal-backdrop,
.player-id-modal-backdrop {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.quick-player-modal,
.player-id-modal,
.payment-modal,
.success-modal,
.orders-dialog,
.login-modal,
.register-modal,
.forgot-modal,
.verify-modal,
.change-modal {
    width: min(560px, calc(100% - 24px)) !important;
    max-width: calc(100% - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 800px) {
    .home-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 10px 28px !important;
    }

    .player-id-bar {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .purchase-area,
    .purchase-area.browse-mode,
    .purchase-area.checkout-mode {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        overflow: visible !important;
    }

    .package-panel,
    .checkout-panel-shell {
        width: 100% !important;
        min-width: 0 !important;
    }

    .packages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .package-card {
        width: 100% !important;
        min-width: 0 !important;
    }

    .trust-strip {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .trust-divider { display: none !important; }
    .trust-item { white-space: normal !important; text-align:center !important; }

    .lower-content,
    .steps-grid,
    .stats-grid {
        width: 100% !important;
        min-width: 0 !important;
    }

    .quick-player-modal,
    .player-id-modal,
    .payment-modal,
    .success-modal,
    .orders-dialog,
    .login-modal,
    .register-modal,
    .forgot-modal,
    .verify-modal,
    .change-modal {
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin: 8px auto !important;
    }
}

@media (max-width: 360px) {
    .packages-grid { grid-template-columns: 1fr !important; }
    .home-content { padding-left: 8px !important; padding-right: 8px !important; }
}
