/* Reset & Global Variables - Editorial Forest Green & Blush Aesthetic (Mobile-Focused UI) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Mobile Container Width (Locked for Desktop & Mobile) */
    --mobile-width: 500px;

    /* Primary Editorial Palette */
    --primary-color: #1b4332;       /* Deep Forest Green */
    --primary-hover: #143528;
    --primary-light: #2d6a4f;
    --primary-subtle: #e9f3ee;
    
    /* Blush & Rose Accents */
    --accent-rose: #b88b7d;         /* Dusty Rose / Terracotta */
    --accent-rose-hover: #a2776a;
    --accent-rose-light: #fbf5f2;   /* Soft Warm Blush */
    --accent-gold: #d4a373;         /* Warm Gold / Tan */

    /* Neutrals & Surfaces */
    --bg-outer: #0d1e17;            /* Dark Forest Canvas for Laptop/Desktop */
    --bg-white: #ffffff;
    --bg-body: #ffffff;
    --bg-cream: #fbf8f5;
    --bg-surface: #fbf5f2;
    --bg-dark: #143528;             /* Deep Pine for Dark Sections & Footer */
    --bg-dark-card: #1b4332;

    /* Text Colors */
    --text-main: #182c25;           /* Deep Forest Dark Charcoal */
    --text-muted: #5e6d67;          /* Soft Sage Charcoal */
    --text-light: #8e9c96;
    --text-white: #ffffff;
    --text-white-muted: #c8d8d2;

    /* Borders & Shadows */
    --border-color: #e8e2dc;
    --border-light: #f2ece6;
    --border-dark: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.05);
    --shadow-md: 0 6px 20px rgba(27, 67, 50, 0.08);
    --shadow-lg: 0 14px 36px rgba(27, 67, 50, 0.12);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-pill: 999px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-outer);
}

/* Body: Centered Mobile Device Screen on Desktop & Laptop */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-outer);
    background-image: radial-gradient(circle at 50% 15%, rgba(45, 106, 79, 0.3) 0%, transparent 65%);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Mobile App Main Wrapper (Locked 500px on all devices) */
.mobile-app-wrapper {
    width: 100%;
    max-width: var(--mobile-width);
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.45), 0 0 15px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 54px; /* Space for fixed mobile header navbar */
    padding-bottom: 64px; /* Space for fixed bottom bar */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    line-height: 1.25;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Mobile-First Container */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #143528;
}
::-webkit-scrollbar-thumb {
    background: #2d6a4f;
    border-radius: 4px;
}

/* Mobile Header (Fixed at top of mobile frame) */
header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--mobile-width);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 8px;
    width: 100%;
}

/* Brand Logo */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap !important;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap !important;
}

.logo img {
    height: 28px;
    max-height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Hide broken image icon if image fails to load */
.logo img:not([src]),
.logo img[src=""],
.logo img[src="#"] {
    display: none !important;
}

.logo-text-brand {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1;
    word-break: keep-all;
}

.logo-text-brand span.script-tag {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    color: var(--accent-rose);
    font-size: 1.1rem;
    white-space: nowrap !important;
    display: inline-block;
}

/* Header Right Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.header-login-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 6px 6px;
    white-space: nowrap;
    transition: var(--transition);
}

.header-login-link:hover {
    color: var(--primary-color);
}

@media (max-width: 400px) {
    .header-login-link {
        display: none;
    }
}

/* Search Icon Toggle */
.header-search-toggle {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: #fbf5f2;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.header-search-toggle:hover,
.header-search-toggle.active {
    background: var(--primary-subtle);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dropdown Search Bar */
.header-search-dropdown {
    display: none;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.header-search-dropdown.active {
    display: block;
}

.search-dropdown-inner {
    display: flex;
    align-items: center;
    background: #fbf5f2;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    gap: 8px;
}

.search-dropdown-inner i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-dropdown-inner input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--text-main);
}

.btn-search-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.85rem;
}

.btn-pill-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 3px 10px rgba(27, 67, 50, 0.2);
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-pill-signup:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* Drawer Menu Additions */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.drawer-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.drawer-title span.script-tag {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    color: var(--accent-rose);
    font-size: 1.1rem;
}

.drawer-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fbf5f2;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.drawer-close-btn:hover {
    background: var(--accent-rose);
    color: #ffffff;
    border-color: var(--accent-rose);
    transform: rotate(90deg);
}

.drawer-search {
    display: flex;
    align-items: center;
    background: #fbf5f2;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    gap: 8px;
    margin-bottom: 14px;
}

.drawer-search i {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.drawer-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.82rem;
    color: var(--text-main);
    width: 100%;
}

.drawer-auth {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.drawer-btn-login {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-subtle);
    border: 1px solid var(--border-color);
}

.drawer-btn-signup {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color);
}

/* Hamburger Toggle: ALWAYS VISIBLE (Both Laptop & Mobile) */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 17px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

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

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

/* Slide-out Navigation Drawer (Hidden by default, shown only on toggle) */
.nav-list {
    position: fixed;
    top: 0;
    right: 0;
    width: 290px;
    max-width: 85%;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.35);
    padding: 18px 18px 30px;
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.32s;
    z-index: 1002;
    overflow-y: auto;
}

.nav-list.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nav-list ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: block;
    border-bottom: 1px solid var(--border-light);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--primary-subtle);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1001;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Enforce Laptop Centered Mobile Frame Alignment for Drawer & Overlay */
@media (min-width: 501px) {
    .nav-list {
        right: calc(50% - (var(--mobile-width) / 2));
    }
    .mobile-menu-overlay {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: var(--mobile-width);
    }
}

/* Global Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 14px rgba(27, 67, 50, 0.18);
    transition: var(--transition);
    border: 1px solid var(--primary-color);
    text-align: center;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-rose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    background: var(--accent-rose);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 14px rgba(184, 139, 125, 0.22);
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-rose:hover {
    background: var(--accent-rose-hover);
    color: #fff;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.88rem;
    border: 1.5px solid var(--primary-color);
    transition: var(--transition);
    text-align: center;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Section Header Typography (Mobile Optimized) */
.section-header {
    margin-bottom: 1.8rem;
    text-align: center;
}

.section-prefix {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-rose);
    margin-bottom: 0.35rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.section-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 100%;
    margin: 0.4rem auto 0;
    line-height: 1.55;
}

/* Ad Wrapper */
.ad-wrapper {
    margin: 1.2rem auto;
}

.ad-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

/* Mobile Footer (Stacked inside the 500px container) */
.main-footer {
    background: var(--bg-dark);
    color: #fff;
    padding-top: 45px;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-main {
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-logo img {
    height: 30px;
    width: auto;
}

.footer-logo-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.footer-logo-title em {
    font-style: italic;
    color: var(--accent-rose);
}

.footer-desc {
    color: var(--text-white-muted);
    font-size: 0.85rem;
    line-height: 1.65;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-rose);
    color: #fff;
}

.footer-title {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-menu a {
    color: var(--text-white-muted);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: var(--text-white-muted);
}

.badge-item i {
    color: var(--accent-rose);
    font-size: 1rem;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 0;
    font-size: 0.8rem;
    color: var(--text-white-muted);
    gap: 8px;
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.responsible-gaming {
    font-weight: 600;
    color: var(--accent-rose);
}

.footer-link {
    color: var(--text-white-muted);
}

/* ==========================================================
   STICKY MOBILE BOTTOM BAR (Always Visible On Desktop & Mobile)
========================================================== */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--mobile-width);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex !important; /* ALWAYS SHOWN */
    gap: 10px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

.mobile-bottom-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.mobile-bottom-bar .btn-login {
    background: #fbf5f2;
    color: var(--primary-color);
    border: 1.5px solid var(--border-color);
}

.mobile-bottom-bar .btn-register {
    background: var(--primary-color);
    color: #fff;
    border: 1.5px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.25);
}