/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d1421 0%, #1a2332 50%, #263238 100%);
    min-height: 100vh;
    color: #e0f7fa;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: center;
    gap: 20px;
}

/* Dominant Visualization */
.visualization-container {
    width: 90vw;
    height: 60vh;
    background: #1a1a2e;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #26c6da;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    background: #2d3748;
    border-radius: 15px;
    display: block;
}

/* Game UI Overlay */
.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
}

.score-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(26, 26, 46, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #26c6da;
}

.score-display span {
    color: #e0f7fa;
    font-weight: 600;
    font-size: 0.9rem;
}

.note-hint {
    background: rgba(26, 26, 46, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #26c6da;
    color: #e0f7fa;
    font-weight: 500;
    font-size: 0.9rem;
    max-width: 300px;
    text-align: center;
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    padding: 12px 25px;
    border: 2px solid #26c6da;
    border-radius: 20px;
    background: linear-gradient(45deg, #26c6da, #00acc1);
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 198, 218, 0.4);
    border-color: #4dd0e1;
}

.control-btn.connected {
    background: linear-gradient(45deg, #66bb6a, #4caf50);
    border-color: #66bb6a;
    color: white;
}

.midi-status {
    font-size: 0.9rem;
    color: #b2dfdb;
    font-weight: 500;
}

.game-timer {
    font-size: 0.9rem;
    color: #e0f7fa;
    font-weight: 600;
    background: rgba(26, 26, 46, 0.8);
    padding: 8px 15px;
    border-radius: 12px;
    border: 1px solid #26c6da;
}

/* Mission Box */
.mission-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    padding: 15px 25px;
    border-radius: 12px;
    border: 2px solid #26c6da;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

/* Byte Companion */
.byte-companion {
    position: relative;
}

.byte-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #26c6da, #00acc1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #4dd0e1;
    box-shadow: 0 4px 12px rgba(38, 198, 218, 0.3);
    transition: all 0.5s ease;
}

.byte-character {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Byte Happy State */
.byte-companion.happy .byte-circle {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    border-color: #81c784;
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.5);
    animation: byte-bounce 0.6s ease-in-out;
}

.byte-companion.happy .byte-character {
    transform: scale(1.2);
}

@keyframes byte-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.mission-text h3 {
    margin: 0;
    color: #e0f7fa;
    font-size: 1.1rem;
    font-weight: 600;
}

.mission-text p {
    margin: 2px 0 0 0;
    color: #b2dfdb;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Modal Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 20, 33, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.timer-modal {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #26c6da;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.timer-modal .byte-companion {
    margin-bottom: 20px;
}

.timer-modal .byte-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.timer-modal .byte-character {
    width: 5rem;
    height: 5rem;
}

.modal-content h2 {
    color: #e0f7fa;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal-timer {
    font-size: 3rem;
    font-weight: bold;
    color: #26c6da;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.modal-content p {
    color: #b2dfdb;
    font-size: 1.1rem;
    margin: 10px 0;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.9);
    padding: 10px 0;
    border-top: 1px solid #26c6da;
}

.impressum {
    text-align: center;
}

.impressum p {
    color: #b2dfdb;
    font-size: 0.8rem;
    margin: 0;
}

.impressum a {
    color: #4dd0e1;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.impressum a:hover {
    color: #80deea;
}

/* Game Specific Styles */
.player {
    fill: #26c6da;
    stroke: #004d5c;
    stroke-width: 2;
}

.obstacle {
    fill: #ff5722;
    stroke: #d84315;
    stroke-width: 2;
}

.game-paused {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .mission-box {
        max-width: 90%;
        padding: 10px 15px;
    }
    
    .game-ui {
        flex-direction: column;
        gap: 10px;
    }
    
    .timer-modal {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-timer {
        font-size: 2rem;
    }
}