@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700&family=Space+Grotesk:wght@400;500&display=swap');

:root {
  --bg: #0b0f14;
  --panel: #111824;
  --panel-2: #151e2e;
  --accent: #1db954;
  --text: #f5f7fb;
  --muted: #9aa6bd;
  --shadow: 0 16px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  background: radial-gradient(circle at top left, #1a2334 0%, #0b0f14 55%);
  color: var(--text);
  min-height: 100vh;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  background: rgba(18, 25, 39, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 32px;
  border-radius: 20px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #6ee28a);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
}

.brand-text h1 {
  font-family: 'Archivo', sans-serif;
  margin: 0 0 4px;
}

.brand-text p { margin: 0; color: var(--muted); font-size: 14px; }

.login-form { display: grid; gap: 12px; }

label { font-size: 13px; color: var(--muted); }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(9, 13, 22, 0.6);
  color: var(--text);
  font-family: inherit;
}

button {
  background: var(--accent);
  color: #0b0f14;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(29,185,84,0.3); }

.hint { font-size: 12px; color: var(--muted); }

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.alert.error { background: rgba(229, 9, 20, 0.15); border: 1px solid rgba(229, 9, 20, 0.4); }
.alert.success { background: rgba(46, 196, 182, 0.15); border: 1px solid rgba(46, 196, 182, 0.4); }

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--panel);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar .logo { font-family: 'Archivo', sans-serif; font-weight: 700; }

.sidebar nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 10px;
}

.sidebar nav a.active, .sidebar nav a:hover { color: var(--text); }

.playlist h4 { margin: 0 0 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.playlist ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.playlist li { color: var(--text); font-size: 14px; opacity: 0.85; }

.logout { margin-top: auto; color: var(--muted); text-decoration: none; }

.main {
  padding: 28px 32px 120px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar h1 { font-family: 'Archivo', sans-serif; margin: 0 0 4px; font-size: 32px; }
.topbar p { margin: 0; color: var(--muted); }

.search input {
  width: 320px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.track-card {
  background: var(--panel-2);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.track-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.cover {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.meta {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.meta h3 { margin: 0; font-size: 16px; }
.meta p { margin: 0; color: var(--muted); font-size: 13px; }
.meta span { font-size: 12px; color: #b6ffc9; }

.panel {
  background: var(--panel-2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.plus-float {
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0f14;
  font-size: 32px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.7);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.modal.open { opacity: 1; pointer-events: auto; }

.modal-content {
  width: min(880px, 92vw);
  background: var(--panel);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.search-inline {
  max-width: 320px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field.full { grid-column: 1 / -1; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 12px;
}

.mini-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.pager button {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 22, 0.95);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  align-items: center;
  padding: 12px 24px;
  gap: 20px;
}

.now { display: flex; gap: 12px; align-items: center; }
.now-cover { width: 52px; height: 52px; border-radius: 8px; background: #222; background-size: cover; background-position: center; }

.controls { display: flex; justify-content: center; gap: 12px; }
.controls button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.controls button svg { width: 24px; height: 24px; fill: #e6f4ea; }
.controls .play { background: var(--accent); width: 56px; height: 56px; }
.controls .play svg { width: 28px; height: 28px; fill: #0b0f14; }

.progress { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.progress .bar { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; width: 0%; background: var(--accent); }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; justify-content: space-between; }
  .playlist { display: none; }
  .player { grid-template-columns: 1fr; text-align: center; }
  .progress { justify-content: center; }
  .search input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
}
