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

body {
    font-family: 'Arial', sans-serif;
    background-color: #87CEEB;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.game-header {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4, #45B7D1);
    color: white;
    padding: 20px;
    text-align: center;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.info-item .label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.info-item .value {
    font-size: 1.5em;
    font-weight: bold;
}

.game-main {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #F0F8FF;
}

#gameCanvas {
    flex: 1;
    border: 3px solid #45B7D1;
    border-radius: 15px;
    background-color: #98FB98;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-controls {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-info {
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.control-info h3 {
    color: #FF6B6B;
    margin-bottom: 15px;
}

.control-info p {
    margin: 10px 0;
    font-size: 1.1em;
}

.game-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: #4ECDC4;
    color: white;
}

.btn-primary:hover {
    background-color: #45B7D1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.btn-secondary {
    background-color: #95A5A6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7F8C8D;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

.btn-danger {
    background-color: #FF6B6B;
    color: white;
}

.btn-danger:hover {
    background-color: #E74C3C;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.game-over-content {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 400px;
}

.game-over-content h2 {
    color: #FF6B6B;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.final-stats {
    margin: 30px 0;
    font-size: 1.2em;
}

.final-stats p {
    margin: 10px 0;
}

.final-stats span {
    font-weight: bold;
    color: #4ECDC4;
}

.level-up {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
    animation: levelUpPulse 0.5s ease-in-out;
}

@keyframes levelUpPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.level-up-content h2 {
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.level-up-content p {
    font-size: 1.2em;
    margin: 10px 0;
}

.level-up-content span {
    font-weight: bold;
    font-size: 1.5em;
}

.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .game-main {
        flex-direction: column;
        align-items: center;
    }
    
    .game-controls {
        width: 100%;
        max-width: 800px;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }
    
    .control-info {
        flex: 1;
    }
    
    .game-buttons {
        flex: 1;
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-info {
        gap: 15px;
    }
    
    .info-item {
        padding: 8px 15px;
    }
    
    .info-item .value {
        font-size: 1.2em;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-info,
    .game-buttons {
        width: 100%;
        max-width: none;
    }
}