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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f0f23;
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Main Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Minimal Header */
.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid #334155;
    padding: 25px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.header-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.header-content p {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.author {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    gap: 40px;
}

/* Left Panel - Scrollable Sliders */
.left-panel {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding-right: 15px;
}

.sliders-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

/* Right Panel - Sticky Controls */
.right-panel {
    width: 420px;
    position: sticky;
    top: 30px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 20px;
}

/* Graph Section */
.graph-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.graph-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: flex-end;
}

.graph-container {
    background: #0f172a;
    border-radius: 8px;
    padding: 15px;
    height: 250px;
}

/* Control Cards */
.control-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.control-card h3 {
    color: #f1f5f9;
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #3b82f6;
    color: white;
}

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

.btn-primary {
    background: #059669;
}

.btn-primary:hover {
    background: #047857;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-accent {
    background: #8b5cf6;
}

.btn-accent:hover {
    background: #7c3aed;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-round:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.btn-stop {
    background: #ef4444;
}

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

/* Input Styles */
.input {
    padding: 10px 16px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 14px;
    transition: border-color 0.2s ease;
    width: 100%;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* File Controls */
.file-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.playback-controls {
    display: flex;
    gap: 12px;
}

.mp3-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.mp3-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.mp3-info {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* Slider Styles */
.slider {
    -webkit-appearance: none;
    background: #334155;
    height: 6px;
    border-radius: 3px;
    outline: none;
    transition: background 0.2s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.slider-small {
    width: 80px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-group .slider {
    flex: 1;
}

.progress-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-slider {
    flex: 1;
}

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

/* Status and Labels */
.status {
    font-weight: 500;
    color: #94a3b8;
    font-size: 13px;
}

.freq-display {
    font-weight: 600;
    color: #f1f5f9;
    min-width: 70px;
    font-size: 14px;
}

.time {
    font-size: 12px;
    color: #94a3b8;
    min-width: 40px;
    text-align: center;
}

.label {
    font-size: 12px;
    color: #94a3b8;
}

/* EQ Frequency Sections */
.freq-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-left: 20px;
    margin-right: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.section-header h4 {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    display: block;
}

.section-content.collapsed {
    display: none;
}

.freq {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 0;
}

.freq label {
    width: 80px;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.freq .slider {
    flex: 1;
    max-width: none;
    min-width: 250px;
}

.freq span {
    width: 50px;
    font-size: 14px;
    text-align: right;
    color: #e2e8f0;
    font-weight: 500;
}

/* Value Controls */
.value-container {
    display: flex;
    align-items: center;
    gap: 0;
}

.value-input {
    width: 60px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #334155;
    border-left: none;
    border-right: none;
    background: #0f172a;
    color: #e2e8f0;
    text-align: center;
    font-size: 12px;
}

.value-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.decrease-btn {
    border-radius: 6px 0 0 6px;
}

.increase-btn {
    border-radius: 0 6px 6px 0;
}

.value-btn:hover {
    background: #334155;
    color: #f1f5f9;
}

/* Reset Buttons */
.reset-section {
    padding: 6px 16px;
    font-size: 13px;
    background: #ef4444;
    border-radius: 6px;
}

.reset-section:hover {
    background: #dc2626;
}

.reset-freq {
    padding: 4px 8px;
    font-size: 11px;
    background: #ef4444;
    border-radius: 4px;
    margin-left: 8px;
}

.reset-freq:hover {
    background: #dc2626;
}

/* Output Section */
.output-section {
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.output-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.output-header h3 {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 1.1rem;
}

.output-textarea {
    width: 100%;
    height: 120px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    color: #e2e8f0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
}

.output-textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Footer Panel */
.footer-panel {
    background: #0f172a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.footer-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer-notice {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Scrollbar Styling */
.left-panel::-webkit-scrollbar {
    width: 8px;
}

.left-panel::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        padding: 20px 30px;
        gap: 30px;
    }
    
    .right-panel {
        width: 380px;
    }
    
    .header-content {
        padding: 0 30px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .right-panel {
        position: static;
        width: 100%;
        padding-left: 0;
    }
    
    .left-panel {
        max-height: none;
        padding-right: 0;
    }
    
    .header-content {
        padding: 0 20px;
    }
    
    .freq-section,
    .output-section {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px 0;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .main-content {
        padding: 15px;
        gap: 15px;
    }
    
    .graph-container {
        height: 200px;
        padding: 10px;
    }
    
    .freq-section {
        padding: 16px;
    }
    
    .freq {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .freq label {
        width: auto;
        text-align: left;
    }
    
    .freq .slider {
        min-width: auto;
        width: 100%;
    }
    
    .freq span {
        width: auto;
        text-align: left;
    }
    
    .file-controls,
    .audio-controls,
    .mp3-controls {
        gap: 8px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .graph-controls {
        justify-content: center;
    }
    
    .slider-group,
    .progress-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .playback-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .freq-section,
    .control-card,
    .output-card {
        padding: 12px;
    }
    
    .graph-container {
        height: 150px;
    }
}