* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 20px;
}

.header h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2.5em;
    letter-spacing: 2px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2em;
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 8px;
}

.stat .label {
    color: #666;
    font-weight: bold;
}

.stat span:last-child {
    color: #667eea;
    font-size: 1.4em;
    font-weight: bold;
    min-width: 80px;
}

.game-area {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #333;
}

#gameCanvas {
    border: 5px solid #333;
    background: #87CEEB;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.instructions {
    background: #fffacd;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffd700;
    font-size: 0.95em;
    line-height: 1.6;
}

.instructions p {
    color: #333;
    margin: 8px 0;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.modal-content p {
    color: #666;
    font-size: 1.2em;
    margin: 10px 0;
}

.modal-content button {
    margin-top: 20px;
    font-size: 1.1em;
    padding: 15px 30px;
}

.modal-content button + button {
    margin-left: 10px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .stats {
        gap: 15px;
    }

    .stat {
        font-size: 1em;
    }

    .controls {
        gap: 8px;
    }

    button {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }
}
