/* THW - Landing Page Styles */

:root {
    --primary: #4ade80;
    --primary-dark: #22c55e;
    --primary-light: #86efac;
    --accent: #00d4ff;
    --accent-dark: #0891b2;
    --danger: #e94560;
    --danger-dark: #be123c;
    --trap: #a855f7;
    --trap-dark: #7c3aed;
    --projectile: #fbbf24;

    --bg-dark: #0f0f1a;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-card-hover: rgba(42, 42, 74, 0.8);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --text: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --radius: 4px;
    --radius-sm: 2px;
    --radius-lg: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 24px;
    background: linear-gradient(to bottom, rgba(15, 15, 26, 0.95), transparent);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    image-rendering: pixelated;
}

.nav-back:hover {
    color: var(--bg-dark);
    background: var(--accent);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: translateX(-4px);
}

.nav-back svg {
    transition: transform 0.3s ease;
}

.nav-back:hover svg {
    transform: translateX(-2px);
}

/* Hero Section */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    opacity: 0.5;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(233, 69, 96, 0.15);
    border: 2px solid rgba(233, 69, 96, 0.4);
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--danger);
    margin-bottom: 24px;
    animation: badgePulse 3s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        border-color: rgba(233, 69, 96, 0.4);
        box-shadow: none;
    }

    50% {
        border-color: rgba(233, 69, 96, 0.8);
        box-shadow: 0 0 15px rgba(233, 69, 96, 0.3);
    }
}

.hero-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(32px, 8vw, 72px);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 24px;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.title-line {
    display: block;
    color: var(--text);
}

.title-line.accent {
    color: var(--primary);
    text-shadow: 0 0 40px rgba(74, 222, 128, 0.4), 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--danger);
    border: 2px solid var(--danger);
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0px var(--danger-dark), 0 4px 20px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0px var(--danger-dark), 0 8px 30px rgba(233, 69, 96, 0.5);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px var(--danger-dark);
}

.btn-primary.large {
    padding: 20px 40px;
    font-size: 14px;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: transparent;
    border: 2px solid var(--border-hover);
    color: var(--text-secondary);
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.death-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.skull {
    font-size: 18px;
    color: var(--danger);
    animation: skullBob 2s infinite ease-in-out;
}

@keyframes skullBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

#deathTicker {
    color: var(--danger);
    font-size: 14px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scaleY(0.8);
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Section Styles */

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 400;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto;
}

/* Features */

.features {
    background: linear-gradient(180deg, transparent, rgba(74, 222, 128, 0.02), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(0, 212, 255, 0.15));
    margin-bottom: 20px;
    font-size: 24px;
}

.feature-icon.skull span {
    color: var(--danger);
}

.feature-icon.chaos span {
    color: var(--projectile);
}

.feature-icon.trap span {
    color: var(--trap);
}

.pixel-icon span {
    color: var(--primary);
}

.feature-card h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Chaos Grid */

.danger-preview {
    background: linear-gradient(180deg, transparent, rgba(233, 69, 96, 0.02), transparent);
}

.chaos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.chaos-card {
    padding: 24px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.chaos-card:hover {
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.15);
    transform: translateY(-3px);
}

.chaos-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--danger);
}

.chaos-card h4 {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: var(--text);
    margin-bottom: 8px;
}

.chaos-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Info Section (Controls & Tips) */

.info-section {
    background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.02), transparent);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.info-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.info-card h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text);
}

.keys-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.key-group {
    display: flex;
    gap: 6px;
}

.key-box {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 2px solid var(--border);
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: var(--text);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

.key-box.wide {
    min-width: 80px;
    font-size: 8px;
}

.keys-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Tips */

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 12px;
    color: var(--text-secondary);
}

.tip-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.tip-icon.bad {
    color: var(--danger);
}

.tip-icon.good {
    color: var(--primary);
}

/* Final CTA */

.final-cta {
    padding: 120px 0;
}

.cta-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(18px, 4vw, 28px);
    margin-bottom: 16px;
    color: var(--text);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

/* Footer */

.footer {
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.footer-pixels {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 40px;
}

.footer-pixels span {
    width: 6px;
    background: var(--primary);
    animation: pixelPulse 2s infinite ease-in-out;
}

.footer-pixels span:nth-child(1) {
    height: 12px;
    animation-delay: 0s;
}

.footer-pixels span:nth-child(2) {
    height: 20px;
    animation-delay: 0.1s;
}

.footer-pixels span:nth-child(3) {
    height: 32px;
    animation-delay: 0.2s;
}

.footer-pixels span:nth-child(4) {
    height: 16px;
    animation-delay: 0.3s;
}

.footer-pixels span:nth-child(5) {
    height: 28px;
    animation-delay: 0.4s;
}

.footer-pixels span:nth-child(6) {
    height: 40px;
    animation-delay: 0.5s;
    background: var(--danger);
}

.footer-pixels span:nth-child(7) {
    height: 24px;
    animation-delay: 0.6s;
}

.footer-pixels span:nth-child(8) {
    height: 36px;
    animation-delay: 0.7s;
    background: var(--accent);
}

.footer-pixels span:nth-child(9) {
    height: 18px;
    animation-delay: 0.8s;
}

.footer-pixels span:nth-child(10) {
    height: 30px;
    animation-delay: 0.9s;
}

.footer-pixels span:nth-child(11) {
    height: 14px;
    animation-delay: 1s;
}

.footer-pixels span:nth-child(12) {
    height: 26px;
    animation-delay: 1.1s;
}

.footer-pixels span:nth-child(13) {
    height: 38px;
    animation-delay: 1.2s;
    background: var(--danger);
}

.footer-pixels span:nth-child(14) {
    height: 22px;
    animation-delay: 1.3s;
}

.footer-pixels span:nth-child(15) {
    height: 10px;
    animation-delay: 1.4s;
}

@keyframes pixelPulse {

    0%,
    100% {
        transform: scaleY(0.4);
        opacity: 0.3;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Responsive */

@media (max-width: 768px) {
    .hero {
        padding: 100px 16px 60px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    section {
        padding: 60px 0;
    }

    .chaos-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .chaos-card {
        padding: 16px 12px;
    }

    .chaos-icon {
        font-size: 24px;
    }

    .chaos-card h4 {
        font-size: 8px;
    }
}