/* Musical Chairs Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 600px;
    width: 100%;
}

/* Header Styles */
header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 300;
}

/* File Upload Styles */
.file-upload {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.file-upload.dragover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.02);
}

.file-upload h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
    margin-bottom: 15px;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-label {
    background: linear-gradient(45deg, #9C27B0, #E91E63);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
    font-size: 1rem;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

.song-info {
    color: white;
    margin: 15px 0;
    font-size: 1rem;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Volume Control */
.volume-control {
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.volume-icon {
    font-size: 1.2rem;
}

.volume-slider {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    cursor: pointer;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-text {
    color: white;
    font-size: 0.9rem;
    min-width: 40px;
    font-weight: bold;
}

/* Timer Display */
.timer-display {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.timer-text {
    color: white;
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin: 20px 0 0 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 5px;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Status Display */
.status {
    color: white;
    font-size: 1.3rem;
    margin: 20px 0;
    padding: 15px;
    border-radius: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.status.playing {
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.status.stopped {
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid #f44336;
    animation: pulse 1s infinite;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.3);
}

.status.ready {
    background: rgba(33, 150, 243, 0.3);
    border: 2px solid #2196F3;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Control Buttons */
.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

button {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    min-width: 160px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.reset-btn {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.reset-btn:hover {
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

/* Music Animation */
.music-note {
    font-size: 2rem;
    margin: 0 10px;
    display: inline-block;
    animation: bounce 1s infinite;
}

.music-note:nth-child(2) {
    animation-delay: 0.2s;
}

.music-note:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Instructions */
.instructions {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 30px 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h4 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2rem;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.instructions li:before {
    content: "🎵";
    position: absolute;
    left: 0;
}

/* Footer */
footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Android-specific optimizations */
@media screen and (max-width: 768px) {
    /* Improve touch targets for Android */
    button, .file-label {
        min-height: 48px; /* Android recommended touch target */
        touch-action: manipulation; /* Disable double-tap zoom */
    }
    
    /* Optimize for Android keyboards */
    input[type="file"] {
        font-size: 16px; /* Prevent zoom on focus */
    }
    
    /* Better scrolling on Android */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* Prevent Android text selection issues */
    .timer-text, .status, .song-info {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* High DPI Android displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-device-pixel-ratio: 2) {
    /* Crisp text rendering on high-DPI Android screens */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .timer-text {
        font-size: 2.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 250px;
    }
    
    .volume-control {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .instructions {
        text-align: center;
    }
    
    .instructions li {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .file-label {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .timer-text {
        font-size: 2rem;
    }
    
    .status {
        font-size: 1.1rem;
        padding: 12px;
    }
}