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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "Space Mono", monospace;
    background: #0a0a0a;
    color: #00ff88;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 440px;
    width: 100%;
    text-align: center;
}

.message {
    font-size: 22px;
    color: #ddd;
    line-height: 1.8;
    margin-bottom: 40px;
}

.landing {
    padding: 80px 0;
}

.launch-btn {
    font-family: "Space Mono", monospace;
    font-size: 16px;
    color: #00ff88;
    background: none;
    border: none;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.launch-btn:hover {
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.game-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    padding: 0 4px;
}

.score {
    font-size: 14px;
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

canvas {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1;
    background: #111;
    border: 2px solid #333;
    border-radius: 2px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1), inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.game-wrapper {
    position: relative;
    margin-bottom: 48px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.leaderboard {
    text-align: left;
    border: 1px solid #222;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard h2 {
    font-size: 14px;
    font-weight: 400;
    color: #ff4444;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #1a1a1a;
    font-size: 14px;
}

.leaderboard-entry .rank {
    color: #555;
    width: 28px;
}

.leaderboard-entry .name {
    flex: 1;
    color: #00ff88;
}

.leaderboard-entry .entry-score {
    color: #ffff00;
    margin-left: 16px;
}

.leaderboard-entry .date {
    color: #444;
    font-size: 11px;
    margin-left: 12px;
}

.empty-board {
    font-size: 13px;
    color: #444;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal {
    text-align: center;
    padding: 40px;
    max-width: 360px;
    width: 100%;
    border: 2px solid #ff4444;
    background: #0a0a0a;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.2);
}

.modal h2 {
    font-size: 20px;
    font-weight: 400;
    color: #ff4444;
    margin-bottom: 12px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.final-score {
    font-size: 14px;
    color: #ffff00;
    margin-bottom: 24px;
}

.modal-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.modal-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #333;
    border-radius: 0;
    font-size: 14px;
    font-family: "Space Mono", monospace;
    outline: none;
    background: #111;
    color: #00ff88;
}

.modal-form input::placeholder {
    color: #333;
}

.modal-form input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
}

.modal-form button {
    padding: 10px 16px;
    background: #00ff88;
    color: #0a0a0a;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-family: "Space Mono", monospace;
    cursor: pointer;
    text-transform: uppercase;
}

.modal-form button:hover {
    background: #00cc6a;
}

.play-again {
    background: none;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 13px;
    font-family: "Space Mono", monospace;
    color: #555;
    cursor: pointer;
    text-transform: uppercase;
}

.play-again:hover {
    border-color: #555;
    color: #888;
}

@media (max-width: 480px) {
    body {
        padding: 40px 20px;
    }

    .message {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .landing {
        padding: 50px 0;
    }

    .launch-btn {
        font-size: 13px;
    }

    canvas {
        max-width: 280px;
    }

    .game-wrapper {
        margin-bottom: 32px;
    }

    .score {
        font-size: 12px;
    }

    .leaderboard {
        padding: 16px;
    }

    .leaderboard h2 {
        font-size: 12px;
    }

    .leaderboard-entry {
        font-size: 11px;
        padding: 8px 0;
    }

    .leaderboard-entry .date {
        font-size: 9px;
    }

    .modal {
        padding: 30px 24px;
        margin: 0 20px;
    }

    .modal h2 {
        font-size: 15px;
    }

    .final-score {
        font-size: 12px;
    }

    .modal-form {
        flex-direction: column;
    }

    .modal-form input {
        font-size: 13px;
    }

    .modal-form button {
        font-size: 12px;
        padding: 10px;
    }

    .play-again {
        font-size: 11px;
    }
}
