/* mechanic.monster - 90s Pixel Art Playful Aesthetic */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1a0a2e;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== HERO SECTION (BOOT) ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: #1a0a2e;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    z-index: 2;
    animation: scanlineFlicker 0.15s infinite;
}

@keyframes scanlineFlicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Gear Icon - Constructed from CSS squares */
.gear-icon {
    display: grid;
    grid-template-columns: repeat(3, 8px);
    gap: 2px;
    margin-bottom: 1rem;
    animation: gearSpin 6s linear infinite;
}

@keyframes gearSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gear-square {
    width: 8px;
    height: 8px;
    animation: pixelPulse 0.5s ease-in-out infinite;
}

@keyframes pixelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.g1 { background: #39ff14; }
.g2 { background: #ff6ec7; animation-delay: 0.1s; }
.g3 { background: #ffe600; animation-delay: 0.2s; }
.g4 { background: #39ff14; animation-delay: 0.3s; }
.g5 { background: #ff6ec7; animation-delay: 0.4s; }
.g6 { background: #ffe600; animation-delay: 0.5s; }
.g7 { background: #39ff14; animation-delay: 0.1s; }
.g8 { background: #ff6ec7; animation-delay: 0.3s; }
.g9 { background: #ffe600; animation-delay: 0.2s; }

/* Brand Title */
.brand-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    text-transform: uppercase;
    color: #39ff14;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
    letter-spacing: 0.1em;
    animation: flicker 0.3s infinite;
    position: relative;
}

@keyframes flicker {
    0%, 100% { text-shadow: 0 0 20px rgba(57, 255, 20, 0.5); }
    50% { text-shadow: 0 0 10px rgba(57, 255, 20, 0.3); }
}

.brand-break {
    color: #ff6ec7;
    margin: 0 4px;
}

/* Cursor Blink */
.cursor {
    display: inline-block;
    width: 12px;
    height: 0.9em;
    background: #39ff14;
    vertical-align: bottom;
    margin-left: 4px;
}

.cursor.blink {
    animation: blink 0.6s step-end infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Level Badge */
.level-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    color: #39ff14;
    border: 3px solid #39ff14;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 3;
}

.lvl-num {
    color: #ff6ec7;
    font-weight: 700;
}

/* ===== BUILDS SECTION ===== */
.builds {
    padding: 4rem 2rem;
    background: #1a0a2e;
    min-height: 80vh;
}

.section-header {
    max-width: 900px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #39ff14;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.pixel-divider {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 2rem;
}

.pixel-dot {
    width: 8px;
    height: 8px;
    display: block;
}

.pixel-dot.green {
    background: #39ff14;
}

.pixel-dot.pink {
    background: #ff6ec7;
}

.pixel-dot.yellow {
    background: #ffe600;
}

/* Builds Grid */
.builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.build-card {
    border: 4px solid #39ff14;
    background: #2a1a3e;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.build-card:hover {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
    transform: translateY(-4px);
}

.card-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 10px 16px;
    display: block;
    letter-spacing: 0.1em;
}

.green-header {
    background: #39ff14;
    color: #1a0a2e;
}

.pink-header {
    background: #ff6ec7;
    color: #1a0a2e;
}

.yellow-header {
    background: #ffe600;
    color: #1a0a2e;
}

.card-body {
    padding: 1.5rem;
}

.card-text {
    font-size: 0.85rem;
    color: #c0c0c0;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.card-stat {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #ffe600;
    display: block;
    letter-spacing: 0.05em;
}

/* ===== STATS SECTION ===== */
.stats {
    padding: 4rem 2rem;
    background: #1a0a2e;
    min-height: 80vh;
}

.stats-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #39ff14;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.pixel-divider-stats {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 3rem;
}

.stats-container {
    max-width: 600px;
    margin: 0 auto;
}

.stat-group {
    margin-bottom: 2rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #39ff14;
    min-width: 90px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-bar {
    flex: 1;
    height: 16px;
    background: #2a1a3e;
    border: 2px solid #39ff14;
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    transition: width 0.8s ease;
}

.green-fill {
    background: linear-gradient(90deg, #39ff14 0%, #39ff14 100%);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}

.pink-fill {
    background: linear-gradient(90deg, #ff6ec7 0%, #ff6ec7 100%);
    box-shadow: 0 0 10px rgba(255, 110, 199, 0.6);
}

.yellow-fill {
    background: linear-gradient(90deg, #ffe600 0%, #ffe600 100%);
    box-shadow: 0 0 10px rgba(255, 230, 0, 0.6);
}

.stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ff6ec7;
    min-width: 45px;
    text-align: right;
}

/* ===== SHUTDOWN SECTION ===== */
.shutdown {
    padding: 4rem 2rem;
    background: #1a0a2e;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.shutdown-content {
    position: relative;
    z-index: 3;
}

.game-over {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-transform: uppercase;
    color: #ff6ec7;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px rgba(255, 110, 199, 0.4);
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 110, 199, 0.4); }
    50% { text-shadow: 0 0 10px rgba(255, 110, 199, 0.2); }
}

.pixel-divider-footer {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 2rem 0;
}

.footer-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #39ff14;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .builds-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 80vh;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .stats-title {
        font-size: 1.2rem;
    }

    .game-over {
        font-size: 1.5rem;
    }

    .stat-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-bar {
        width: 100%;
    }
}
