/* Global CSS Variables and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Colors */
    --primary-gold: #D4AF37;
    --accent-orange: #FF6B35;
    --dark-primary: #0A0A0A;
    --dark-secondary: #1A1A1A;
    --dark-tertiary: #2A2A2A;
    --light-gray: #F5F5F5;
    --medium-gray: #888888;
    --border-color: #333333;
    --white: #FFFFFF;
    --success-green: #10B981;
    --error-red: #EF4444;
    --warning-yellow: #F59E0B;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #D4AF37, #FFE55C);
    --gradient-dark: linear-gradient(135deg, #0A0A0A, #2A2A2A);
    --gradient-orange: linear-gradient(135deg, #FF6B35, #FF8E53);
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(10, 10, 10, 0.3);
    
    /* Shadows */
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-premium: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.3);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--dark-primary);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Premium Background Effects */
.premium-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse at bottom, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
    z-index: -2;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    transform-origin: left;
    transform: scaleX(0);
    z-index: var(--z-toast);
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--white);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    line-height: 1.7;
    color: var(--medium-gray);
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--white);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button Variants */
.btn-premium {
    background: var(--gradient-gold);
    color: var(--dark-primary);
    box-shadow: var(--shadow-gold);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--glass-bg);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.btn-outline {
    background: transparent;
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
}

.btn-outline:hover {
    background: var(--primary-gold);
    color: var(--dark-primary);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
}

.btn-success {
    background: var(--success-green);
    color: var(--white);
}

.btn-danger {
    background: var(--error-red);
    color: var(--white);
}

/* Button Sizes */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-premium-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient-gold);
    color: var(--dark-primary);
    box-shadow: var(--shadow-gold);
}

.btn-premium-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.4);
}

.btn-outline-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn-outline-large:hover {
    background: var(--primary-gold);
    color: var(--dark-primary);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    color: var(--white);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: var(--white);
    font-family: var(--font-primary);
    outline: none;
    transition: var(--transition-normal);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-input::placeholder {
    color: var(--medium-gray);
}

.form-select option {
    background: var(--dark-primary);
    color: var(--white);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Glass Morphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    transition: var(--transition-normal);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-gold);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-lg);
    font-size: 0.9rem;
    color: var(--primary-gold);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .btn-large,
    .btn-premium-large,
    .btn-outline-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

/* Selection Styling */
::selection {
    background: var(--primary-gold);
    color: var(--dark-primary);
}

::-moz-selection {
    background: var(--primary-gold);
    color: var(--dark-primary);
}

/* ===== MOBILE NAVIGATION & HEADER - COMPLETELY REWRITTEN ===== */

/* Enhanced Mobile Header */
@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--glass-dark);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--glass-border);
        z-index: var(--z-fixed);
        padding: 0.5rem 0;
    }

    .nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem !important;
        font-weight: 700;
        background: var(--gradient-gold);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-decoration: none;
    }

    /* BRAND NEW MOBILE MENU - FULL WIDTH */
    .nav-links {
        display: none; /* Hidden by default */
    }

    .nav-links.active {
        /* Full screen overlay menu */
        display: block;
        position: fixed;
        top: 60px; /* Below header */
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%; /* FULL WIDTH */
        height: calc(100vh - 60px);

        /* Beautiful gradient background */
        background: linear-gradient(180deg,
            rgba(10, 10, 10, 0.98) 0%,
            rgba(26, 26, 26, 0.98) 50%,
            rgba(10, 10, 10, 0.98) 100%);

        /* Generous padding - lots of breathing room */
        padding: 2rem 0;

        /* High z-index to be above everything */
        z-index: 1050;

        /* Smooth animation */
        animation: mobileMenuSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);

        /* Scrollable if content overflows */
        overflow-y: auto;
        overflow-x: hidden;

        /* Premium border effect */
        border-top: 2px solid var(--primary-gold);
        box-shadow: 0 -5px 30px rgba(212, 175, 55, 0.2);
    }

    @keyframes mobileMenuSlideIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links.active li {
        /* Clean list styling */
        list-style: none;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    }

    .nav-links.active li:last-child {
        border-bottom: none;
    }

    .nav-links.active a {
        /* FULL WIDTH CLICKABLE AREA */
        display: block;
        width: 100%;

        /* LARGE, COMFORTABLE PADDING */
        padding: 1.75rem 2rem;
        min-height: 70px;

        /* BIG, READABLE TEXT */
        font-size: 1.3rem;
        font-weight: 500;
        letter-spacing: 0.3px;

        /* Styling */
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;

        /* Smooth transitions */
        transition: all 0.3s ease;

        /* Position for pseudo-element */
        position: relative;

        /* Flexbox for better alignment */
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    /* Left border indicator on hover/active */
    .nav-links.active a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 50%;
        background: var(--gradient-gold);
        transition: width 0.3s ease;
        border-radius: 0 4px 4px 0;
    }

    .nav-links.active a:hover,
    .nav-links.active a:active {
        color: var(--white);
        background: linear-gradient(90deg,
            rgba(212, 175, 55, 0.15) 0%,
            rgba(212, 175, 55, 0.05) 50%,
            transparent 100%);
    }

    .nav-links.active a:hover::before,
    .nav-links.active a:active::before {
        width: 5px;
    }

    .nav-links.active a.active {
        color: var(--primary-gold);
        font-weight: 600;
        background: linear-gradient(90deg,
            rgba(212, 175, 55, 0.2) 0%,
            rgba(212, 175, 55, 0.08) 50%,
            transparent 100%);
    }

    .nav-links.active a.active::before {
        width: 5px;
    }

    /* HAMBURGER MENU TOGGLE BUTTON */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px; /* Touch-friendly size */
        height: 44px;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 8px;
        cursor: pointer;
        padding: 10px;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1060; /* Above menu */
    }

    .mobile-menu-toggle:hover {
        background: rgba(212, 175, 55, 0.2);
        border-color: var(--primary-gold);
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    }

    .mobile-menu-toggle span {
        display: block;
        height: 2px;
        width: 24px;
        background: var(--white);
        margin: 3px 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
    }

    .mobile-menu-toggle.active {
        background: rgba(212, 175, 55, 0.25);
        border-color: var(--primary-gold);
    }

    .mobile-menu-toggle.active span {
        background: var(--primary-gold);
    }

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

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

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

    /* Block body scroll when menu is open */
    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    .auth-buttons {
        display: none;
    }
}

/* Fix body padding for mobile - removed excessive top padding */

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-dark);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 0.75rem 0;
    z-index: var(--z-fixed);
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.6);
        transition: var(--transition-fast);
        padding: 0.5rem;
        border-radius: var(--radius-md);
    }
    
    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: var(--primary-gold);
        background: rgba(212, 175, 55, 0.1);
    }
    
    .mobile-nav-icon {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-nav-label {
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    /* Adjust body for bottom navigation */
    body {
        padding-bottom: 80px;
    }
}

/* Enhanced Footer for Mobile */
.footer {
    background: var(--dark-secondary);
    padding: 3rem 0 6rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 6rem;
    }
    
    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h4 {
        color: var(--primary-gold);
        margin-bottom: 1rem;
    }
    
    .footer-section p,
    .footer-section a {
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        line-height: 1.6;
        display: block;
        margin-bottom: 0.5rem;
        transition: var(--transition-fast);
    }
    
    .footer-section a:hover {
        color: var(--primary-gold);
    }
    
    .footer-bottom {
        text-align: center;
        padding-top: 2rem;
        margin-top: 2rem;
        border-top: 1px solid var(--border-color);
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.875rem;
    }
}

/* PWA Enhancements */
.pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 90px;
    left: 1rem;
    right: 1rem;
    background: var(--gradient-gold);
    color: var(--dark-primary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-large);
    z-index: var(--z-toast);
    animation: slideUp 0.5s ease;
}

.pwa-install-banner.show {
    display: block;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pwa-banner-text {
    flex: 1;
}

.pwa-banner-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pwa-banner-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
}

.pwa-install-btn {
    background: var(--dark-primary);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    margin-left: 1rem;
}

.pwa-close-btn {
    background: none;
    border: none;
    color: var(--dark-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
}

/* Touch-friendly interactive elements */
@media (max-width: 768px) {
    button, 
    .btn,
    .mobile-nav-item,
    .card-action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    input,
    select,
    textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading states for mobile */
.loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Global Header Padding Reduction */
.header .nav {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

/* Active Navigation State */
.nav-links a.active {
    color: var(--primary-gold);
    font-weight: 600;
}

/* Alpine.js x-cloak directive - prevents flashing of hidden elements */
[x-cloak] {
    display: none !important;
}

/* Safe area handling for notched devices */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-top: max(0.5rem, env(safe-area-inset-top));
    }

    .mobile-nav {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }
}

/* PWA Install Banner Mobile Improvements */
@media (max-width: 768px) {
    .pwa-install-banner {
        bottom: max(20px, env(safe-area-inset-bottom));
        left: 0.75rem;
        right: 0.75rem;
        padding: 0.875rem;
        border-radius: var(--radius-md);
    }

    .pwa-banner-content {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .pwa-banner-text {
        text-align: center;
    }

    .pwa-banner-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .pwa-banner-description {
        font-size: 0.875rem;
        opacity: 0.9;
    }

    .pwa-install-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.875rem;
        font-weight: 600;
        background: var(--dark-primary);
        color: var(--primary-gold);
        border: 1px solid var(--primary-gold);
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .pwa-install-btn:hover {
        background: var(--primary-gold);
        color: var(--dark-primary);
    }

    .pwa-close-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        background: none;
        border: none;
        color: var(--dark-primary);
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.25rem;
        line-height: 1;
    }
}

/* ===== JOIN ELITE MODAL ===== */

/* Modal Overlay */
.join-elite-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1;
    animation: fadeIn 0.3s ease;
}

/* Modal Container */
.join-elite-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 1rem;
}

/* Modal Content */
.join-elite-content {
    background: var(--dark-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-premium);
    position: relative;
    z-index: 2;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.join-elite-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.join-elite-header h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin: 0;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.join-elite-header p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* Close Button */
.join-elite-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--medium-gray);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 1.25rem;
    font-weight: 300;
}

.join-elite-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: var(--primary-gold);
}

/* Modal Form */
.join-elite-form {
    padding: 2rem;
}

.join-elite-form .form-group {
    margin-bottom: 1.5rem;
}

.join-elite-form .form-label {
    display: block;
    color: var(--white);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.join-elite-form input,
.join-elite-form select {
    width: 100%;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-normal);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.join-elite-form input:focus,
.join-elite-form select:focus {
    border-color: var(--primary-gold);
    background: rgba(10, 10, 10, 0.8);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(212, 175, 55, 0.15),
        0 4px 12px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.join-elite-form input:hover:not(:focus),
.join-elite-form select:hover:not(:focus) {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(10, 10, 10, 0.7);
}

.join-elite-form input::placeholder {
    color: rgba(136, 136, 136, 0.6);
    font-style: italic;
}

.join-elite-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.join-elite-form select option {
    background: var(--dark-primary);
    color: var(--white);
    padding: 0.75rem;
}

.join-elite-form select option:first-child {
    color: var(--medium-gray);
}

.join-elite-form select:invalid {
    color: rgba(136, 136, 136, 0.6);
}

/* Full Width Premium Button */
.btn-premium-full {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-gold);
    color: var(--dark-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-gold);
}

.btn-premium-full:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-premium-full:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.join-elite-success {
    text-align: center;
    padding: 3rem 2rem;
}

.join-elite-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.join-elite-success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--dark-primary);
}

.join-elite-success h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.join-elite-success p {
    color: var(--medium-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .join-elite-content {
        max-width: 100%;
        margin: 0 0.75rem;
        border-radius: var(--radius-lg);
    }

    .join-elite-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .join-elite-header h3 {
        font-size: 1.5rem;
        padding-right: 2rem;
    }

    .join-elite-close {
        top: 1rem;
        right: 1rem;
    }

    .join-elite-form {
        padding: 1.5rem;
    }

    .join-elite-success {
        padding: 2rem 1.5rem;
    }

    .join-elite-success-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }

    .join-elite-success-icon svg {
        width: 35px;
        height: 35px;
    }
}

/* ============================================================
   POLICY MODALS
   ============================================================ */

.policy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 2rem;
}

.policy-modal-content {
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.1);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.policy-modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.policy-modal-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.policy-modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.policy-modal-close:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    transform: rotate(90deg);
}

.policy-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.policy-modal-body::-webkit-scrollbar {
    width: 8px;
}

.policy-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.policy-modal-body::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

.policy-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

.policy-updated {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h3 {
    color: var(--primary-gold);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.policy-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-section ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.policy-section ul li {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
}

.policy-section ul li::before {
    content: '→';
    position: absolute;
    left: 0.5rem;
    color: var(--primary-gold);
    font-weight: 600;
}

.policy-section ul li strong {
    color: var(--white);
    font-weight: 600;
}

@media (max-width: 768px) {
    .policy-modal-overlay {
        padding: 1rem;
    }

    .policy-modal-content {
        max-height: 90vh;
    }

    .policy-modal-header {
        padding: 1.5rem;
    }

    .policy-modal-header h2 {
        font-size: 1.5rem;
    }

    .policy-modal-body {
        padding: 1.5rem;
    }

    .policy-section h3 {
        font-size: 1.1rem;
    }
}