
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

 /*
 * HAPPY GAMES / GAMESFAN — LIGHT LAVENDER THEME
 * Load this stylesheet AFTER app.css.
 * Keeps existing HTML/JavaScript and gives this portal a distinct look
 * from the dark black-and-yellow GameA design.
 */

:root {
    --gf-bg: #f7f5ff;
    --gf-surface: #ffffff;
    --gf-surface-soft: #f0edff;
    --gf-text: #24213b;
    --gf-muted: #77748f;
    --gf-primary: #6d4aff;
    --gf-primary-hover: #5634e8;
    --gf-primary-soft: #ece7ff;
    --gf-border: #e7e2f5;
    --gf-green: #159b72;
    --gf-danger: #d9485f;
    --gf-shadow: 0 16px 45px rgba(55, 39, 111, .09);
}

html,
html.dark {
    color-scheme: light;
    background: var(--gf-bg);
}

html.dark body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 0%, rgba(159, 132, 255, .13), transparent 28rem),
        radial-gradient(circle at 100% 18%, rgba(255, 184, 219, .14), transparent 26rem),
        var(--gf-bg);
    color: var(--gf-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.dark #main-app,
html.dark main {
    color: var(--gf-text);
}

html.dark .bg-yellow-400,
html.dark .bg-yellow-300,
html.dark .hover\:bg-yellow-300:hover {
    background-color: var(--gf-primary);
    color: #fff;
}

html.dark .text-yellow-400,
html.dark .hover\:text-yellow-300:hover {
    color: var(--gf-primary);
}

html.dark .border-yellow-400,
html.dark .focus\:border-yellow-400:focus,
html.dark .hover\:border-yellow-400:hover {
    border-color: var(--gf-primary);
}

html.dark .focus\:ring-yellow-400:focus {
    --tw-ring-color: var(--gf-primary);
}

html.dark .shadow-yellow-400\/20 {
    --tw-shadow-color: rgba(109, 74, 255, .22);
    box-shadow: 0 10px 28px rgba(109, 74, 255, .18);
}

html.dark .text-white {
    color: var(--gf-text);
}

html.dark .text-gray-300 {
    color: #5f5b77;
}

html.dark .text-gray-400,
html.dark .text-gray-500,
html.dark .text-slate-500 {
    color: var(--gf-muted);
}

html.dark .text-black {
    color: #fff;
}

html.dark .bg-black,
html.dark .bg-black\/70,
html.dark .bg-slate-950,
html.dark .bg-slate-950\/80,
html.dark .bg-slate-950\/60,
html.dark .bg-gray-950,
html.dark .bg-gray-950\/95,
html.dark .bg-gray-900\/60,
html.dark .bg-slate-900\/80 {
    background-color: var(--gf-surface);
}

html.dark .bg-white\/5,
html.dark .bg-white\/10,
html.dark .bg-white\/\[0\.05\] {
    background-color: var(--gf-surface-soft);
}

html.dark .border-white\/5,
html.dark .border-white\/10,
html.dark .border-gray-800,
html.dark .border-gray-700 {
    border-color: var(--gf-border);
}

html.dark .bg-black\/75,
html.dark .bg-slate-950\/80,
html.dark .bg-gray-950\/95 {
    background-color: rgba(247, 245, 255, .88);
}

html.dark .glass-card,
html.dark .glass-nav {
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--gf-border);
    box-shadow: 0 8px 28px rgba(55, 39, 111, .06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

html.dark .glass-nav {
    background: rgba(255, 255, 255, .92);
}

html.dark nav,
html.dark #navbar {
    color: var(--gf-text);
    border-color: var(--gf-border);
}

html.dark .hero-mesh {
    background:
        radial-gradient(circle at 80% 20%, rgba(180, 160, 255, .42), transparent 19rem),
        radial-gradient(circle at 10% 100%, rgba(255, 204, 232, .52), transparent 21rem),
        linear-gradient(125deg, #ffffff 0%, #f0ecff 58%, #fdf1fa 100%);
    border: 1px solid var(--gf-border);
    box-shadow: var(--gf-shadow);
}

html.dark .hero-mesh h1,
html.dark .hero-mesh .text-white {
    color: var(--gf-text);
}

html.dark button {
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

html.dark button:focus-visible,
html.dark a:focus-visible,
html.dark input:focus-visible {
    outline: 3px solid rgba(109, 74, 255, .28);
    outline-offset: 3px;
}

html.dark button.bg-yellow-400,
html.dark button.hover\:bg-yellow-300,
html.dark a.bg-yellow-400 {
    background: var(--gf-primary);
    color: #fff;
    box-shadow: 0 9px 24px rgba(109, 74, 255, .18);
}

html.dark button.bg-yellow-400:hover,
html.dark button.hover\:bg-yellow-300:hover,
html.dark a.bg-yellow-400:hover {
    background: var(--gf-primary-hover);
    transform: translateY(-1px);
}

html.dark .cat-pill {
    background: #fff;
    color: var(--gf-muted);
    border: 1px solid var(--gf-border);
    box-shadow: none;
}

html.dark .cat-pill.active,
html.dark .cat-pill.bg-yellow-400 {
    background: var(--gf-primary);
    color: #fff;
    border-color: var(--gf-primary);
}

html.dark input,
html.dark select,
html.dark textarea {
    color: var(--gf-text);
    background-color: #fff;
    border-color: var(--gf-border);
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #a09bb5;
    opacity: 1;
}

html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px rgba(109, 74, 255, .12);
}

html.dark #login-screen,
html.dark #register-screen,
html.dark #search-modal,
html.dark #user-modal {
    background: rgba(39, 31, 69, .38);
}

html.dark #login-screen > div,
html.dark #register-screen > div,
html.dark #search-modal > div,
html.dark #user-modal > div {
    background: rgba(255, 255, 255, .97);
    border-color: var(--gf-border);
    box-shadow: 0 24px 70px rgba(43, 31, 88, .18);
}

html.dark #subscription-modal {
    background: rgba(39, 31, 69, .42);
}

html.dark #subscription-modal > div {
    background: #fff;
    border-color: var(--gf-border);
    box-shadow: 0 24px 70px rgba(43, 31, 88, .2);
}

html.dark #subscription-modal .text-gray-300 {
    color: #5f5b77;
}

html.dark #subscription-modal .text-white {
    color: var(--gf-text);
}

html.dark #subscription-modal .bg-white\/10 {
    background: var(--gf-primary-soft);
    color: var(--gf-primary);
}

html.dark #subscription-modal .border-yellow-400\/20 {
    border-color: var(--gf-border);
}

html.dark #subscription-modal .bg-yellow-400 {
    background: var(--gf-primary);
    color: #fff;
}

html.dark #game-modal {
    background: #f7f5ff;
}

html.dark #game-modal .glass-nav {
    background: #fff;
    border-color: var(--gf-border);
}

html.dark #game-modal .text-yellow-400 {
    color: var(--gf-primary);
}

html.dark #game-container-view {
    color: var(--gf-text);
}

html.dark #billing-history > div {
    border-color: var(--gf-border);
}

html.dark #subscription-status {
    color: var(--gf-green);
}

html.dark .text-cyber-emerald {
    color: var(--gf-green);
}

html.dark .bg-red-500\/10 {
    background: #fff0f2;
}

html.dark .border-red-500\/20 {
    border-color: #ffd2d9;
}

html.dark .text-red-400 {
    color: var(--gf-danger);
}

html.dark .bg-gradient-to-tr,
html.dark .bg-gradient-to-br {
    background-image: linear-gradient(135deg, #a995ff, #ffb9d9);
}

html.dark .shadow-2xl {
    box-shadow: var(--gf-shadow);
}

html.dark .shadow-lg {
    box-shadow: 0 8px 24px rgba(55, 39, 111, .10);
}

/* The game cards are generated by JavaScript, so style common card patterns too. */
html.dark #home-games-grid > *,
html.dark #all-games-grid > *,
html.dark #recommended-games-grid > *,
html.dark #search-results > * {
    color: var(--gf-text);
}

html.dark #home-games-grid .glass-card,
html.dark #all-games-grid .glass-card,
html.dark #recommended-games-grid .glass-card,
html.dark #search-results .glass-card {
    background: #fff;
    border-color: var(--gf-border);
}

html.dark #home-games-grid img,
html.dark #all-games-grid img,
html.dark #recommended-games-grid img,
html.dark #search-results img {
    border-radius: 1rem;
}

html.dark #home-games-grid button,
html.dark #all-games-grid button,
html.dark #recommended-games-grid button,
html.dark #search-results button {
    border-radius: 1rem;
}

html.dark #main-app > main {
    position: relative;
    z-index: 1;
}

html.dark .hidden {
    display: none !important;
}

html.dark #subscription-modal:not(.hidden) {
    display: flex;
}

@media (max-width: 640px) {
    html.dark #navbar > div {
        height: 4.5rem;
    }

    html.dark .hero-mesh {
        border-radius: 1.6rem;
        padding: 1.5rem;
    }

    html.dark #login-screen > div,
    html.dark #register-screen > div {
        padding: 1.5rem;
        border-radius: 1.75rem;
        max-height: calc(100dvh - 2rem);
        overflow-y: auto;
    }

    html.dark #subscription-modal > div {
        padding: 1.25rem;
        border-radius: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.dark *,
    html.dark *::before,
    html.dark *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}


/* Featured Game Banner */
.featured-banner {
    isolation: isolate;
    background: #111111;
    background-color: #111111;
}

.featured-banner-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.01);
    transition: background-image 0.3s ease;
}

/* Keep text readable over bright game artwork */
.featured-banner-overlay {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.94) 0%,
            rgba(0, 0, 0, 0.82) 35%,
            rgba(0, 0, 0, 0.48) 65%,
            rgba(0, 0, 0, 0.15) 100%
        ),
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.35),
            transparent 60%
        );
}

@media (max-width: 640px) {
    .featured-banner {
        min-height: 380px;
    }

    .featured-banner-image {
        background-position: center;
    }

    .featured-banner-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(0, 0, 0, 0.85),
                rgba(0, 0, 0, 0.45)
            ),
            linear-gradient(
                0deg,
                rgba(0, 0, 0, 0.8),
                transparent 100%
            );
    }
}



/* ==========================================
   GAMESFAN — SUBSCRIPTION MODAL
   Consolidated styles
========================================== */

/* Backdrop: same behaviour as login modal */
html.dark #subscription-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;

    align-items: center;
    justify-content: center;
    padding: 16px;

    background: rgba(39, 31, 69, 0.48) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
}

html.dark #subscription-modal.hidden {
    display: none !important;
}

html.dark #subscription-modal:not(.hidden) {
    display: flex !important;
}

/* Main panel */
html.dark #subscription-modal > .subscription-dialog {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: auto;
    padding: 28px;

    color: #ffffff;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(125, 91, 255, 0.18),
            transparent 48%
        ),
        linear-gradient(145deg, #211a38, #151124 78%);

    border: 1px solid rgba(173, 150, 255, 0.38);
    border-radius: 26px;

    box-shadow:
        0 30px 90px rgba(13, 8, 30, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.035),
        0 0 40px rgba(109, 74, 255, 0.12);

    animation: gfSubscriptionEnter 0.2s ease-out;
}

/* Close button */
html.dark #subscription-modal .subscription-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #c6bfdc;
    cursor: pointer;
}

html.dark #subscription-modal .subscription-close:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
}

/* Header */
html.dark #subscription-modal .subscription-header {
    text-align: center;
    padding: 4px 8px 24px;
}

html.dark #subscription-modal .subscription-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #a18bff, #6d4aff);
    color: #ffffff;
    font-size: 25px;
    box-shadow: 0 10px 28px rgba(109, 74, 255, 0.28);
}

html.dark #subscription-modal .subscription-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: #b7a4ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

html.dark #subscription-modal .subscription-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.7px;
    line-height: 1.2;
}

html.dark #subscription-modal .subscription-header p {
    max-width: 290px;
    margin: 10px auto 0;
    color: #b9b2cc;
    font-size: 13px;
    line-height: 1.7;
}

/* SMS panel */
html.dark #subscription-modal .sms-subscription-card {
    padding: 19px;
    border: 1px solid rgba(177, 153, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
}

html.dark #subscription-modal .sms-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

html.dark #subscription-modal .sms-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border-radius: 14px;
    background: rgba(133, 101, 255, 0.16);
    color: #c4b4ff;
}

html.dark #subscription-modal .sms-card-heading h3 {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
}

html.dark #subscription-modal .sms-card-heading p {
    margin: 4px 0 0;
    color: #a9a0c0;
    font-size: 11px;
}

html.dark #subscription-modal .sms-instruction {
    margin: 0 0 12px;
    color: #c0b8d4;
    text-align: center;
    font-size: 12px;
}

html.dark #subscription-modal .sms-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

html.dark #subscription-modal .sms-detail {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 14px 7px;
    border: 1px solid rgba(176, 151, 255, 0.25);
    border-radius: 15px;
    background: #110e20;
}

html.dark #subscription-modal .sms-detail span {
    margin-bottom: 7px;
    color: #9f96b9;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

html.dark #subscription-modal .sms-detail strong {
    color: #d0c1ff;
    font-size: 24px;
    font-weight: 900;
}

html.dark #subscription-modal .sms-arrow {
    color: #a994ff;
    font-size: 13px;
}

html.dark #subscription-modal .sms-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    color: #a9a1bf;
    font-size: 11px;
    line-height: 1.6;
}

html.dark #subscription-modal .sms-note i {
    flex-shrink: 0;
    margin-top: 3px;
    color: #b4a0ff;
}

/* Divider */
html.dark #subscription-modal .subscription-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #958baf;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

html.dark #subscription-modal .subscription-divider::before,
html.dark #subscription-modal .subscription-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Web subscription action */
html.dark #subscription-modal .subscription-web-button {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(193, 178, 255, 0.35);
    border-radius: 17px;
    background: linear-gradient(100deg, #7955f5, #6842df);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(109, 74, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

html.dark #subscription-modal .subscription-web-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(109, 74, 255, 0.3);
}

html.dark #subscription-modal .web-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

html.dark #subscription-modal .web-button-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

html.dark #subscription-modal .web-button-text strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

html.dark #subscription-modal .web-button-text small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
}

html.dark #subscription-modal .web-button-arrow {
    color: #ffffff;
}

/* Secondary action and footer */
html.dark #subscription-modal .subscription-later {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 11px;
    border-radius: 12px;
    background: transparent;
    color: #aaa2c1;
    font-size: 12px;
    font-weight: 600;
}

html.dark #subscription-modal .subscription-later:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

html.dark #subscription-modal .subscription-footer {
    margin: 10px 0 0;
    color: #827995;
    text-align: center;
    font-size: 10px;
}

@keyframes gfSubscriptionEnter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    html.dark #subscription-modal {
        padding: 12px;
    }

    html.dark #subscription-modal > .subscription-dialog {
        max-height: calc(100dvh - 24px);
        padding: 24px 18px 18px;
        border-radius: 23px;
    }

    html.dark #subscription-modal .subscription-header h2 {
        font-size: 24px;
    }

    html.dark #subscription-modal .sms-subscription-card {
        padding: 16px 12px;
    }

    html.dark #subscription-modal .sms-details {
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.dark #subscription-modal > .subscription-dialog,
    html.dark #subscription-modal .subscription-web-button {
        animation: none;
        transition: none;
    }
}
