/* simidiots.com — 90s pixel art playful arcade game */

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === BASE === */
html {
    scroll-behavior: smooth;
}

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

/* === COMMON === */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #FFFFFF;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2.5rem;
}

/* === PULSE DOT === */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00FF88;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 1.5s ease-in-out infinite;
    vertical-align: middle;
}

.pulse-dot.small {
    width: 6px;
    height: 6px;
    margin-right: 4px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* === HERO === */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.confetti-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.confetti-piece {
    position: absolute;
    width: 6px;
    height: 6px;
    animation: confetti-drift linear infinite;
}

.confetti-piece.circle {
    border-radius: 50%;
}

@keyframes confetti-drift {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.game-title {
    position: relative;
    z-index: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 10vw, 5rem);
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow:
        4px 4px 0 #FF3366,
        8px 8px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.player-count {
    position: relative;
    z-index: 1;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.95rem;
    color: #00FF88;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-button {
    position: relative;
    z-index: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #1A1A2E;
    background: #00FF88;
    border: 3px solid #1A1A1A;
    box-shadow: 0 6px 0 #1A1A1A;
    padding: 1rem 3.5rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    border-radius: 4px;
    user-select: none;
}

.game-button:hover {
    background: #33FFaa;
}

.game-button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #1A1A1A;
}

/* === GAME MODES === */
.game-modes {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mode-card {
    background: #16213E;
    border: 3px solid;
    border-radius: 4px;
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mode-red { border-color: #FF3366; }
.mode-purple { border-color: #6C63FF; }
.mode-gold { border-color: #FFCC00; }

.mode-icon {
    margin-bottom: 0.5rem;
}

.mode-icon svg {
    display: block;
}

.mode-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.mode-desc {
    font-size: 0.85rem;
    color: #E8E8E8;
    opacity: 0.7;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.player-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.75rem;
    color: #00FF88;
    background: rgba(0, 255, 136, 0.15);
    border-radius: 4px;
    padding: 3px 10px;
    margin-bottom: 0.75rem;
}

.play-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #1A1A2E;
    background: #FFFFFF;
    border: 2px solid #1A1A1A;
    box-shadow: 0 4px 0 #1A1A1A;
    padding: 0.5rem 2rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 4px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    user-select: none;
}

.play-btn:hover {
    background: #F0F0F0;
}

.play-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #1A1A1A;
}

/* === LIVE FEED === */
.live-feed {
    padding: 3rem 0;
    overflow: hidden;
}

.feed-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.marquee-strip {
    background: #FF3366;
    padding: 0.85rem 0;
    overflow: hidden;
    position: relative;
}

.marquee-strip::before,
.marquee-strip::after {
    content: '';
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-strip::before {
    left: 0;
    background: linear-gradient(to right, #FF3366, transparent);
}

.marquee-strip::after {
    right: 0;
    background: linear-gradient(to left, #FF3366, transparent);
}

.marquee-content {
    display: flex;
    gap: 4rem;
    animation: marquee-scroll 40s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.feed-item {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #FFFFFF;
    flex-shrink: 0;
}

.feed-item strong {
    font-weight: 500;
    color: #FFCC00;
}

/* === LEADERBOARD === */
.leaderboard {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
}

.lb-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lb-header {
    display: grid;
    grid-template-columns: 50px 1fr 100px 60px;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.lb-header span {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.65rem;
    color: #E8E8E8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.lb-h-score,
.lb-h-streak {
    text-align: right;
}

.lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px 60px;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.lb-row:hover {
    background: rgba(108, 99, 255, 0.08);
}

.lb-row.alt {
    background: rgba(255, 255, 255, 0.03);
}

.lb-row.alt:hover {
    background: rgba(108, 99, 255, 0.1);
}

.lb-medal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
}

.lb-medal svg {
    display: block;
}

.lb-medal.plain {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: #E8E8E8;
    opacity: 0.5;
}

.lb-medal.gold svg {
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.4));
}

.lb-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #FFFFFF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-laughs {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.8rem;
    color: #E8E8E8;
    text-align: right;
}

.lb-row[data-rank="1"] .lb-laughs {
    color: #FFCC00;
}

.lb-streak {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    color: #00FF88;
    background: rgba(0, 255, 136, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}

/* === FOOTER / HUD === */
.footer {
    padding: 0;
}

.hud-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background: #16213E;
    border-top: 2px solid #FF3366;
    padding: 1rem 2rem;
}

.hud-players {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.8rem;
    color: #00FF88;
    display: flex;
    align-items: center;
}

.hud-sound {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E8E8E8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.hud-sound:hover {
    color: #FFCC00;
}

.hud-sound.muted {
    color: #FF3366;
    opacity: 0.5;
}

.hud-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
}

.hud-credits {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #E8E8E8;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.hud-credits:hover {
    opacity: 1;
    color: #FFFFFF;
}

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

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .mode-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .lb-header,
    .lb-row {
        grid-template-columns: 40px 1fr 80px 50px;
        gap: 0.5rem;
        padding: 0.6rem 0.75rem;
    }

    .lb-laughs {
        font-size: 0.7rem;
    }

    .lb-streak {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .game-title {
        text-shadow:
            3px 3px 0 #FF3366,
            6px 6px 0 rgba(0, 0, 0, 0.2);
    }

    .hud-bar {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1.5rem;
        min-height: 90vh;
    }

    .game-button {
        padding: 0.85rem 2.5rem;
        font-size: 1.1rem;
    }

    .leaderboard {
        padding: 3rem 1rem 4rem;
    }
}
