@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #feca57 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: floatingParticles 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatingParticles {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    max-width: 700px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}


header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
    position: relative;
}

header h1::after {
    content: '🎵';
    position: absolute;
    right: -50px;
    top: 0;
    font-size: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

header p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.5;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.controls {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: nowrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 100px;
    flex: 1;
    max-width: 200px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(-2px) scale(1.02);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #4ecdc4, #6dd5d1);
    color: white;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 15px 35px rgba(78, 205, 196, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #feca57, #ffd93d);
    color: #333;
    box-shadow: 0 8px 25px rgba(254, 202, 87, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 15px 35px rgba(254, 202, 87, 0.4);
}

.music-controls {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.8));
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 25px;
    border: 2px dashed rgba(78, 205, 196, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}




.music-source {
    margin-bottom: 1rem;
}

.music-source.hidden {
    display: none;
}

.music-source label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.music-source input[type="file"],
.music-source input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.music-source input[type="file"]:focus,
.music-source input[type="url"]:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.2), 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.music-source input[type="url"] {
    margin-bottom: 1rem;
}

.youtube-player {
    margin-top: 1rem;
    text-align: center;
}

.youtube-player.hidden {
    display: none;
}

.music-controls label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.music-controls input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.volume-control input[type="range"] {
    flex: 1;
    min-width: 150px;
}

.volume-control span {
    font-weight: 600;
    color: #495057;
    min-width: 40px;
}

.game-status {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 25px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.game-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: statusShimmer 2s ease-in-out infinite;
}

@keyframes statusShimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.status-message {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.countdown {
    font-size: 3rem;
    font-weight: 800;
    color: #ff6b6b;
    animation: countdownPulse 0.5s infinite;
    text-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

@keyframes countdownPulse {
    0%, 100% { 
        transform: scale(1);
        color: #ff6b6b;
    }
    50% { 
        transform: scale(1.2);
        color: #ff4757;
    }
}

.countdown.hidden {
    display: none;
}

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

.timeline-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #dee2e6;
}

.timeline-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 4px;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.game-settings {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.8));
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 25px;
    border: 2px dashed rgba(254, 202, 87, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}



.setting-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 600;
    color: #495057;
    min-width: 200px;
    text-align: left;
}

.setting-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 10px 0;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #feca57, #ffd93d);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.3);
    transition: all 0.3s ease;
}

.setting-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(254, 202, 87, 0.4);
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #feca57, #ffd93d);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.3);
    transition: all 0.3s ease;
}

.setting-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(254, 202, 87, 0.4);
}

.setting-group input[type="range"]::-webkit-slider-track {
    background: linear-gradient(90deg, #feca57, #ffd93d);
    height: 8px;
    border-radius: 5px;
}

.setting-group input[type="range"]::-moz-range-track {
    background: linear-gradient(90deg, #feca57, #ffd93d);
    height: 8px;
    border-radius: 5px;
    border: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .controls {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-width: 80px;
        max-width: 100px;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-group label {
        min-width: auto;
        text-align: left;
    }
    
    .volume-control {
        flex-direction: column;
        align-items: center;
    }
}

/* Game state animations */
.game-playing .status-message {
    animation: dance 0.5s ease-in-out infinite alternate;
    color: #4ecdc4;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.game-paused .status-message {
    animation: freeze 0.3s ease-in-out infinite;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.game-playing .container {
    animation: gamePlaying 2s ease-in-out infinite;
}

.game-paused .container {
    animation: gamePaused 0.5s ease-in-out infinite;
}

@keyframes dance {
    0% { 
        transform: translateX(-8px) rotate(-2deg);
        color: #4ecdc4;
    }
    100% { 
        transform: translateX(8px) rotate(2deg);
        color: #45b7d1;
    }
}

@keyframes freeze {
    0%, 100% { 
        transform: scale(1);
        color: #ff6b6b;
    }
    50% { 
        transform: scale(1.1);
        color: #ff4757;
    }
}

@keyframes gamePlaying {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
    25% { 
        transform: translateY(-5px) rotate(0.5deg);
        box-shadow: 0 30px 60px rgba(78, 205, 196, 0.2);
    }
    75% { 
        transform: translateY(-3px) rotate(-0.5deg);
        box-shadow: 0 30px 60px rgba(78, 205, 196, 0.2);
    }
}

@keyframes gamePaused {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 30px 60px rgba(255, 107, 107, 0.3);
    }
}

