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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

.container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    padding: 60px 50px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #e2e8f0;
    margin-bottom: 8px;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 30px;
    font-size: 1em;
    font-weight: 300;
}

.music-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.music-controls {
    display: flex;
    gap: 8px;
}

.music-control-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.music-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.music-control-btn:active {
    transform: scale(0.95);
}

.song-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.song-title {
    color: #94a3b8;
    font-size: 0.9em;
    font-weight: 400;
    display: block;
}

.song-title.playing {
    color: #818cf8;
    animation: slideText 15s linear infinite;
}

.music-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-weight: 500;
}

.music-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.music-btn.playing {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
}

.music-btn .icon {
    font-size: 1.2em;
    animation: pulse 2s ease-in-out infinite;
}

.music-btn.playing .icon {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

@keyframes slideText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-10px); }
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-icon {
    font-size: 1.1em;
}

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #818cf8;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #818cf8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb:hover {
    background: #6366f1;
    transform: scale(1.2);
}

.time-selector {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.time-selector label {
    display: block;
    color: #cbd5e1;
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 12px;
}

.time-selector #timeValue {
    color: #818cf8;
    font-weight: 700;
    font-size: 1.1em;
}

.time-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.time-slider:hover {
    opacity: 1;
}

.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.time-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.6);
}

.time-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.time-slider::-moz-range-thumb:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.6);
}

.timer-display {
    font-size: 7em;
    font-weight: 700;
    color: #e2e8f0;
    margin: 40px 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
    transition: color 0.3s ease;
}

.timer-display.active {
    color: #818cf8;
}

.timer-display.break {
    color: #34d399;
}

.mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 10px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.mode-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #818cf8;
}

.controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    padding: 16px 40px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #818cf8;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85em;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

footer {
    margin-top: 40px;
    color: #64748b;
    font-size: 0.85em;
    font-weight: 300;
}

@media (max-width: 600px) {
    .timer-display {
        font-size: 4.5em;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mode-selector {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
    }
}
