/* ═══════════════════════════════════════════════════════════════
   The Mixing Blueprint — Shared Theme Variables & Base Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Dark theme (default) ── */
:root, [data-theme="dark"] {
    --crimson: #C51A4A;
    --crimson-light: #E8365F;
    --crimson-dark: #9A1239;
    --crimson-glow: rgba(197, 26, 74, 0.4);
    --bg-body: #06080F;
    --bg-card: #0E1221;
    --bg-card-alt: #0C1019;
    --bg-nav: rgba(6, 8, 15, 0.7);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-faint: #475569;
    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.15);
}

/* ── Light theme ── */
[data-theme="light"] {
    --crimson: #C51A4A;
    --crimson-light: #E8365F;
    --crimson-dark: #9A1239;
    --crimson-glow: rgba(197, 26, 74, 0.15);
    --bg-body: #F5F3F0;
    --bg-card: #FFFFFF;
    --bg-card-alt: #FAF9F7;
    --bg-nav: rgba(245, 243, 240, 0.85);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #7a7a8a;
    --text-faint: #a0a0b0;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.2);
}

/* ── Reset & base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
}

h1, h2, h3, h4, h5 { font-family: 'Syne', sans-serif; }

/* ── Navbar ── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Main content area ── */
.main-content {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 3rem;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.stat-number {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--crimson);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-key {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-bpm {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* ── Section title ── */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Flash messages ── */
.flash-msg {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* ── Theme toggle button ── */
.theme-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { height: 4px; width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
