* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #e74c3c;
    font-size: 2.5em;
    text-shadow: 3px 3px 0px #c0392b;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.level-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.info-panel {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.score-box, .coins-box, .lives-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 1.2em;
    color: white;
    font-weight: bold;
}

.label {
    margin-right: 5px;
}

.canvas-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#gameCanvas {
    border: 4px solid #2c3e50;
    border-radius: 10px;
    background: #5dade2;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-over, .start-screen, .level-complete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
    min-width: 300px;
}

.hidden {
    display: none;
}

.game-over h2, .start-screen h2, .level-complete h2 {
    color: #e74c3c;
    font-size: 2em;
    margin-bottom: 20px;
}

.start-screen h2 {
    color: #27ae60;
}

.level-complete h2 {
    color: #f39c12;
}

.game-over p {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #34495e;
}

#finalScore {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2em;
}

.level-complete .completed-level {
    font-size: 1.4em;
    font-weight: bold;
    color: #27ae60;
    margin: 15px 0;
}

.level-complete .level-stats {
    font-size: 1.2em;
    color: #3498db;
    margin: 10px 0;
}

.level-complete .bonus {
    font-size: 1.1em;
    color: #f39c12;
    font-weight: bold;
    margin: 10px 0 20px 0;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.victory-message {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.victory-message h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.controls {
    text-align: center;
    color: #2c3e50;
    font-size: 1.1em;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
}

.controls-info {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
}

.controls-info p {
    margin: 8px 0;
    color: #34495e;
    font-size: 1.1em;
}

.controls-info p:first-child {
    font-size: 1.2em;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .info-panel {
        gap: 15px;
    }
    
    .score-box, .coins-box, .lives-box {
        font-size: 1em;
        padding: 8px 15px;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
}


