/* =========================================
   BASE.CSS - Design Tokens & Reset
   Shared across all pages
   ========================================= */

:root {
    /* Colors - WCAG AA Compliant */
    --bg-color: #050507;
    --bg-gradient: linear-gradient(135deg, #050507 0%, #1a1b20 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --primary-color: #ff6b00;
    --primary-hover: #ff8533;
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    --text-color: #ffffff;
    --text-muted: #9a9a9a;
    /* Improved: 5.9:1 contrast on #050507 */
    --text-muted-light: #b0b0b0;
    /* For larger text: 7.5:1 contrast */
    --border-color: rgba(255, 255, 255, 0.12);
    /* Slightly more visible */
    --price-color: #4cd964;
    --error-color: #ff5252;
    /* Slightly brighter for visibility */

    /* Typography */
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Type Scale (Major Third - 1.25) */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.25rem;
    /* 20px */
    --text-xl: 1.5rem;
    /* 24px */
    --text-2xl: 2rem;
    /* 32px */
    --text-3xl: 2.5rem;
    /* 40px */
    --text-4xl: 3rem;
    /* 48px */
    --text-5xl: 4rem;
    /* 64px */

    /* 8-Point Grid Spacing */
    --space-1: 0.5rem;
    /* 8px */
    --space-2: 1rem;
    /* 16px */
    --space-3: 1.5rem;
    /* 24px */
    --space-4: 2rem;
    /* 32px */
    --space-6: 3rem;
    /* 48px */
    --space-8: 4rem;
    /* 64px */

    /* Border Radius (8pt aligned) */
    --radius-sm: 0.5rem;
    /* 8px */
    --radius-md: 1rem;
    /* 16px */
    --radius-lg: 1.5rem;
    /* 24px */
}

/* High Contrast Mode - for users who prefer more contrast */
@media (prefers-contrast: more) {
    :root {
        --text-muted: #c0c0c0;
        --border-color: rgba(255, 255, 255, 0.3);
        --card-bg: rgba(255, 255, 255, 0.08);
    }
}

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

/* Base Body */
body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

/* Show body when fonts are loaded */
body.fonts-loaded {
    opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

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

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-color);
}

/* Aurora Background */
.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--primary-color), transparent 96%) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--primary-color), transparent 98%) 0%, transparent 40%);
    z-index: -2;
    pointer-events: none;
    animation: aurora-pulse 12s ease-in-out infinite alternate;
    opacity: 0.8;
}

@keyframes aurora-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Text Colors */
.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary-color);
}

/* Gradient Text */
.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   ACCESSIBILITY: Reduced Motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .background-glow {
        animation: none;
        opacity: 0.8;
    }
}

/* =========================================
   CREATOR CREDIT
   ========================================= */

.creator-credit {
    text-align: center;
    padding: var(--space-3) 0;
    margin-top: var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.creator-credit:hover {
    opacity: 1;
}

.creator-credit a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    transition: all 0.3s ease;
}

.creator-credit a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.creator-credit a:hover {
    text-shadow: 0 0 12px color-mix(in srgb, var(--primary-color), transparent 50%);
}

.creator-credit a:hover::after {
    width: 100%;
}

/* =========================================
   PRINT STYLES
   ========================================= */
@media print {

    /* Remove decorative backgrounds */
    body {
        background: white !important;
        color: black !important;
    }

    .background-glow,
    .noise-overlay {
        display: none !important;
    }

    /* Adjust text for printing */
    * {
        color: black !important;
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Make links visible */
    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    /* Don't print URLs for internal links */
    a[href^="/"]::after,
    a[href^="#"]::after {
        content: "";
    }

    /* Card adjustments */
    .event-card,
    .search-card,
    .sport-card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Hide interactive elements */
    .primary-btn,
    .ticket-btn,
    .team-dropdown,
    .skeleton-container,
    .sort-controls {
        display: none !important;
    }

    /* Optimize for paper */
    .container {
        max-width: 100%;
        padding: 0;
    }
}