/* DJ Mixes - Clean, minimal design */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-waveform: #3b82f6;
    --color-waveform-progress: #1e40af;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: 150ms ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--color-primary);
}

/* Main */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* States */
.loading, .error, .empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Mix Card */
.mixes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mix-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow var(--transition);
}

.mix-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Mix Header */
.mix-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mix-cover {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
}

.mix-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.mix-cover-placeholder svg {
    width: 32px;
    height: 32px;
}

.mix-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.mix-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mix-meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.mix-meta span + span::before {
    content: '·';
    margin: 0 0.5rem;
}

.mix-description {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Player */
.mix-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
}

.btn-play:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

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

.btn-play svg {
    width: 20px;
    height: 20px;
}

.btn-play .icon-play {
    margin-left: 2px;
}

.player-time {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-muted);
    min-width: 90px;
}

.waveform-container {
    flex: 1;
    min-width: 0;
    height: 60px;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
}

.waveform {
    width: 100%;
    height: 100%;
}

/* Actions */
.mix-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.mix-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.stat svg {
    width: 16px;
    height: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-download {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-download:hover {
    background: var(--color-border);
}

/* Tracklist */
.mix-tracklist {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.mix-tracklist h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tracklist {
    list-style: none;
    font-size: 0.875rem;
}

.tracklist li {
    padding: 0.5rem 0;
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.tracklist li:last-child {
    border-bottom: none;
}

.tracklist .track-time {
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    width: 50px;
}

.tracklist .track-artist {
    font-weight: 500;
}

.tracklist .track-title {
    color: var(--color-text-muted);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* Responsive */
@media (max-width: 640px) {
    .mix-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mix-cover {
        width: 100%;
        height: 200px;
    }

    .mix-player {
        flex-direction: column;
        align-items: stretch;
    }

    .player-controls {
        justify-content: center;
    }

    .waveform-container {
        height: 80px;
    }

    .mix-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mix-stats {
        justify-content: center;
    }

    .btn-download {
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f0f0f;
        --color-bg-alt: #1a1a1a;
        --color-text: #f5f5f5;
        --color-text-muted: #9ca3af;
        --color-border: #2d2d2d;
        --color-waveform: #60a5fa;
        --color-waveform-progress: #3b82f6;
    }
}
