/* 80s Vibes - Stranger Things Inspired */
/* Neon lights, dark atmosphere, retro-futuristic synth aesthetic */

/* Cinzel + Orbitron (Stranger Things vibe) are loaded non-blocking from base.html (Req 58.2). */

:root {
    /* Stranger Things Color Palette */
    --st-black: #0A0A0A;
    --st-dark: #1A1A2E;
    --st-darker: #0F0F1A;
    --st-red: #E50914;           /* Netflix/Stranger Things red */
    --st-neon-red: #FF1744;
    --st-neon-pink: #FF4081;
    --st-neon-blue: #00E5FF;
    --st-neon-purple: #7C4DFF;
    --st-warm-white: #FFF8E7;
    --st-cream: #F5DEB3;
    --st-gold: #FFD700;
    --st-orange: #FF6D00;
    --st-teal: #00BFA5;
    
    /* Upside Down colors */
    --ud-blue: #1A237E;
    --ud-purple: #4A148C;
    --ud-green: #004D40;
    
    --bg-primary: #0A0A0A;
    --bg-secondary: #1A1A2E;
    --text-primary: #FFF8E7;
    --text-secondary: #F5DEB3;
    
    --border-primary: #E50914;
    --border-secondary: #FF4081;
    
    --success: #00BFA5;
    --error: #FF1744;
    --warning: #FFD700;
    
    /* 80s Font - Cinzel for titles (similar to Benguiat), Orbitron for tech feel */
    --font-family-80s-title: 'Cinzel', 'Times New Roman', serif;
    --font-family-80s-body: 'Orbitron', 'Courier New', monospace;
}

body {
    background: linear-gradient(180deg, #0A0A0A 0%, #1A1A2E 50%, #0F0F1A 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-primary) !important;
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-base) !important;
    line-height: var(--line-height-base) !important;
    /* Subtle noise texture */
    background-image: 
        linear-gradient(180deg, #0A0A0A 0%, #1A1A2E 50%, #0F0F1A 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E") !important;
}

/* Stranger Things title style - glowing red text */
h1, h2, h3 {
    font-family: var(--font-family-80s-title) !important;
    color: var(--st-red) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    text-shadow: 
        0 0 10px var(--st-red),
        0 0 20px var(--st-red),
        0 0 40px var(--st-neon-red),
        0 0 80px var(--st-neon-red) !important;
    animation: st-flicker 4s ease-in-out infinite !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

@keyframes st-flicker {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 10px var(--st-red), 0 0 20px var(--st-red), 0 0 40px var(--st-neon-red), 0 0 80px var(--st-neon-red); 
    }
    25%, 75% { 
        opacity: 0.9; 
        text-shadow: 0 0 5px var(--st-red), 0 0 10px var(--st-red), 0 0 20px var(--st-neon-red), 0 0 40px var(--st-neon-red); 
    }
    50% { 
        opacity: 0.85; 
        text-shadow: 0 0 3px var(--st-red), 0 0 6px var(--st-red), 0 0 12px var(--st-neon-red), 0 0 24px var(--st-neon-red); 
    }
}

h1 { font-size: var(--font-size-h1) !important; }
h2 { font-size: var(--font-size-h2) !important; }
h3 { font-size: var(--font-size-h3) !important; }

.pixel-border {
    background: rgba(26, 26, 46, 0.9) !important;
    border: 2px solid var(--st-red) !important;
    box-shadow: 
        0 0 10px var(--st-red),
        0 0 20px rgba(229, 9, 20, 0.5),
        inset 0 0 30px rgba(229, 9, 20, 0.1) !important;
    padding: var(--spacing-lg) !important;
    position: relative;
}

.pixel-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--st-red), var(--st-neon-pink), var(--st-neon-purple), var(--st-neon-blue));
    z-index: -1;
    filter: blur(10px);
    opacity: 0.3;
    animation: st-border-glow 3s ease-in-out infinite alternate;
}

@keyframes st-border-glow {
    0% { opacity: 0.2; filter: blur(10px); }
    100% { opacity: 0.4; filter: blur(15px); }
}

.pixel-border * { color: var(--text-primary) !important; }

.retro-button {
    background: transparent !important;
    color: var(--st-red) !important;
    border: 2px solid var(--st-red) !important;
    box-shadow: 
        0 0 5px var(--st-red),
        inset 0 0 5px rgba(229, 9, 20, 0.3) !important;
    text-shadow: 0 0 10px var(--st-red) !important;
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-button) !important;
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease !important;
}

.retro-button:hover {
    background: var(--st-red) !important;
    color: var(--st-black) !important;
    box-shadow: 
        0 0 20px var(--st-red),
        0 0 40px var(--st-neon-red),
        inset 0 0 10px rgba(255, 255, 255, 0.2) !important;
    text-shadow: none !important;
    transform: none !important;
}

.retro-button-small { font-size: var(--font-size-button-small) !important; padding: 6px 12px; }
.retro-button-large { font-size: var(--font-size-button-large) !important; padding: 14px 28px; }

.retro-button-cyan {
    border-color: var(--st-neon-blue) !important;
    color: var(--st-neon-blue) !important;
    box-shadow: 0 0 5px var(--st-neon-blue), inset 0 0 5px rgba(0, 229, 255, 0.3) !important;
    text-shadow: 0 0 10px var(--st-neon-blue) !important;
}

.retro-button-cyan:hover {
    background: var(--st-neon-blue) !important;
    color: var(--st-black) !important;
}

.retro-button-green {
    border-color: var(--st-teal) !important;
    color: var(--st-teal) !important;
    box-shadow: 0 0 5px var(--st-teal), inset 0 0 5px rgba(0, 191, 165, 0.3) !important;
    text-shadow: 0 0 10px var(--st-teal) !important;
}

.retro-button-green:hover {
    background: var(--st-teal) !important;
    color: var(--st-black) !important;
}

nav a.retro-button:hover {
    background: var(--st-red) !important;
    color: var(--st-black) !important;
}

nav a.retro-button:active, nav a.retro-button.active {
    background: var(--st-neon-pink) !important;
    color: var(--st-black) !important;
    border-color: var(--st-neon-pink) !important;
}

select:hover, .form-select:hover {
    border-color: var(--st-neon-blue) !important;
    box-shadow: 0 0 10px var(--st-neon-blue) !important;
}

select option:checked, select option:focus {
    background: var(--st-red) !important;
    color: var(--st-black) !important;
}

.badge {
    background: transparent !important;
    color: var(--st-neon-pink) !important;
    border: 2px solid var(--st-neon-pink) !important;
    box-shadow: 0 0 5px var(--st-neon-pink) !important;
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-badge) !important;
    text-transform: uppercase;
}

/* Neon glow animations for badges */
.badge-new {
    border-color: var(--st-gold) !important;
    color: var(--st-gold) !important;
    box-shadow: 0 0 5px var(--st-gold), 0 0 10px var(--st-gold) !important;
    animation: st-pulse 2s ease-in-out infinite !important;
}

.badge-hot {
    border-color: var(--st-neon-red) !important;
    color: var(--st-neon-red) !important;
    box-shadow: 0 0 5px var(--st-neon-red), 0 0 10px var(--st-neon-red) !important;
    animation: st-pulse 1.5s ease-in-out infinite !important;
}

@keyframes st-pulse {
    0%, 100% { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
    50% { box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor; }
}

/* Keep some animations for 80s feel */
.blink-slow { animation: st-flicker 4s ease-in-out infinite !important; }
.blink { animation: st-flicker 2s ease-in-out infinite !important; }

input, textarea, select {
    background: rgba(10, 10, 10, 0.8) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--st-red) !important;
    box-shadow: 0 0 5px rgba(229, 9, 20, 0.3), inset 0 0 10px rgba(229, 9, 20, 0.1) !important;
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-input) !important;
    padding: 10px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--st-neon-blue) !important;
    box-shadow: 0 0 10px var(--st-neon-blue), inset 0 0 10px rgba(0, 229, 255, 0.1) !important;
}
/* Suppress the native outline only for non-keyboard (mouse) focus so the
   shared color-independent :focus-visible ring from retro.css stays visible
   for keyboard users (project-optimization UX-033, Req 4.3). */
input:focus:not(:focus-visible), textarea:focus:not(:focus-visible), select:focus:not(:focus-visible) {
    outline: none;
}

.form-label {
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-label) !important;
    color: var(--st-red) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.alert {
    background: rgba(26, 26, 46, 0.9) !important;
    border: 2px solid var(--st-red) !important;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3) !important;
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-base) !important;
}

.alert-success { border-color: var(--st-teal) !important; box-shadow: 0 0 10px rgba(0, 191, 165, 0.3) !important; }
.alert-error { border-color: var(--st-neon-red) !important; box-shadow: 0 0 10px rgba(255, 23, 68, 0.3) !important; }
.alert-warning { border-color: var(--st-gold) !important; box-shadow: 0 0 10px rgba(255, 215, 0, 0.3) !important; }

a {
    color: var(--st-neon-blue) !important;
    text-decoration: none !important;
    text-shadow: 0 0 5px var(--st-neon-blue) !important;
    font-family: var(--font-family-80s-body) !important;
    transition: all 0.3s ease !important;
}

a:hover {
    color: var(--st-neon-pink) !important;
    text-shadow: 0 0 10px var(--st-neon-pink), 0 0 20px var(--st-neon-pink) !important;
}

table {
    border: 2px solid var(--st-red) !important;
    background: rgba(26, 26, 46, 0.8) !important;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3) !important;
    font-family: var(--font-family-80s-body) !important;
}

th, td {
    border: 1px solid rgba(229, 9, 20, 0.5) !important;
    color: var(--text-primary) !important;
    padding: 10px;
    font-size: var(--font-size-base) !important;
}

th {
    background: rgba(229, 9, 20, 0.2) !important;
    color: var(--st-red) !important;
    text-shadow: 0 0 5px var(--st-red) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-bar {
    border: 2px solid var(--st-red) !important;
    background: rgba(10, 10, 10, 0.8) !important;
    box-shadow: 0 0 5px rgba(229, 9, 20, 0.3) !important;
}

.progress-fill {
    background: linear-gradient(90deg, var(--st-red), var(--st-neon-pink), var(--st-neon-purple)) !important;
    box-shadow: 0 0 10px var(--st-red) !important;
}

.progress-text {
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-badge) !important;
    text-shadow: 0 0 5px var(--st-red) !important;
}

.visitor-counter {
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-badge) !important;
    border: 2px solid var(--st-red) !important;
    background: rgba(10, 10, 10, 0.8) !important;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3) !important;
}

.visitor-counter .digits {
    font-size: var(--font-size-button) !important;
    color: var(--st-red) !important;
    text-shadow: 0 0 10px var(--st-red) !important;
}

.loading-text {
    font-family: var(--font-family-80s-body) !important;
    font-size: var(--font-size-button) !important;
    color: var(--st-red) !important;
    text-shadow: 0 0 10px var(--st-red) !important;
}

.loading-spinner {
    border: 3px solid rgba(229, 9, 20, 0.3) !important;
    border-top-color: var(--st-red) !important;
    box-shadow: 0 0 10px var(--st-red) !important;
}

::selection {
    background: var(--st-red) !important;
    color: var(--st-black) !important;
}

p, div, span, label { font-family: var(--font-family-80s-body) !important; }
