/* ============================================================
   MusicHelper — Design System & Global Styles
   ============================================================ */
@import url('components.css');
@import url('pages.css');

/* --- CSS Variables --- */
:root {
    --font-primary: 'Outfit', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-purple: #7c3aed;
    --accent-pink: #ec4899;
    --accent-blue: #0ea5e9;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-teal: #14b8a6;
    --accent-amber: #f59e0b;
    --accent-indigo: #6366f1;
    --gradient-primary: linear-gradient(135deg, #0ea5e9, #3b82f6);
    --gradient-blue: linear-gradient(135deg, #0ea5e9, #38bdf8);
    --gradient-green: linear-gradient(135deg, #10b981, #34d399);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 30px rgba(14,165,233,0.25);
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --container-max: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--accent-purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-pink); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-primary); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-top: -1.5rem; margin-bottom: 2rem; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem;
    border: none; border-radius: var(--radius-md); font-family: var(--font-body);
    font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all var(--transition);
    text-decoration: none; line-height: 1.4;
}
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); color: white; }
.btn-secondary { background: #ffffff; color: var(--text-primary); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: #f8fafc; color: var(--text-primary); border-color: #cbd5e1; }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-outline:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* --- Badges --- */
.badge {
    display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem;
    border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-primary { background: rgba(14,165,233,0.1); color: #0284c7; }
.badge-secondary { background: #f1f5f9; color: var(--text-secondary); }
.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-warning { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-danger { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-default { background: #e2e8f0; color: var(--text-muted); }

/* --- Forms --- */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary); }
.form-control {
    width: 100%; padding: 0.75rem 1rem; background: #ffffff;
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.form-control:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(14,165,233,0.2); }
.form-control::placeholder { color: var(--text-muted); }
.form-help { display: block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239e9bb0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* --- Flash Messages --- */
.flash-message {
    position: fixed; top: 1rem; right: 1rem; z-index: 9999; max-width: 400px;
    border-radius: var(--radius-md); animation: slideIn 0.3s ease;
    transition: opacity 0.3s, transform 0.3s;
}
.flash-content {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem;
    background: #ffffff; border-radius: var(--radius-md); font-size: 0.9rem;
    box-shadow: var(--shadow-md);
}
.flash-success .flash-content { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.flash-error .flash-content { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.flash-info .flash-content { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #60a5fa; }
.flash-close { background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; margin-left: auto; opacity: 0.7; }
.flash-close:hover { opacity: 1; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
