/* ===================================
   FYEV Events — Design System
   =================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Primary Palette */
    --color-primary: #6366f1;
    --color-primary-light: #4f46e5;
    --color-primary-dark: #4338ca;
    --color-primary-glow: rgba(99, 102, 241, 0.2);

    /* Accent */
    --color-accent: #0891b2;
    --color-accent-light: #06b6d4;
    --color-accent-dark: #0e7490;

    /* Semantic */
    --color-success: #059669;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-info: #2563eb;

    /* Neutrals (Light Theme) */
    --color-bg: #f1f5f9;
    --color-bg-elevated: #ffffff;
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #f8fafc;
    --color-surface: rgba(255, 255, 255, 0.85);
    --color-border: rgba(15, 23, 42, 0.1);
    --color-border-strong: rgba(15, 23, 42, 0.2);

    /* Text */
    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #f1f5f9;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-blur: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px var(--color-primary-glow);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.8125rem;
    --font-size-base: 0.9375rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.375rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2.25rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

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

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index */
    --z-nav: 100;
    --z-header: 200;
    --z-modal: 500;
    --z-splash: 1000;

    /* Layout */
    --header-height: 56px;
    --nav-height: 72px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
    /* Primary Palette (brighter for dark bg) */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-primary-glow: rgba(99, 102, 241, 0.25);

    /* Accent */
    --color-accent: #22d3ee;
    --color-accent-light: #67e8f9;
    --color-accent-dark: #06b6d4;

    /* Semantic */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Neutrals */
    --color-bg: #0f172a;
    --color-bg-elevated: #1e293b;
    --color-bg-card: #1e293b;
    --color-bg-card-hover: #334155;
    --color-surface: rgba(30, 41, 59, 0.8);
    --color-border: rgba(148, 163, 184, 0.12);
    --color-border-strong: rgba(148, 163, 184, 0.25);

    /* Text */
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-text-inverse: #0f172a;

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.65);
    --glass-border: rgba(148, 163, 184, 0.15);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
}

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

ul,
ol {
    list-style: none;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

    100% {
        background-position: 200% 0;
    }
}

@keyframes loaderSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(300%);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) both;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) both;
}

.animate-fade-in-scale {
    animation: fadeInScale var(--transition-spring) both;
}

.animate-slide-right {
    animation: slideInRight var(--transition-slow) both;
}

/* Stagger animations */
.stagger-1 {
    animation-delay: 50ms;
}

.stagger-2 {
    animation-delay: 100ms;
}

.stagger-3 {
    animation-delay: 150ms;
}

.stagger-4 {
    animation-delay: 200ms;
}

.stagger-5 {
    animation-delay: 250ms;
}

.stagger-6 {
    animation-delay: 300ms;
}

.stagger-7 {
    animation-delay: 350ms;
}

.stagger-8 {
    animation-delay: 400ms;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: var(--radius-full);
}

/* --- Selection --- */
::selection {
    background: var(--color-primary);
    color: white;
}