/* ============================================
   RETRO/ARCADE THEME - 8-Bit Pixel Style
   ============================================ */

:root {
    --primary: #ff0055;
    --primary-dark: #cc0044;
    --secondary: #00ff99;
    --accent: #ffff00;
    --dark: #1a0b1a;
    --darker: #0d050d;
    --card: #251525;
    --card-hover: #301e30;
    --text: #e8e0e8;
    --text-muted: #a080a0;
    --border: #4a254a;
    --grid-color: rgba(255, 0, 85, 0.1);
    --scanline: rgba(0, 0, 0, 0.3);
    --font-display: 'Press Start 2P', cursive;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body {
    font-family: var(--font-body);
    background: var(--darker);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* CRT Scanline Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            var(--scanline) 2px,
            var(--scanline) 4px
        );
    pointer-events: none;
    z-index: 50; /* Lower than navbar but above content */
    opacity: 0.3;
}

/* Navbar Fixes for Retro Theme */
.navbar {
    background: var(--card);
    border-bottom: 4px solid var(--border);
    box-shadow: 0 4px 0 var(--primary);
    z-index: 100;
}

.navbar .nav-link {
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-brand {
    font-family: var(--font-display);
    text-shadow: 2px 2px 0 var(--primary);
}

/* Retro Grid Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

.theme-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--card);
    padding: 10px;
    border: 4px solid var(--border);
    box-shadow: 
        4px 4px 0 var(--primary),
        inset 0 0 20px rgba(255, 0, 85, 0.1);
}

.theme-btn {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    background: var(--darker);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.theme-btn:hover, .theme-btn.active {
    border-color: var(--primary);
    color: var(--accent);
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: scale(1.05);
}

.navbar {
    background: var(--dark);
    border-bottom: 4px solid var(--primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(255, 0, 85, 0.3);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent);
    text-decoration: none;
    text-shadow: 
        3px 3px 0 var(--primary),
        -1px -1px 0 var(--secondary);
    letter-spacing: -1px;
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
    52% { opacity: 0.5; }
    54% { opacity: 1; }
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 
        3px 3px 0 var(--primary),
        inset 0 0 10px rgba(255, 0, 85, 0.2);
}

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, var(--darker) 0%, var(--dark) 50%, var(--darker) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 50% 30% at 50% 20%, rgba(255, 0, 85, 0.2), transparent),
        radial-gradient(ellipse 30% 20% at 80% 80%, rgba(0, 255, 153, 0.1), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-shadow: 
        4px 4px 0 var(--primary),
        -2px -2px 0 var(--secondary);
    line-height: 1.4;
    letter-spacing: -2px;
}

.page-header h1 {
    color: var(--accent);
    text-shadow:
        4px 4px 0 var(--primary),
        -2px -2px 0 var(--secondary);
}

.page-header h1 span {
    color: var(--secondary);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 2px var(--dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    box-shadow: 4px 4px 0 var(--primary);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--primary);
}

.btn-primary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-primary:hover {
    background: #00ffaa;
    box-shadow: 
        4px 4px 0 var(--primary),
        0 0 20px var(--secondary);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 3px solid var(--accent);
    box-shadow: 4px 4px 0 var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--dark);
    box-shadow: 
        4px 4px 0 var(--primary),
        0 0 20px var(--accent);
}

.card {
    background: var(--card);
    border: 3px solid var(--border);
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translate(-2px, -2px);
    border-color: var(--primary);
    box-shadow: 
        8px 8px 0 var(--primary),
        0 0 20px rgba(255, 0, 85, 0.3);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    border-bottom: 3px solid var(--border);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
    line-height: 1.4;
}

.card-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
    text-shadow: 
        3px 3px 0 var(--primary),
        -1px -1px 0 var(--secondary);
    line-height: 1.5;
}

.section-header h2 span {
    color: var(--secondary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--dark);
    border-top: 4px solid var(--border);
    border-bottom: 4px solid var(--border);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-display);
    font-size: 0.6rem;
    text-transform: uppercase;
    margin-right: 0.5rem;
    border: 2px solid;
}

.badge-primary {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    border-color: #00cc7a;
    color: var(--dark);
}

.footer {
    background: var(--darker);
    border-top: 4px solid var(--primary);
    padding: 3rem 0 1rem;
    box-shadow: 0 -10px 30px rgba(255, 0, 85, 0.2);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    font-family: var(--font-display);
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-shadow: 2px 2px 0 var(--primary);
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 2px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.7rem;
}

/* Glitch Effect for special elements */
.glitch {
    animation: glitch 2s infinite;
}

@keyframes glitch {
    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); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .card-title {
        font-size: 0.75rem;
    }
}
