:root {
  --bg: #06060a;
  --card: #12131a;
  --card-hover: #1a1b26;
  --border: #23243a;
  --text: #e4e4e7;
  --muted: #a1a1aa;
  --accent: #8b5cf6;
  --accent2: #a855f7;
  --success: #10b981;
  --danger: #ef4444;
  --youtube: #FF0000;
  --spotify: #1DB954;
  --apple: #FA1744;
  --amazon: #FF9900;
}
* { margin: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; line-height: 1.6; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--accent); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--accent2); }
.mono { font-family: 'JetBrains Mono', monospace; }
.muted { color: var(--muted); }

/* Header */
.header { background: rgba(18,19,26,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header .container { display: flex; align-items: center; gap: 2rem; padding: 1rem 1.5rem; }
.logo { font-weight: 700; font-size: 1.5rem; color: var(--text); }
.logo span { color: var(--accent); }
.search { flex: 1; max-width: 500px; }
.search input { width: 100%; background: var(--card); border: 1px solid var(--border); padding: 0.6rem 1rem; border-radius: 8px; color: var(--text); font-size: 0.95rem; }
.search input:focus { outline: none; border-color: var(--accent); }
.nav { display: flex; gap: 1.5rem; }
.nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a.admin-link { color: var(--accent); }
.mobile-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); padding: 0.5rem 0.75rem; border-radius: 6px; cursor: pointer; }

/* Hero */
.hero { padding: 5rem 0; text-align: center; background: radial-gradient(ellipse at top, rgba(139,92,246,0.15), transparent); }
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; font-weight: 700; }
.gradient { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }
.stats { display: flex; justify-content: center; gap: 4rem; margin-top: 3rem; }
.stats strong { display: block; font-size: 2.5rem; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.stats span { color: var(--muted); font-size: 0.9rem; display: block; margin-top: 0.25rem; }

/* Sections */
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 3rem 0 1.5rem; }
.section-head h2 { font-size: 1.75rem; font-weight: 600; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.2s; display: block; }
.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(139,92,246,0.2); }
.cover { aspect-ratio: 1; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.card-body { padding: 1rem; }
.card-body h3 { font-size: 1rem; margin-bottom: 0.25rem; line-height: 1.3; color: var(--text); }
.card-body p { color: var(--muted); font-size: 0.85rem; }
.card-meta { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); }
.badge { display: inline-block; background: rgba(139,92,246,0.2); color: var(--accent); padding: 0.25rem 0.75rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; }

/* Browse Layout */
.browse-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; padding: 2rem 0; }
.filters { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; height: fit-content; position: sticky; top: 100px; }
.filters h3 { margin-bottom: 1.5rem; font-size: 1.1rem; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.filter-group select, .filter-group input { width: 100%; background: var(--bg); border: 1px solid var(--border); padding: 0.6rem; border-radius: 6px; color: var(--text); font-size: 0.95rem; }
.filter-group select:focus, .filter-group input:focus { outline: none; border-color: var(--accent); }
.filters button { width: 100%; background: var(--accent); color: white; border: none; padding: 0.75rem; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 1rem; transition: 0.2s; }
.filters button:hover { background: var(--accent2); }
.reset { display: block; text-align: center; margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.results-head h1 { font-size: 1.75rem; }
.results-head select { background: var(--card); border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 6px; color: var(--text); }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin: 2rem 0; }
.pagination a { padding: 0.5rem 1rem; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-weight: 500; }
.pagination a:hover { border-color: var(--accent); }
.pagination a.active { background: var(--accent); border-color: var(--accent); color: white; }

/* Release Page */
.release-page { padding: 2rem 0; }
.release-hero { display: grid; grid-template-columns: 320px 1fr; gap: 3rem; margin-bottom: 3rem; }
.cover-large { aspect-ratio: 1; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.release-info h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.release-info h2 { font-size: 1.5rem; color: var(--muted); margin-bottom: 1.5rem; font-weight: 500; }
.type-badge { display: inline-block; background: rgba(139,92,246,0.2); color: var(--accent); padding: 0.4rem 1rem; border-radius: 6px; font-weight: 600; margin-bottom: 1rem; font-size: 0.85rem; }
.meta { display: flex; gap: 0.75rem; color: var(--muted); margin-bottom: 1.5rem; flex-wrap: wrap; font-size: 0.95rem; }
.actions { display: flex; gap: 1rem; }
.btn-like, .btn-collect { background: var(--card); border: 1px solid var(--border); padding: 0.75rem 1.5rem; border-radius: 8px; color: var(--text); cursor: pointer; font-weight: 500; transition: all 0.2s; font-size: 0.95rem; }
.btn-like:hover { border-color: var(--accent); color: var(--accent); }
.btn-collect:hover { border-color: var(--success); color: var(--success); }

/* Tracklist */
.tracklist { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 12px; border-collapse: collapse; overflow: hidden; }
.tracklist th { text-align: left; padding: 1rem 1.5rem; background: rgba(139,92,246,0.1); color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.tracklist td { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.tracklist tr:hover { background: var(--card-hover); }
.tracklist tr:last-child td { border-bottom: none; }
.tracklist .credit { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }

/* Affiliate Buttons */
.actions { display: flex; gap: 0.5rem; }
.actions.buy { gap: 0.4rem; }
.actions .yt-btn, .actions .affiliate { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); transition: all 0.2s; }
.actions .yt-btn.active { cursor: pointer; }
.actions .yt-btn.active:hover { background: var(--youtube); border-color: var(--youtube); }
.actions .yt-btn.active:hover svg { fill: white; }
.actions .yt-btn.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.actions .affiliate.active { cursor: pointer; }
.actions .affiliate.active:hover { transform: scale(1.1); }
.actions .affiliate.spotify.active:hover { background: var(--spotify); border-color: var(--spotify); }
.actions .affiliate.apple.active:hover { background: var(--apple); border-color: var(--apple); }
.actions .affiliate.amazon.active:hover { background: var(--amazon); border-color: var(--amazon); }
.actions .affiliate.active:hover svg { fill: white; }
.actions .affiliate.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.actions svg { width: 20px; height: 20px; }

/* YouTube Modal */
#yt-modal .overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.yt-player { background: var(--card); border-radius: 12px; overflow: hidden; max-width: 900px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.yt-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.yt-header h3 { font-size: 1.1rem; font-weight: 600; }
.yt-header button { background: none; border: none; color: var(--muted); font-size: 1.5rem; cursor: pointer; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: 0.2s; }
.yt-header button:hover { color: var(--text); background: var(--bg); }
.yt-player iframe { width: 100%; aspect-ratio: 16/9; display: block; border: none; }

/* Artist Page */
.artist-hero { padding: 3rem 0; background: linear-gradient(180deg, rgba(139,92,246,0.1), transparent); }
.artist-head { display: flex; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.artist-avatar { width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0; }
.tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.tag { background: rgba(139,92,246,0.2); color: var(--accent); padding: 0.4rem 0.9rem; border-radius: 6px; font-size: 0.85rem; font-weight: 500; }
.bio { max-width: 800px; color: var(--muted); line-height: 1.8; font-size: 1.05rem; }
.tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin: 2rem 0; }
.tab { background: none; border: none; color: var(--muted); padding: 1rem 1.5rem; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.2s; font-size: 0.95rem; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.year-header { margin: 2.5rem 0 1rem; font-size: 1.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; font-weight: 600; }
.release-list { display: flex; flex-direction: column; gap: 0.75rem; }
.release-row { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--border); padding: 1.25rem 1.5rem; border-radius: 8px; transition: all 0.2s; }
.release-row:hover { border-color: var(--accent); background: var(--card-hover); }
.row-main strong { display: block; margin-bottom: 0.25rem; color: var(--text); font-size: 1.05rem; }
.row-meta { display: flex; gap: 1rem; align-items: center; }

/* Search */
.search-results section { margin: 3rem 0; }
.search-results h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }

/* Admin */
.admin { padding: 2rem 0; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.stat-box { background: var(--card); border: 1px solid var(--border); padding: 2rem; border-radius: 12px; text-align: center; }
.stat-box strong { display: block; font-size: 2.5rem; color: var(--accent); margin-bottom: 0.5rem; font-family: 'JetBrains Mono', monospace; }
.stat-box span { color: var(--muted); font-size: 0.9rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.admin-card { background: var(--card); border: 1px solid var(--border); padding: 2rem; border-radius: 12px; transition: all 0.2s; }
.admin-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(139,92,246,0.2); }
.admin-card h3 { margin-bottom: 0.5rem; color: var(--text); }
.admin-card p { color: var(--muted); font-size: 0.9rem; }
.admin-form { background: var(--card); border: 1px solid var(--border); padding: 2rem; border-radius: 12px; margin: 2rem 0; }
.admin-form h3 { margin-bottom: 1.5rem; font-size: 1.25rem; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); padding: 0.75rem; border-radius: 6px; color: var(--text); margin-bottom: 1rem; font-family: inherit; font-size: 0.95rem; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { outline: none; border-color: var(--accent); }
.admin-form textarea { min-height: 100px; resize: vertical; }
.admin-form button { background: var(--accent); color: white; border: none; padding: 0.75rem 2rem; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 0.95rem; }
.admin-form button:hover { background: var(--accent2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.admin-table { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 12px; border-collapse: collapse; overflow: hidden; margin: 2rem 0; }
.admin-table th { text-align: left; padding: 1rem 1.5rem; background: rgba(139,92,246,0.1); color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; }
.admin-table td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.admin-table tr:hover { background: var(--card-hover); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--accent); font-weight: 500; }
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box { background: var(--card); border: 1px solid var(--border); padding: 3rem; border-radius: 12px; max-width: 400px; width: 100%; }
.login-box h1 { text-align: center; margin-bottom: 2rem; }
.login-box input { width: 100%; background: var(--bg); border: 1px solid var(--border); padding: 0.75rem; border-radius: 6px; color: var(--text); margin-bottom: 1rem; }
.login-box button { width: 100%; background: var(--accent); color: white; border: none; padding: 0.75rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
.error { background: rgba(239,68,0.1); border: 1px solid var(--danger); color: var(--danger); padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }

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

/* Toast */
#toast { position: fixed; bottom: 2rem; right: 2rem; z-index: 1000; }
.toast { background: var(--card); border: 1px solid var(--border); padding: 1rem 1.5rem; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: slideIn 0.3s; }
@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
  .header .container { flex-wrap: wrap; }
  .nav { display: none; }
  .mobile-toggle { display: block; margin-left: auto; }
  .hero h1 { font-size: 2rem; }
  .stats { flex-direction: column; gap: 1.5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .browse-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .release-hero { grid-template-columns: 1fr; }
  .artist-head { flex-direction: column; text-align: center; }
  .tracklist { font-size: 0.85rem; }
  .tracklist th, .tracklist td { padding: 0.75rem 0.5rem; }
  .actions { flex-wrap: wrap; }
  .admin-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}