/* Muziek-Analyse — Global Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    line-height: 1.6;
}

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

/* Navigation */
.main-nav {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid #2a2a4a;
    padding: 0 20px;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand {
    color: #e94560;
    font-weight: 800;
    font-size: 1.2em;
    text-decoration: none;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    color: #888;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.15s;
}
.nav-links a:hover { color: #e0e0e0; background: rgba(255,255,255,0.05); }
.nav-links a.active { color: #e94560; background: rgba(233,69,96,0.1); }

/* Flash messages */
.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9em;
}
.flash-success { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.3); color: #2ecc71; }
.flash-error { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); color: #e74c3c; }
.flash-warning { background: rgba(243,156,18,0.15); border: 1px solid rgba(243,156,18,0.3); color: #f39c12; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { background: #d63851; }
.btn-ghost { background: transparent; color: #888; border: 1px solid #2a2a4a; }
.btn-ghost:hover { color: #e0e0e0; border-color: #444; }
.btn-danger { background: transparent; color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.btn-danger:hover { background: rgba(231,76,60,0.1); }
.btn-small { padding: 4px 10px; font-size: 0.8em; }

/* Active analysis banner */
.active-banner {
    background: rgba(52,152,219,0.1);
    border: 1px solid rgba(52,152,219,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.active-item { display: flex; align-items: center; gap: 10px; }
.active-name { font-weight: 600; color: #3498db; }
.active-step { color: #888; font-size: 0.85em; }

.spinner {
    width: 16px; height: 16px;
    border: 2px solid #2a2a4a;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner-small {
    display: inline-block;
    width: 10px; height: 10px;
    border: 2px solid #2a2a4a;
    border-top-color: #f39c12;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* YouTube import */
.youtube-import { margin-bottom: 16px; }
.youtube-form { display: flex; gap: 8px; }
.youtube-form .search-input { flex: 1; }

/* Search bar */
.search-bar { margin-bottom: 20px; }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    background: #111;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
}
.search-input:focus { outline: none; border-color: #e94560; }
.filter-input {
    padding: 8px 14px;
    background: #111;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    width: 120px;
}
.filter-input:focus { outline: none; border-color: #e94560; }
.filter-small { width: 90px; }

/* Track grid */
.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}
.track-card {
    background: #111;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.15s;
}
.track-card:hover { border-color: #444; }
.track-card-pending { opacity: 0.7; }
.track-link { text-decoration: none; color: inherit; display: block; }
.track-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.track-name { font-size: 0.95em; font-weight: 600; color: #e0e0e0; word-break: break-word; }
.track-meta { display: flex; gap: 12px; margin-bottom: 10px; font-size: 0.85em; }
.track-key { color: #e94560; font-weight: 700; }
.track-bpm { color: #3498db; }
.track-duration { color: #888; }
.track-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #1a1a2e; }

/* Badges */
.badge {
    font-size: 0.7em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.badge-done { background: rgba(46,204,113,0.15); color: #2ecc71; }
.badge-analysing { background: rgba(243,156,18,0.15); color: #f39c12; display: inline-flex; align-items: center; gap: 4px; }
.badge-pending { background: rgba(52,152,219,0.15); color: #3498db; }
.badge-error { background: rgba(231,76,60,0.15); color: #e74c3c; }
.badge-downloading { background: rgba(155,89,182,0.15); color: #9b59b6; display: inline-flex; align-items: center; gap: 4px; }

/* Section card (reused in multiple pages) */
.section-card {
    background: #111;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #2a2a4a;
}

/* Browse folder */
.folder-form label { display: block; margin-bottom: 8px; color: #888; font-size: 0.85em; }
.folder-input-row { display: flex; gap: 8px; }
.file-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.select-actions { display: flex; gap: 4px; }
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
}
.file-item:hover { background: rgba(255,255,255,0.05); }
.file-item-exists { opacity: 0.5; cursor: default; }
.file-item input[type=checkbox] { accent-color: #e94560; }
.file-info { flex: 1; }
.file-name { display: block; font-size: 0.9em; }
.file-meta { display: block; font-size: 0.75em; color: #888; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #555; }
.empty-state h2 { color: #888; margin-bottom: 8px; }
.empty-state a { color: #e94560; }

/* Page title */
.page-title { color: #e94560; margin-bottom: 20px; }

/* Footer */
footer { text-align: center; padding: 24px 16px; color: #333; font-size: 0.75em; }
