/* ============================================
   BASE STYLES
   Reset, CSS Variables, Body, Container
   ============================================ */

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

:root {
    /* Colors - Casino Neon Theme */
    --bg-primary: #0B0F1A;
    --bg-secondary: #141824;
    --bg-card: #1A1F2E;
    --accent-purple: #8B5CF6;
    --accent-blue: #3B82F6;
    --accent-cyan: #06B6D4;
    --accent-pink: #EC4899;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A8B8;
    --text-muted: #6B7280;
    --border-color: #2D3440;
    --glow-purple: rgba(139, 92, 246, 0.5);
    --glow-blue: rgba(59, 130, 246, 0.5);
    --glow-cyan: rgba(6, 182, 212, 0.5);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows & Effects */
    --shadow-glow: 0 0 20px var(--glow-purple);
    --shadow-glow-blue: 0 0 20px var(--glow-blue);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    padding-top: 70px;
    /* Компенсація для fixed header */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    /* PNG fallback для старих браузерів */
    background:
        linear-gradient(rgba(11, 15, 26, 0.75), rgba(11, 15, 26, 0.75)),
        url('../images/hero-bg-neon.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    pointer-events: none;
    z-index: 0;
}

/* WebP для сучасних браузерів */
@supports (background-image: url('../images/hero-bg-neon.webp')) {
    body::before {
        background:
            linear-gradient(rgba(11, 15, 26, 0.75), rgba(11, 15, 26, 0.75)),
            url('../images/hero-bg-neon.webp');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
}

body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.36) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite, glowShape 12s ease-in-out infinite;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    will-change: transform, border-radius;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

@media (max-width: 767px) {
    body {
        padding-top: 50px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 15px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

@keyframes glowPulse {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.96;
    }
}

@keyframes glowShape {
    0% {
        border-radius: 35% 65% 68% 32% / 32% 36% 64% 68%;
    }

    12.5% {
        border-radius: 72% 28% 29% 71% / 71% 73% 27% 29%;
    }

    25% {
        border-radius: 45% 55% 58% 42% / 58% 45% 55% 42%;
    }

    37.5% {
        border-radius: 65% 35% 38% 62% / 42% 62% 38% 58%;
    }

    50% {
        border-radius: 52% 48% 51% 49% / 49% 52% 48% 51%;
    }

    62.5% {
        border-radius: 38% 62% 65% 35% / 35% 38% 62% 65%;
    }

    75% {
        border-radius: 58% 42% 45% 55% / 55% 58% 42% 45%;
    }

    87.5% {
        border-radius: 68% 32% 35% 65% / 65% 68% 32% 35%;
    }

    100% {
        border-radius: 35% 65% 68% 32% / 32% 36% 64% 68%;
    }
}
