/* Liberty Sound - Main Styles */

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f35 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo i {
    font-size: 32px;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

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

.logo h1 {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.clear-search:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Alphabet Navigation */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.alphabet-btn {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
}

.alphabet-btn:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.alphabet-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Multitracks Library */
.multitracks-library {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.library-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.track-count {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

/* Multitracks Grid */
.multitracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.multitrack-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.multitrack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.multitrack-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.multitrack-card:hover::before {
    transform: scaleX(1);
}

.multitrack-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: var(--shadow-md);
}

.multitrack-icon i {
    font-size: 28px;
    color: white;
}

.multitrack-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.multitrack-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.multitrack-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 18px;
}

/* DAW Modal */
.daw-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.daw-modal.active {
    display: flex;
}

.daw-container {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--border-color);
}

.daw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-secondary));
}

.daw-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.daw-title i {
    font-size: 28px;
    color: var(--primary-color);
}

.daw-title h2 {
    font-size: 24px;
    font-weight: 700;
}

.close-btn {
    background: var(--bg-tertiary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
}

.daw-content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Transport Controls */
.transport-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.transport-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.transport-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.transport-btn.primary {
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.transport-btn.primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    background: var(--bg-dark);
    padding: 12px 20px;
    border-radius: 10px;
}

.time-separator {
    color: var(--text-muted);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.volume-control i {
    font-size: 20px;
    color: var(--primary-color);
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-dark);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

#volumeValue {
    font-weight: 600;
    min-width: 45px;
    color: var(--text-secondary);
}

/* Timeline */
.timeline-container {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.timeline {
    position: relative;
    height: 50px;
    background: var(--bg-dark);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 10px;
}

.playhead {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.timeline-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Tracks Panel */
.tracks-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.track-item {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.track-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.track-item.muted {
    opacity: 0.5;
}

.track-item.solo {
    border-color: var(--warning-color);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.track-color {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.track-type {
    font-size: 13px;
    color: var(--text-muted);
}

.track-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.track-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.track-btn:hover {
    transform: scale(1.1);
}

.track-btn.mute-btn.active {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.track-btn.solo-btn.active {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

.track-volume {
    width: 120px;
}

.track-volume input {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .search-container {
        max-width: 100%;
    }

    .alphabet-nav {
        gap: 6px;
        padding: 15px;
    }

    .alphabet-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 40px;
    }

    .multitracks-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .transport-controls {
        padding: 20px;
        gap: 15px;
    }

    .volume-control {
        width: 100%;
        min-width: 100%;
    }

    .daw-header {
        padding: 20px;
    }

    .daw-title h2 {
        font-size: 20px;
    }

    .daw-content {
        padding: 20px;
    }

    .track-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .track-controls {
        width: 100%;
        justify-content: space-between;
    }

    .track-volume {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo i {
        font-size: 28px;
    }

    .multitracks-grid {
        grid-template-columns: 1fr;
    }

    .alphabet-nav {
        justify-content: center;
    }

    .transport-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .transport-btn.primary {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .time-display {
        font-size: 16px;
        padding: 10px 15px;
    }

    .daw-modal {
        padding: 10px;
    }

    .daw-container {
        max-height: 95vh;
        border-radius: 15px;
    }
}
