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

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

.container {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

/* ============================================
   START SCREEN
   ============================================ */
#start-screen {
    text-align: center;
}

.status-text {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

.big-button {
    width: 100%;
    padding: 24px;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.big-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.big-button:active {
    transform: translateY(0);
}

/* ============================================
   PLAYER SCREEN
   ============================================ */
#now-playing {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
}

.label {
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#track-title {
    color: #333;
    font-size: 24px;
    margin: 10px 0;
    font-weight: 600;
}

.track-type {
    display: inline-block;
    padding: 6px 16px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-container {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================
   CONTROLS
   ============================================ */
.controls {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.control-btn {
    width: 70px;
    height: 70px;
    font-size: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 25px;
}

.volume-control span {
    font-size: 20px;
}

#volume {
    width: 120px;
    cursor: pointer;
}

/* ============================================
   SECONDARY CONTROLS
   ============================================ */
.secondary-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.secondary-btn {
    padding: 12px 24px;
    font-size: 16px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

.stop-btn {
    background: #fee;
    color: #c33;
}

.stop-btn:hover {
    background: #fcc;
}

/* ============================================
   SETTINGS PANEL
   ============================================ */
.settings-panel {
    margin-top: 24px;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.settings-panel.hidden {
    display: none;
}

.settings-panel h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 20px;
}

.settings-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.slider-group {
    margin-bottom: 20px;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
}

.slider-label {
    font-size: 16px;
    color: #333;
}

.slider-value {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    min-width: 50px;
    text-align: right;
}

.slider-group input[type="range"] {
    width: 100%;
    cursor: pointer;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.readonly-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.nothing-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

.settings-tip {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

/* ============================================
   DEBUG PANEL
   ============================================ */
.debug-panel {
    margin-top: 24px;
    padding: 20px;
    background: #fff9e6;
    border: 2px solid #ffd700;
    border-radius: 12px;
}

.debug-panel h3 {
    color: #ff8c00;
    margin-bottom: 16px;
    font-size: 18px;
}

.debug-info {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: monospace;
    font-size: 14px;
}

.debug-info p {
    margin: 4px 0;
}

.debug-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.debug-btn {
    padding: 10px;
    font-size: 14px;
    background: #ff8c00;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.debug-btn:hover {
    background: #ff7700;
    transform: translateY(-1px);
}

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

.debug-interval {
    margin-top: 16px;
}

.debug-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .container {
        padding: 24px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 4px;
    }
    
    #volume {
        width: 100px;
    }
}
