/* ===============
   IMPERIAL CRIMSON & ROYAL GOLD CASINO
   MOBILE-FIRST APP SHELL (LOCKED TO MOBILE VIEWPORT ON ALL SCREENS)
   =============== */
:root {
    /* App Frame Width */
    --app-max-width: 480px;

    /* Brand Colors - Imperial Crimson / Ruby */
    --primary-color: #e11d48;
    --primary-hover: #f43f5e;
    --primary-light: #fda4af;
    --primary-soft: rgba(225, 29, 72, 0.15);
    --ruby-glow: rgba(225, 29, 72, 0.45);
    
    /* Royal Champagne Gold */
    --accent-color: #fbbf24;
    --accent-hover: #fde68a;
    --accent-dark: #d97706;
    --accent-soft: rgba(251, 191, 36, 0.15);
    --gold-glow: rgba(251, 191, 36, 0.4);

    /* Jade Lucky Green */
    --jade-color: #10b981;
    --jade-glow: rgba(16, 185, 129, 0.35);

    /* Deep Velvet Obsidian Theme */
    --bg-color: #08080d;
    --bg-secondary: #0e0e16;
    --surface-color: #14141f;
    --surface-hover: #1c1c2c;
    --surface-card: rgba(20, 20, 31, 0.88);
    --surface-elevated: #242438;

    /* Text Colors */
    --text-color: #d1d5db;
    --text-heading: #ffffff;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.15);
    --border-ruby: rgba(225, 29, 72, 0.35);
    --border-gold: rgba(251, 191, 36, 0.35);

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-subheading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.65);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.8);
    --shadow-ruby: 0 6px 24px rgba(225, 29, 72, 0.35);
    --shadow-gold: 0 6px 24px rgba(251, 191, 36, 0.3);

    /* Gradients */
    --gradient-ruby: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #9f1239 100%);
    --gradient-gold: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #d97706 100%);
    --gradient-ruby-gold: linear-gradient(135deg, #e11d48 0%, #f59e0b 100%);
    --gradient-card: linear-gradient(145deg, rgba(28, 28, 44, 0.9) 0%, rgba(14, 14, 22, 0.95) 100%);
    --gradient-dark: linear-gradient(180deg, #0e0e16 0%, #08080d 100%);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===============
   RESET & MOBILE-SHELL CENTERING
   =============== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: #030305;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #030305;
    background-image: 
        radial-gradient(circle at 50% 12%, rgba(225, 29, 72, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(251, 191, 36, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(225, 29, 72, 0.06) 0%, transparent 45%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Central Mobile Wrapper (Locked to 480px on Laptop & Desktop) */
.site-wrapper {
    width: 100%;
    max-width: var(--app-max-width);
    min-height: 100vh;
    background: #08080d;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(225, 29, 72, 0.2);
    border-left: 1px solid rgba(225, 29, 72, 0.25);
    border-right: 1px solid rgba(225, 29, 72, 0.25);
    display: flex;
    flex-direction: column;
    padding-top: 126px; /* Space for fixed navigation bar */
    padding-bottom: 74px; /* Space for fixed bottom auth bar */
    overflow-x: hidden;
}

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

ul, ol {
    list-style: none;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

.container {
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    letter-spacing: 0.02em;
}

/* Common Section Headers */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-subheading);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-color);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--border-gold);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 4.8vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.section-title span,
.section-title .text-ruby {
    background: var(--gradient-ruby-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 auto 26px;
    line-height: 1.6;
}

/* ===============
   HEADER & TOPBAR (LOCKED TO MOBILE VIEWPORT)
   =============== */
/* ===============
   HEADER & TOPBAR (RUNNING TICKER / MARQUEE)
   =============== */
.topbar {
    background: #050508;
    border-bottom: 1px solid rgba(225, 29, 72, 0.25);
    font-size: 0.72rem;
    color: var(--text-muted);
    height: 32px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1001;
}

.topbar-marquee-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    gap: 8px;
    overflow: hidden;
}

.topbar-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    z-index: 2;
}

.topbar-marquee-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
}

.topbar-marquee-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: topbar-scroll 24s linear infinite;
    gap: 14px;
}

.topbar-marquee-wrapper:hover .topbar-marquee-track {
    animation-play-state: paused;
}

@keyframes topbar-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.topbar-marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.72rem;
    color: #e5e7eb;
}

.topbar-sep {
    color: var(--primary-color);
    opacity: 0.6;
    font-size: 0.75rem;
}

.topbar-marquee-link {
    color: var(--accent-color);
    font-weight: 700;
    font-family: var(--font-subheading);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topbar-marquee-link:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(225, 29, 72, 0.2);
    border: 1px solid var(--border-ruby);
    color: var(--primary-light);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.65rem;
    font-family: var(--font-subheading);
    white-space: nowrap;
    line-height: 1.4;
}

/* Fallback for topbar-inner */
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 10px;
    gap: 6px;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
}

.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-link {
    color: var(--accent-color);
    font-weight: 700;
    font-family: var(--font-subheading);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* Fixed Navigation Bar (Locked to Top of Mobile Viewport) */
.fixed-navbar,
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    z-index: 1000;
    background: #08080d;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 10px;
    gap: 8px;
    background: #08080d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Horizontal Category Navbar Menu Bar */
.navbar-menu-bar {
    width: 100%;
    background: #0c0c14;
    border-bottom: 1px solid rgba(225, 29, 72, 0.28);
    height: 44px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.navbar-menu-track {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}

.navbar-menu-track::-webkit-scrollbar {
    display: none;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-family: var(--font-subheading);
    font-size: 0.75rem;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.nav-pill:hover,
.nav-pill:active {
    color: var(--accent-color);
    background: rgba(225, 29, 72, 0.2);
    border-color: var(--border-ruby);
}

.nav-pill.active {
    color: #0b0b12 !important;
    background: var(--gradient-gold);
    border-color: var(--accent-color);
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.35);
    font-weight: 800;
}

.pill-dot {
    font-size: 0.75rem;
    line-height: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
    max-width: 130px;
    overflow: hidden;
}

.logo img {
    height: 32px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(225, 29, 72, 0.4));
}

/* Force-hide desktop navigation on ALL devices */
.header-nav {
    display: none !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Compact Header Buttons */
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.74rem;
    color: var(--accent-color);
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xs);
    white-space: nowrap;
}

.btn-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-family: var(--font-subheading);
    font-weight: 800;
    font-size: 0.74rem;
    color: #ffffff !important;
    background: var(--gradient-ruby);
    border: none;
    border-radius: var(--radius-xs);
    box-shadow: var(--shadow-ruby);
    white-space: nowrap;
}

/* Always Show Hamburger Menu */
.mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid var(--border-ruby);
    border-radius: var(--radius-xs);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--primary-light);
    border-radius: 2px;
}

/* Mobile Drawer Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 100%;
    max-width: var(--app-max-width);
    max-height: 88vh;
    background: #09090f;
    border-bottom: 2px solid var(--primary-color);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 30px rgba(225, 29, 72, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
    padding: 16px;
    overflow-y: auto;
}

.mobile-drawer.active {
    transform: translate(-50%, 0);
    visibility: visible;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(225, 29, 72, 0.2);
}

.mobile-drawer-logo img {
    height: 32px;
    width: auto;
}

.mobile-drawer-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid var(--border-ruby);
    border-radius: var(--radius-xs);
    color: var(--primary-light);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-drawer-close:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
}

.mobile-nav-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    color: var(--accent-color);
    background: rgba(225, 29, 72, 0.15);
    border-color: var(--border-ruby);
}

.mobile-drawer-footer {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Advertisement Container */
.ad-banner-container {
    margin: 24px auto;
    text-align: center;
}

.ad-banner-container img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-ruby);
    box-shadow: var(--shadow-sm);
}

/* ===============
   FOOTER (MOBILE STACKED)
   =============== */
.footer {
    background: #050508;
    border-top: 1px solid rgba(225, 29, 72, 0.25);
    padding: 40px 0 20px;
    margin-top: 40px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-ruby-gold);
}

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

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

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

.footer-col a {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover {
    color: var(--primary-light);
}

.footer-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.footer-thumb {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 8px 6px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-thumb-icon {
    font-size: 1.2rem;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.badge-18 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.75rem;
    font-family: var(--font-subheading);
}

.badge-licensed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid var(--border-gold);
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.72rem;
    font-family: var(--font-subheading);
}

/* ===============
   FIXED MOBILE BOTTOM AUTH BAR (ALWAYS DISPLAYED)
   =============== */
.mobile-bottom-auth {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    z-index: 999;
    background: rgba(8, 8, 13, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 14px;
    gap: 10px;
    display: flex !important;
    border-top: 1px solid rgba(225, 29, 72, 0.35);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.9);
}

.mob-btn-login,
.mob-btn-signup {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    font-family: var(--font-subheading);
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mob-btn-login {
    color: var(--accent-color);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--border-gold);
}

.mob-btn-signup {
    background: var(--gradient-ruby);
    color: #ffffff !important;
    border: none;
    box-shadow: var(--shadow-ruby);
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
