/* ==========================================================================
   EffecTune - Modern Audio Engineering Studio UI
   ========================================================================== */

:root {
    --bg-main: #090d16;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(26, 34, 54, 0.85);
    --bg-inner: rgba(10, 14, 23, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.4);
    --border-glow: 0 0 20px rgba(99, 102, 241, 0.25);
    
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-ab-active: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #070a12 0%, #0c121e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem 4rem;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 700px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}

.brand-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

/* Auth bar */
.auth-bar {
    width: 100%;
    max-width: 860px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
    min-height: 2.5rem;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.4rem 0.4rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-chip .user-name {
    color: var(--text-primary);
    font-weight: 600;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 9999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.logout-btn:hover:not(:disabled) {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

.logout-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.app-title {
    margin-bottom: 0.6rem;
    line-height: 0;
}

.app-logo {
    width: 240px;
    max-width: 100%;
    height: auto;
}

.app-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Card Component */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.card-title svg {
    color: var(--accent-indigo);
}

/* ==========================================================================
   Drop Zone / Upload Section
   ========================================================================== */
.drop-zone {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    background: var(--bg-inner);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.drop-zone:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(18, 24, 40, 0.8);
}

.drop-zone.drag-active {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: var(--border-glow);
    transform: scale(1.01);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    pointer-events: none;
}

.upload-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    margin-bottom: 0.3rem;
    transition: var(--transition);
}

.drop-zone:hover .upload-icon-circle,
.drop-zone.drag-active .upload-icon-circle {
    transform: translateY(-4px) scale(1.05);
    color: #ffffff;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.drop-zone-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.drop-zone-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.drop-zone-btn {
    pointer-events: auto;
    margin: 0.5rem 0;
}

.supported-formats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.format-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.format-tag.highlight {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* File Input hidden */
.hidden-file-input {
    display: none;
}

/* Selected File Card */
.selected-file-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.25rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.selected-file-info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    overflow: hidden;
}

.selected-file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.selected-file-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.selected-file-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 450px;
}

.selected-file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-file:hover {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.15);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-accent {
    background: var(--gradient-accent);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--gradient-success);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ==========================================================================
   Waveform Section
   ========================================================================== */
.waveform-wrapper {
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

#waveform {
    width: 100%;
    min-height: 110px;
}

.waveform-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.playback-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-play-pause {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
}

.btn-play-pause:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.preset-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.preset-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.preset-select {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.preset-select:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.preset-select option {
    background: #182030;
    color: var(--text-primary);
}

/* ==========================================================================
   Settings / Audio Rack Section
   ========================================================================== */
.sliders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.slider-card {
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    transition: var(--transition);
}

.slider-card:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
}

.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.slider-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.value-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* Range input styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-indigo);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #818cf8;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-indigo);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    cursor: pointer;
}

/* Reverb Row */
.reverb-card {
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reverb-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.reverb-mix-row {
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-subtle);
    transition: opacity 0.2s ease;
}

.reverb-mix-row.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.reverb-info {
    display: flex;
    flex-direction: column;
}

.reverb-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reverb-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.reverb-select {
    min-width: 240px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.reverb-select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.reverb-select option {
    background: #182030;
    color: var(--text-primary);
}

/* Toggles Section */
.toggles-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
}

.toggle-info {
    display: flex;
    flex-direction: column;
}

.toggle-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: var(--accent-emerald);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Processing Actions */
.actions-row {
    display: flex;
    gap: 1rem;
}

.actions-row .btn {
    flex: 1;
    padding: 0.85rem 1rem;
}

/* ==========================================================================
   Preview & A/B Comparison Section
   ========================================================================== */
.preview-section {
    border-color: rgba(139, 92, 246, 0.35);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, rgba(18, 24, 38, 0.85) 100%);
    animation: fadeIn 0.4s ease;
}

.preview-help {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.ab-comparison-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.btn-ab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-ab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.ab-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.btn-ab.active {
    background: var(--gradient-ab-active);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.4);
}

.btn-ab.active .ab-badge {
    background: #ffffff;
    color: var(--accent-indigo);
}

.active-effects-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.effect-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

/* ==========================================================================
   Output Section
   ========================================================================== */
.output-card {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(18, 24, 38, 0.85) 100%);
    animation: fadeIn 0.4s ease;
}

.audio-player-wrapper {
    margin: 1.25rem 0;
}

audio {
    width: 100%;
    border-radius: var(--radius-md);
    outline: none;
}

.download-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 400px;
    padding: 1rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.45;
    color: #ffffff;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.toast::before {
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.toast-error {
    background: rgba(220, 38, 38, 0.94);
}

.toast-error::before {
    content: '⚠';
}

.toast-success {
    background: rgba(5, 150, 105, 0.94);
}

.toast-success::before {
    content: '✓';
}

.toast-info {
    background: rgba(79, 70, 229, 0.94);
}

.toast-info::before {
    content: 'ℹ';
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
    animation: modalPop 0.25s ease;
}

.modal-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.modal-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.modal-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.modal-google-btn {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--text-primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    from { transform: scale(0.94) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 680px) {
    body {
        padding: 1.5rem 1rem;
    }
    .app-logo {
        width: 180px;
    }
    .promo-carousel-viewport {
        padding: 0 36px;
    }
    .promo-arrow {
        width: 32px;
        height: 32px;
    }
    .promo-card {
        flex-basis: 160px;
    }
    .promo-card-img-wrap {
        height: 112px;
    }
    .sliders-grid, .toggles-row {
        grid-template-columns: 1fr;
    }
    .actions-row, .ab-comparison-controls {
        flex-direction: column;
    }
    .waveform-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .playback-group {
        justify-content: space-between;
    }
    .preset-group {
        justify-content: space-between;
    }
    .reverb-top-row {
        flex-direction: column;
        align-items: stretch;
    }
    .reverb-select {
        width: 100%;
    }
}

/* Footer */
.app-footer {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.app-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.app-footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.85;
}

.app-footer-credit img {
    height: 34px;
    width: auto;
}

.app-footer-credit:hover {
    opacity: 1;
}

/* Promo Carousel */
.promo-carousel {
    width: 100%;
    max-width: 860px;
    margin-top: 2.5rem;
}

.promo-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.promo-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
}

.promo-cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition);
}

.promo-cta:hover {
    color: #67e8f9;
    text-decoration: underline;
}

.promo-carousel-viewport {
    position: relative;
    padding: 0 46px;
}

.promo-carousel-clip {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.promo-carousel-track {
    display: flex;
    gap: 1rem;
    will-change: transform;
}

.promo-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(9, 13, 22, 0.85);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.promo-arrow:hover {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.promo-arrow-prev { left: 0; }
.promo-arrow-next { right: 0; }

.promo-card {
    position: relative;
    flex: 0 0 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}

.promo-card:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--border-glow), 0 16px 32px rgba(0, 0, 0, 0.35);
    transform: translateY(-3px);
}

.promo-card-img-wrap {
    position: relative;
    height: 140px;
    background: var(--bg-inner);
}

.promo-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.promo-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(9, 13, 22, 0.75);
    color: var(--text-secondary);
    backdrop-filter: blur(4px);
    max-width: calc(100% - 1rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.promo-card-discount {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: var(--accent-rose);
    color: #ffffff;
}

.promo-card-body {
    padding: 0.7rem 0.8rem 0.8rem;
}

.promo-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.45rem;
    line-height: 1.35;
    min-height: 2.2em;
}

.promo-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.promo-card-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-emerald);
}

.promo-card-price-original {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
