/* voidcast Portal — Design-Tokens aus den Mockups (dunkel, Violett-Akzent). */

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

:root {
  --bg: #0b0d12;
  --panel: #10131b;
  --surface: #12161f;
  --surface-2: #1d2430;
  --input: #0e121a;
  --line: #1c2230;
  --line-2: #262d3b;
  --text: #eef1f6;
  --dim: #8a93a6;
  --faint: #5b6273;
  --accent: #7c6cff;
  --accent-soft: rgba(124, 108, 255, 0.25);
  --accent-text: #9b8dff;
  --good: #63b878;
  --good-bg: #17251d;
  --bad: #ff8080;
  --warn: #d98a2b;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #b9b0ff; }
::placeholder { color: var(--faint); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, .font-display { font-family: Outfit, 'Segoe UI', sans-serif; }

/* ---------- Layout ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px; flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand span { font-family: Outfit, sans-serif; font-weight: 700; font-size: 18px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--dim);
  font-family: Outfit, sans-serif; font-weight: 600; font-size: 14px;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active svg { stroke: var(--accent); }
.sidebar-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.avatar-chip {
  width: 30px; height: 30px; border-radius: 50%; background: #2a2452; color: #b9b0ff;
  display: flex; align-items: center; justify-content: center;
  font-family: Outfit, sans-serif; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.sidebar-foot .mail { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot a { font-size: 12px; }

.content { flex: 1; padding: 28px 36px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 600; }
.page-head .meta { color: var(--faint); font-size: 14px; }
.spacer { flex: 1; }

/* ---------- Bausteine ---------- */

.btn {
  border: none; border-radius: 10px; padding: 10px 16px;
  font-family: Outfit, sans-serif; font-weight: 600; font-size: 14px;
  background: var(--surface-2); color: var(--text);
}
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid #3d222c; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: default; }

.input, select.input {
  background: var(--input); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit; width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--dim); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
}
.chip {
  background: var(--surface-2); border-radius: 999px; padding: 4px 12px;
  font-size: 12.5px; color: #b8bfce; display: inline-flex; align-items: center; gap: 6px;
}
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.bad { background: #2c1a1f; color: var(--bad); }
.chip.warn { background: #2b2113; color: var(--warn); }
.chip.accent { background: #221c46; color: var(--accent-text); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar > div { height: 100%; border-radius: 3px; background: var(--accent); min-width: 4px; }

.msg { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin-top: 10px; }
.msg.error { background: #2c1a1f; color: var(--bad); }
.msg.ok { background: var(--good-bg); color: var(--good); }

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 28px;
  background: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(124,108,255,0.16), transparent), var(--bg);
}
.login-card {
  width: 400px; max-width: calc(100vw - 32px); background: #151a23;
  border: 1px solid #232a38; border-radius: 18px; padding: 28px;
  display: flex; flex-direction: column; gap: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.tabs { display: flex; background: var(--input); border-radius: 10px; padding: 4px; gap: 4px; }
.tabs button {
  flex: 1; padding: 8px 0; border: none; border-radius: 8px; background: transparent;
  color: var(--dim); font-family: Outfit, sans-serif; font-weight: 600; font-size: 14px;
}
.tabs button.active { background: var(--surface-2); color: var(--text); }

/* ---------- Bibliothek ---------- */

.album-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px;
}
.album-card { cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.album-cover {
  aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #262c3a, #1a2029);
  display: flex; align-items: center; justify-content: center;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover .placeholder {
  font-family: Outfit, sans-serif; font-weight: 700; font-size: 44px; color: rgba(255,255,255,0.75);
}
.album-cover .status-chip { position: absolute; left: 10px; bottom: 10px; }
.album-card .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.album-card .s { color: var(--dim); font-size: 12.5px; margin-top: 2px; }

/* ---------- Tabellen / Listen ---------- */

.tracklist { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.track-row {
  display: flex; align-items: center; gap: 14px; padding: 11px 18px;
  border-bottom: 1px solid #171c27; font-size: 14px;
}
.track-row:last-child { border-bottom: none; }
.track-row .no { width: 34px; color: var(--faint); font-size: 13px; }
.track-row .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .dur { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.track-row.playing { background: #171c29; }
.track-row.playing .title { color: var(--accent-text); }
.play-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--surface-2);
  color: var(--text); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.play-btn:hover { background: var(--accent); }

/* ---------- Upload ---------- */

.dropzone {
  border: 2px dashed #2c3547; border-radius: 16px; padding: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--input); text-align: center; cursor: pointer;
}
.dropzone.drag { border-color: var(--accent); background: #131120; }
.file-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; padding: 6px 0; }
.file-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); }
.file-row .st { font-size: 12.5px; width: 110px; text-align: right; }

/* ---------- Profile ---------- */

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.profile-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.profile-card .big-avatar {
  width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 42px; border: 2px solid var(--good);
  background: rgba(99, 184, 120, 0.16);
}
.profile-card .pname { font-family: Outfit, sans-serif; font-weight: 600; font-size: 18px; }
.profile-card.ghost {
  border: 2px dashed #2c3547; background: var(--input); cursor: pointer;
  justify-content: center; color: var(--dim); min-height: 210px;
}
.emoji-row { display: flex; gap: 8px; flex-wrap: wrap; }
.emoji-opt {
  width: 42px; height: 42px; border-radius: 10px; background: var(--input);
  border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center;
  font-size: 21px; cursor: pointer;
}
.emoji-opt.sel { border: 2px solid var(--good); background: rgba(99,184,120,0.16); }

/* ---------- Quelle / Radio-Karten ---------- */

.radio-card { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; max-width: 860px; }
.radio-card.selected { border: 2px solid var(--accent); }
.radio-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid #3a4356;
  display: flex; align-items: center; justify-content: center; margin-top: 2px; flex-shrink: 0;
}
.radio-card.selected .radio-dot { border-color: var(--accent); }
.radio-card.selected .radio-dot::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- Keys ---------- */

.key-row {
  display: flex; align-items: center; gap: 14px; background: var(--input);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px;
  flex-wrap: wrap;
}
.key-row code {
  font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--dim);
  background: #151a23; padding: 3px 8px; border-radius: 6px;
}
.reveal {
  font-family: ui-monospace, monospace; font-size: 14px; color: #b9b0ff;
  background: var(--input); border: 1px solid #2a2452; border-radius: 10px; padding: 12px 16px;
  word-break: break-all;
}

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 14px; }
  .brand { padding: 0 10px 0 0; }
  .nav { flex-direction: row; overflow-x: auto; }
  .sidebar-foot { display: none; }
  .content { padding: 20px 16px; }
}
