:root {
  --base: #0b0a0f;
  --surface: #131118;
  --surface-2: #1b1823;
  --border: #2a2733;
  --text: #ece9f2;
  --muted: #928da0;
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --danger: #f43f5e;
  --success: #34d399;
  --player-h: 80px;
}

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

body {
  background: var(--base);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }

/* ---------- Layout ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 240px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: rgba(19,17,24,0.5); display: flex; flex-direction: column; padding: 20px 0;
}
.brand { padding: 0 20px 20px; }
.brand-link { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-mark svg { width: 100%; height: 100%; display: block; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.brand-name b { font-weight: 700; color: var(--accent-2); }
.brand-text small { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.divider-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px; border-radius: 8px; background: #fff; color: #1f1f1f; font-size: 14px; font-weight: 500; }
.btn-google:hover { background: #f2f2f2; }
.consent-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.4; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); }

.sidebar-section { display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 8px; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.pl-list { flex: 1; overflow-y: auto; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.pl-list a { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 8px;
  font-size: 13px; color: var(--muted); }
.pl-list a:hover { background: var(--surface); color: var(--text); }
.pl-list img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }

.main { flex: 1; overflow-y: auto; overflow-x: hidden; min-width: 0; padding-bottom: calc(var(--player-h) + 24px); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: rgba(11,10,15,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); }
.search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: scale(1.03); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.icon-btn { color: var(--muted); padding: 6px; border-radius: 8px; transition: color .15s; }
.icon-btn:hover { color: var(--text); }

/* ---------- Content ---------- */
.content { padding: 24px; }
.hero { border: 1px solid var(--border); border-radius: 18px; padding: 32px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface) 60%, var(--base));
  margin-bottom: 36px; }
.hero .eyebrow { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-2); }
.hero h2 { margin-top: 8px; font-size: 30px; font-weight: 700; max-width: 560px; line-height: 1.2; }
.hero p { margin-top: 12px; color: var(--muted); max-width: 500px; font-size: 14px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h3 { font-size: 18px; font-weight: 600; }
.section-head small { color: var(--muted); font-size: 12px; }

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

/* Track card */
.card { border-radius: 12px; background: var(--surface); padding: 12px; position: relative;
  border: 1px solid transparent; transition: background .15s, border-color .15s; }
.card:hover { background: var(--surface-2); border-color: var(--border); }
.card .art { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .art img { transform: scale(1.05); }
.card .play-fab { position: absolute; bottom: 8px; right: 8px; width: 44px; height: 44px;
  border-radius: 999px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(8px); transition: all .2s; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.card:hover .play-fab, .card .play-fab.show { opacity: 1; transform: translateY(0); }
.card .title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.card.playing .title { color: var(--accent-2); }

/* Track row */
.row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; transition: background .15s; }
.row:hover { background: var(--surface); }
.row img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-sub { font-size: 12px; color: var(--muted); }
.row.playing .r-title { color: var(--accent-2); }
.row .r-play { width: 34px; color: var(--muted); display: flex; justify-content: center; }
.dim { color: var(--muted); font-size: 12px; }

.cbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.cbadge.clear { color: var(--success); }
.cbadge.pending { color: var(--muted); }
.cbadge.matched { color: var(--danger); }

.prompt-box { border: 1px solid var(--border); border-radius: 8px; background: rgba(11,10,15,.6);
  font-family: ui-monospace, monospace; font-size: 12px; margin: 4px 0 8px 62px; }
.prompt-box .pb-head { display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-bottom: 1px solid var(--border); color: var(--accent-2); }
.prompt-box .pb-body { padding: 8px 12px; color: var(--muted); line-height: 1.5; }
.prompt-box .pb-body b { color: var(--accent); font-weight: 400; }

.heart.on { color: var(--danger); }
.heart.on svg { fill: var(--danger); }

.playlist-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.plcard { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface);
  transition: background .15s; }
.plcard:hover { background: var(--surface-2); }
.plcard .pc-art { aspect-ratio: 16/9; overflow: hidden; }
.plcard .pc-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.plcard:hover .pc-art img { transform: scale(1.05); }
.plcard .pc-body { padding: 14px; }

.detail-head { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; }
.detail-head > img, .detail-head .big-ico { width: 160px; height: 160px; border-radius: 14px; object-fit: cover; box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.big-ico { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 14px; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid transparent; border-radius: 12px; padding: 16px; background: var(--surface); }
.person:hover { border-color: var(--border); }
.person img { width: 80px; height: 80px; border-radius: 999px; object-fit: cover; margin-bottom: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 6px 16px; font-size: 14px; color: var(--muted); }
.chip:hover { border-color: var(--accent); color: var(--text); }

.empty { border: 1px dashed var(--border); border-radius: 12px; padding: 48px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Player ---------- */
.player { position: fixed; bottom: 0; left: 0; right: 0; height: var(--player-h); z-index: 50;
  border-top: 1px solid var(--border); background: rgba(19,17,24,.92); backdrop-filter: blur(16px); }
.player .pbar-top { position: absolute; top: 0; left: 0; height: 2px; width: 100%; background: var(--border); }
.player .pbar-top > i { display: block; height: 100%; width: 0; background: var(--accent); }
.player .inner { display: flex; align-items: center; gap: 16px; height: 100%; padding: 0 16px; max-width: 1600px; margin: 0 auto; }
.p-left { display: flex; align-items: center; gap: 12px; width: 26%; min-width: 0; }
.p-left img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.p-left .pl-info { min-width: 0; }
.p-left .pl-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-left .pl-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-controls { display: flex; align-items: center; gap: 20px; }
.p-controls .ctl { color: var(--muted); transition: color .15s; }
.p-controls .ctl:hover { color: var(--text); }
.p-controls .ctl.active { color: var(--accent-2); }
.p-controls .play-main { width: 38px; height: 38px; border-radius: 999px; background: var(--text); color: var(--base);
  display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.p-controls .play-main:hover { transform: scale(1.06); }
.p-seek { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 460px; }
.p-seek .t { font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); width: 34px; text-align: center; }
.p-right { width: 26%; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); }

input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 999px;
  background: var(--border); flex: 1; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 999px;
  background: var(--text); transition: background .15s, transform .15s; }
input[type=range]:hover::-webkit-slider-thumb { background: var(--accent-2); transform: scale(1.2); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--base); color: var(--text); font-size: 14px; outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 70px; font-family: ui-monospace, monospace; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 16px 0; }
.checkbox input { margin-top: 2px; }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; min-height: 16px; }
.modal .switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.modal .switch a { color: var(--accent-2); cursor: pointer; }
.role-pick { display: flex; gap: 10px; }
.role-pick label { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center;
  cursor: pointer; font-size: 13px; }
.role-pick input { display: none; }
.role-pick input:checked + span { color: var(--accent-2); font-weight: 600; }
.role-pick label:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }

.toast { position: fixed; bottom: calc(var(--player-h) + 16px); left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 10px 18px;
  border-radius: 999px; font-size: 13px; z-index: 200; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 110%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; min-width: 180px; z-index: 30; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text); }
.menu-pop button:hover { background: var(--surface); }
.menu-pop .sep { height: 1px; background: var(--border); margin: 4px 0; }

/* Mobile */
.mobile-nav { display: none; }
@media (max-width: 820px) {
  .sidebar { display: none; }
  .p-left { width: auto; flex: 1; min-width: 0; }
  .p-right { display: none; }
  .p-seek { display: none; }
  .p-controls { gap: 14px; }
  .main { padding-bottom: calc(var(--player-h) + 64px); }

  /* dolguları küçült */
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; gap: 8px; }
  .hero { padding: 22px; }
  .hero h2 { font-size: 22px; }

  /* arama kutusu daralabilsin, butonu taşırmasın */
  .search { min-width: 0; padding: 8px 12px; }
  .search input { min-width: 0; }

  /* satırlardaki fazla sütunları gizle — yatay taşmayı önler */
  .row { gap: 10px; padding: 8px 6px; }
  .row .cbadge,
  .row > .dim { display: none; }
  .prompt-box { margin-left: 8px; }

  /* grid kartları biraz küçült */
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

  /* detay başlığı sığsın */
  .detail-head > img, .detail-head .big-ico { width: 120px; height: 120px; }
  .detail-head h2 { font-size: 24px; }

  .mobile-nav { display: flex; position: fixed; bottom: var(--player-h); left: 0; right: 0; z-index: 40;
    justify-content: space-around; padding: 8px 0; border-top: 1px solid var(--border);
    background: rgba(19,17,24,.96); backdrop-filter: blur(12px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); }
  .mobile-nav a.active { color: var(--accent-2); }
}

/* Çok dar ekranlar (küçük telefonlar) */
@media (max-width: 380px) {
  .p-controls { gap: 10px; }
  .topbar .btn-primary { padding: 8px 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Hukuki sayfalar ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal h1 { font-size: 26px; margin-bottom: 8px; }
.legal .legal-meta { font-size: 12px; color: var(--muted); margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.legal h3 { font-size: 16px; margin: 26px 0 8px; color: var(--text); }
.legal p { color: #c8c4d2; line-height: 1.7; margin-bottom: 12px; font-size: 14px; }
.legal ul { margin: 0 0 14px 20px; color: #c8c4d2; line-height: 1.7; font-size: 14px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent-2); text-decoration: underline; }
.legal strong { color: var(--text); }
.legal-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 13px; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.legal-table th { background: var(--surface-2); color: var(--text); }
.legal-table td { color: #c8c4d2; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--muted); font-size: 13px; }
.footer-brand b { color: var(--accent-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; flex: 1; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; }

/* ---------- Çerez bandı ---------- */
.cookie-banner { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--player-h) + 14px); width: min(720px, calc(100% - 32px));
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 16px 48px rgba(0,0,0,.5); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 13px; color: #c8c4d2; line-height: 1.5; flex: 1; min-width: 220px; margin: 0; }
.cookie-banner p a { color: var(--accent-2); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-actions .btn { padding: 8px 16px; font-size: 13px; }

@media (max-width: 820px) {
  .cookie-banner { bottom: calc(var(--player-h) + 64px); padding: 14px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
  .site-footer { padding: 20px 16px; }
  .legal h1 { font-size: 22px; }
}
