/**
 * Neon Nights Theme CSS
 *
 * Synthwave aesthetic with dark cyberpunk design, vibrant neon glows, and retro-futuristic vibes
 * Perfect for: Electronic artists, synthwave producers, cyberpunk aesthetic, retro-futuristic performers
 *
 * OPTIMIZED: Uses base.css utilities and ONLY defines theme-unique variables
 */

/* ============================================
   THEME-UNIQUE VARIABLES (ONLY!)
   ⚠️ CRITICAL: Do NOT redefine standard variables
   ============================================ */

:root {
    /* Neon glow effects (uses customizer colors) */
    --neon-glow-primary: 0 0 20px var(--color-primary);
    --neon-glow-secondary: 0 0 20px var(--color-secondary);
    --neon-glow-accent: 0 0 15px var(--color-accent);

    /* Synthwave grid colors (uses customizer colors) */
    --grid-color-1: var(--color-primary);
    --grid-color-2: var(--color-secondary);

    /* Cyberpunk scan effect */
    --scan-speed: 8s;
    --scan-opacity: 0.03;
}

/* ============================================
   SYNTHWAVE GRID BACKGROUND (Perspective Grid)
   ============================================ */

body {
    position: relative;
    background-color: var(--page-background);
}

/* Ensure all content is above background */
body > * {
    position: relative;
    z-index: 1;
}

/* Grid background on pseudo-element for better z-index control */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        /* Horizontal grid lines (perspective) */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(255, 16, 240, 0.1) 49px,
            rgba(255, 16, 240, 0.1) 50px
        ),
        /* Vertical grid lines */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(0, 240, 255, 0.1) 49px,
            rgba(0, 240, 255, 0.1) 50px
        ),
        /* Radial gradient for depth */
        radial-gradient(
            ellipse at bottom,
            rgba(255, 16, 240, 0.15) 0%,
            transparent 70%
        );
    background-size: 100% 100%, 100% 100%, 100% 100%;
    background-position: 0 0;
    background-attachment: fixed;
}

/* ============================================
   CYBERPUNK SCAN LINES
   Animated scanning effect
   ============================================ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 16, 240, var(--scan-opacity)),
        rgba(255, 16, 240, var(--scan-opacity)) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9998;
    animation: scan-lines var(--scan-speed) linear infinite;
}

@keyframes scan-lines {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* ============================================
   NEON GLOW HEADINGS
   Pulsing neon effect using customizer colors
   ============================================ */

h1, h2, h3 {
    text-shadow:
        0 0 10px var(--color-heading),
        0 0 20px var(--color-heading),
        0 0 30px var(--color-heading),
        0 0 40px var(--color-heading);
    animation: neon-pulse-heading 3s ease-in-out infinite;
}

@keyframes neon-pulse-heading {
    0%, 100% {
        text-shadow:
            0 0 10px var(--color-heading),
            0 0 20px var(--color-heading),
            0 0 30px var(--color-heading);
    }
    50% {
        text-shadow:
            0 0 15px var(--color-heading),
            0 0 30px var(--color-heading),
            0 0 45px var(--color-heading),
            0 0 60px var(--color-heading);
    }
}

/* ============================================
   CYBERPUNK CARDS
   Neon border glow with depth
   ============================================ */

.card {
    position: relative;
    border: 2px solid rgba(0, 240, 255, 0.3);
    box-shadow:
        0 0 20px rgba(255, 16, 240, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

/* Holographic top accent */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 16, 240, 0.8) 30%,
        rgba(0, 240, 255, 0.8) 70%,
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(255, 16, 240, 0.6);
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255, 16, 240, 0.6);
    box-shadow:
        0 0 40px rgba(255, 16, 240, 0.6),
        0 0 20px rgba(0, 240, 255, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.7),
        inset 0 0 30px rgba(0, 0, 0, 0.6);
}

/* ============================================
   NEON BUTTON EFFECTS
   Glowing cyberpunk buttons
   ============================================ */

button, .btn {
    position: relative;
    overflow: hidden;
    border: 2px solid currentColor;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(255, 16, 240, 0.3);
    transition: all 0.3s ease;
}

/* Ripple effect on click */
button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before, .btn:active::before {
    width: 300px;
    height: 300px;
}

/* Intense neon glow on hover */
button:hover, .btn:hover {
    box-shadow:
        0 0 30px var(--color-primary),
        0 0 50px var(--color-primary),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   HOLOGRAPHIC ACCENT LINES
   Subtle animated accents
   ============================================ */

.section-divider,
hr {
    height: 2px;
    border: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 16, 240, 0.6) 20%,
        rgba(0, 240, 255, 0.6) 80%,
        transparent 100%
    );
    box-shadow:
        0 0 10px rgba(255, 16, 240, 0.4),
        0 0 20px rgba(0, 240, 255, 0.3);
    animation: holo-pulse 4s ease-in-out infinite;
}

@keyframes holo-pulse {
    0%, 100% {
        opacity: 0.6;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* ============================================
   CYBERPUNK LINKS
   Glowing underline effect
   ============================================ */

a {
    position: relative;
    transition: all 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    box-shadow: 0 0 8px var(--color-accent);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    text-shadow: 0 0 10px var(--link-color);
}

/* ============================================
   SYNTHWAVE PROGRESS BARS
   Neon gradient progress
   ============================================ */

.progress-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 16, 240, 0.3);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg,
        rgba(255, 16, 240, 0.8),
        rgba(0, 240, 255, 0.8),
        rgba(255, 107, 0, 0.8)
    );
    box-shadow:
        0 0 10px rgba(255, 16, 240, 0.6),
        0 0 20px rgba(0, 240, 255, 0.4);
    transition: width 0.3s ease;
    animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-shimmer {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

/* ============================================
   HOLOGRAPHIC PANELS
   Glassmorphism with neon accents
   ============================================ */

.hero-section,
.feature-panel {
    position: relative;
    border: 1px solid rgba(255, 16, 240, 0.2);
    border-radius: 12px;
    background: rgba(18, 18, 28, 0.6);
    backdrop-filter: blur(10px) saturate(180%);
    box-shadow:
        0 0 30px rgba(255, 16, 240, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
}

/* Corner accents */
.hero-section::before,
.feature-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-top: 2px solid rgba(255, 16, 240, 0.6);
    border-left: 2px solid rgba(255, 16, 240, 0.6);
    box-shadow: 0 0 10px rgba(255, 16, 240, 0.4);
}

.hero-section::after,
.feature-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-bottom: 2px solid rgba(0, 240, 255, 0.6);
    border-right: 2px solid rgba(0, 240, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* ============================================
   MUSIC PLAYER ENHANCEMENTS
   Cyberpunk audio controls
   ============================================ */

.play-button {
    border: 2px solid var(--color-primary);
    box-shadow:
        0 0 20px rgba(255, 16, 240, 0.4),
        inset 0 0 10px rgba(255, 16, 240, 0.2);
    transition: all 0.3s ease;
}

.play-button:hover {
    box-shadow:
        0 0 40px rgba(255, 16, 240, 0.8),
        0 0 60px rgba(255, 16, 240, 0.5),
        inset 0 0 20px rgba(255, 16, 240, 0.3);
    transform: scale(1.1);
}

/* ============================================
   CYBERPUNK FORMS
   Neon input fields
   ============================================ */

input, textarea, select {
    border: 1px solid rgba(0, 240, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(255, 16, 240, 0.6);
    box-shadow:
        0 0 20px rgba(255, 16, 240, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.6);
    outline: none;
}

/* ============================================
   GLITCH EFFECT (Subtle)
   For special headings or CTAs
   ============================================ */

.glitch {
    position: relative;
    animation: glitch-skew 5s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 3s infinite;
    color: rgba(0, 240, 255, 0.7);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 3s infinite;
    color: rgba(255, 16, 240, 0.7);
    z-index: -2;
}

@keyframes glitch-skew {
    0%, 100% { transform: skew(0deg); }
    20% { transform: skew(-0.5deg); }
    40% { transform: skew(0.5deg); }
    60% { transform: skew(-0.5deg); }
    80% { transform: skew(0.5deg); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    body {
        background-size: 100% 100%;
    }

    h1, h2, h3 {
        text-shadow:
            0 0 8px var(--color-heading),
            0 0 15px var(--color-heading),
            0 0 25px var(--color-heading);
    }

    .card {
        box-shadow:
            0 0 15px rgba(255, 16, 240, 0.3),
            0 6px 24px rgba(0, 0, 0, 0.5);
    }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before {
        animation: none;
    }

    h1, h2, h3 {
        animation: none;
    }

    .glitch {
        animation: none;
    }
}
