@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400,700&display=swap');

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

body {
    font-family: 'Courier Prime', 'Courier New', monospace;
    background: linear-gradient(135deg, #1a0000 0%, #330000 50%, #1a0000 100%);
    color: #ff6b35;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.fire-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 100%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-size: 3.5rem;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 40px rgba(255, 107, 53, 0.4);
    letter-spacing: 3px;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2rem;
    color: #ffaa80;
    font-style: italic;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.panel {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ff6b35;
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.panel h2 {
    color: #ff6b35;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.instructions {
    text-align: left;
    margin: 20px 0;
    color: #ffaa80;
}

.instructions p {
    margin-bottom: 10px;
}

.instructions ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

.danger {
    color: #ff4444;
}

.timer-info {
    color: #ffaa80;
    text-align: center;
    margin: 20px 0;
}

.btn-primary {
    padding: 15px 40px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ff6b35 0%, #ff4444 100%);
    border: none;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Courier Prime', monospace;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    transition: transform 0.1s;
    display: block;
    margin: 30px auto;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    padding: 12px 30px;
    font-size: 1.2rem;
    background: rgba(255, 107, 53, 0.2);
    border: 2px solid #ff6b35;
    border-radius: 5px;
    color: #ff6b35;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Courier Prime', monospace;
    transition: transform 0.1s;
    margin: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 107, 53, 0.3);
}

.btn-secondary:active {
    transform: scale(0.95);
}

/* Game Screen */
.game-hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: bold;
}

.hud-item {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid #ff6b35;
}

.game-area {
    position: relative;
    height: 500px;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #ff6b35;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(255, 107, 53, 0.2);
}

.game-item {
    position: absolute;
    padding: 12px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: float 2.5s ease-in-out forwards;
    user-select: none;
    transition: transform 0.1s;
}

.game-item.burn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4444 100%);
    border: 2px solid #ffaa80;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
}

.game-item.avoid {
    background: linear-gradient(135deg, #4444ff 0%, #2222aa 100%);
    border: 2px solid #8888ff;
    box-shadow: 0 0 15px rgba(68, 68, 255, 0.6);
}

.game-item:hover {
    transform: scale(1.1);
}

.game-item:active {
    transform: scale(0.9);
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Game Over Screen */
.final-score {
    font-size: 3rem;
    font-weight: bold;
    margin: 20px 0;
    color: #ffaa80;
    text-align: center;
}

.score-submit {
    margin-top: 30px;
    text-align: center;
}

#playerName {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #ff6b35;
    border-radius: 5px;
    color: #ff6b35;
    font-family: 'Courier Prime', monospace;
    margin-bottom: 15px;
}

#playerName:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* Leaderboard */
.leaderboard-section {
    margin-top: 40px;
}

.leaderboard-section h3 {
    color: #ff6b35;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

#leaderboardTable {
    width: 100%;
    border-collapse: collapse;
    color: #ffaa80;
}

#leaderboardTable thead tr {
    border-bottom: 2px solid #ff6b35;
}

#leaderboardTable th {
    padding: 10px;
    text-align: left;
}

#leaderboardTable th:last-child {
    text-align: right;
}

#leaderboardTable tbody tr {
    border-bottom: 1px solid rgba(255, 107, 53, 0.3);
}

#leaderboardTable td {
    padding: 8px;
}

#leaderboardTable td:last-child {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .panel {
        padding: 20px;
    }
    
    .game-area {
        height: 400px;
    }
}
