:root {
  --bg: #070707;
  --bg-2: #0b0b0b;
  --panel: rgba(13,13,13,.91);
  --panel-solid: #111;
  --panel-2: #161616;
  --panel-3: #1b1b1b;
  --text: #f4f4f4;
  --muted: #8d8d8d;
  --muted-2: #666;
  --line: rgba(255,255,255,.085);
  --line-strong: rgba(255,255,255,.16);
  --white: #f5f5f5;
  --danger: #d46e7f;
  --shadow: 0 28px 80px rgba(0,0,0,.48);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 14%, rgba(255,255,255,.05), transparent 28%),
    linear-gradient(180deg, #0c0c0c 0%, #070707 45%, #050505 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button { border: 1px solid transparent; }
a { color: inherit; }
.hidden { display: none !important; }

/* Side artwork follows the original loading-screen composition. */
.side-art {
  position: fixed;
  top: 64px;
  bottom: 0;
  width: clamp(180px, 20vw, 350px);
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: grayscale(1) contrast(.92) brightness(.48);
  opacity: .72;
  pointer-events: none;
}
.side-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,7,7,.1), rgba(7,7,7,.62));
}
.side-art--left { left: 0; background-image: url("side-left.png"); }
.side-art--right { right: 0; background-image: url("side-right.png"); }
.side-art--right::after { background: linear-gradient(270deg, rgba(7,7,7,.1), rgba(7,7,7,.62)); }
.page-glow {
  position: fixed;
  z-index: 0;
  top: 64px;
  bottom: 0;
  left: clamp(180px, 20vw, 350px);
  right: clamp(180px, 20vw, 350px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 28%),
    rgba(6,6,6,.76);
  border-inline: 1px solid rgba(255,255,255,.045);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1080px)/2));
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,8,.93);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 35px; height: 35px; object-fit: contain; }
.brand span { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.topnav { display: flex; align-items: center; gap: 8px; }
.nav-link, .login-btn, .primary-btn, .secondary-btn, .mini-btn {
  min-height: 38px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
.nav-link { color: #bcbcbc; background: transparent; border-color: transparent; font-size: 12px; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-icon { font-size: 16px; line-height: 1; }
.login-btn { border-color: var(--line-strong); background: rgba(255,255,255,.045); color: #fff; font-size: 11px; font-weight: 750; letter-spacing: .035em; }
.login-btn:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.discord-mark { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #f1f1f1; color: #080808; font-size: 8px; }

.site-shell {
  position: relative;
  z-index: 2;
  width: min(1080px, calc(100% - 42px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

/* Guest page */
.guest-hero {
  width: min(680px, 100%);
  margin: clamp(46px, 9vh, 110px) auto 0;
  text-align: center;
  padding: 44px 46px 38px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 42%),
    rgba(9,9,9,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.hero-logo-wrap {
  width: 118px;
  height: 118px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}
.hero-logo-wrap img { width: 92px; height: 92px; object-fit: contain; }
.eyebrow { color: #8e8e8e; font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.guest-hero h1 { margin: 8px 0 10px; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.055em; line-height: 1; }
.guest-hero > p { width: min(510px,100%); margin: 0 auto; color: #9b9b9b; font-size: 13px; line-height: 1.65; }
.hero-actions { margin-top: 25px; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.primary-btn { min-height: 42px; padding-inline: 18px; border-color: #eee; background: #f1f1f1; color: #080808; font-weight: 800; font-size: 11px; }
.primary-btn:hover { background: #fff; transform: translateY(-1px); }
.secondary-btn { min-height: 42px; padding-inline: 18px; border-color: var(--line-strong); background: rgba(255,255,255,.035); color: #d5d5d5; font-size: 11px; }
.secondary-btn:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.07); color: #fff; }
.security-note { margin-top: 25px; display: inline-flex; align-items: center; gap: 8px; color: #757575; font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #d6d6d6; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }

/* Dashboard */
.dashboard { display: grid; gap: 12px; }
.profile-strip {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 45px rgba(0,0,0,.2);
}
.profile-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.avatar { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line-strong); background: #0b0b0b; }
.profile-main h1 { margin: 4px 0 2px; font-size: 19px; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-main p { margin: 0; color: var(--muted); font-size: 10px; }
.profile-right { display: flex; align-items: center; gap: 10px; }
.profile-stats { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat { min-width: 88px; padding: 8px 11px; text-align: center; border-left: 1px solid var(--line); background: rgba(255,255,255,.02); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 12px; }
.stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.logout-btn { text-decoration: none; white-space: nowrap; }

.workspace-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(10,10,10,.93);
}
.tab {
  min-height: 39px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #777;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
}
.tab:hover { color: #bbb; background: rgba(255,255,255,.025); }
.tab.is-active { color: #090909; background: #ececec; }
.workspace-view {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.workspace-view.is-active { display: block; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-head h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.035em; }
.section-head > p { max-width: 455px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; text-align: right; }

.upload-grid, .settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.upload-card, .settings-card, .source-card, .library-block, .playlist-sidebar, .playlist-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}
.upload-card { padding: 17px; }
.upload-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: #0b0b0b; color: #ddd; font-size: 18px; }
.upload-card h3 { margin: 12px 0 5px; font-size: 15px; }
.upload-card > p { min-height: 36px; margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.dropzone {
  min-height: 124px;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 10px;
  background: #090909;
  transition: .15s ease;
}
.dropzone:hover, .dropzone.is-drag { border-color: rgba(255,255,255,.36); background: #0e0e0e; }
.dropzone input { display: none; }
.dropzone b { font-size: 11px; }
.dropzone span { color: #6f6f6f; font-size: 9px; }
.upload-progress { height: 3px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.upload-progress span { display: block; width: 34%; height: 100%; background: #eee; animation: loading 1.1s ease-in-out infinite alternate; }
@keyframes loading { to { transform: translateX(190%); } }

.library-block { margin-top: 11px; padding: 15px; }
.block-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.block-title h3 { margin: 0; font-size: 13px; }
.block-title > span { color: var(--muted); font-size: 9px; }
.media-list { display: grid; gap: 6px; }
.media-row { min-height: 48px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; padding: 7px 8px 7px 11px; border: 1px solid rgba(255,255,255,.055); border-radius: 9px; background: #0d0d0d; }
.media-name { min-width: 0; }
.media-name b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.media-name small { color: #686868; font-size: 9px; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #151515; color: #aaa; }
.icon-btn:hover { border-color: rgba(255,255,255,.2); color: #fff; background: #1d1d1d; }
.icon-btn.danger:hover { border-color: rgba(212,110,127,.34); color: #ffbdc8; background: rgba(212,110,127,.08); }
.empty { padding: 20px; border: 1px dashed var(--line); border-radius: 9px; color: #777; text-align: center; font-size: 10px; }

.playlist-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 11px; }
.playlist-sidebar, .playlist-editor { padding: 14px; }
.mini-btn { min-height: 31px; padding: 0 10px; border-color: var(--line); background: #161616; color: #aaa; font-size: 9px; }
.mini-btn:hover { color: #fff; border-color: rgba(255,255,255,.2); background: #1b1b1b; }
.playlist-list { display: grid; gap: 6px; }
.playlist-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; cursor: pointer; border: 1px solid rgba(255,255,255,.055); border-radius: 9px; background: #0d0d0d; }
.playlist-card:hover { border-color: rgba(255,255,255,.13); }
.playlist-card.is-active { border-color: rgba(255,255,255,.26); background: #151515; }
.playlist-card b { font-size: 10px; }
.playlist-card small { display: block; margin-top: 2px; color: #696969; font-size: 9px; }
.active-badge, .source-state { color: #8c8c8c; font-size: 8px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.editor-head h3 { margin: 4px 0 0; font-size: 15px; }
.editor-actions { display: flex; gap: 6px; }
.danger-mini:hover { border-color: rgba(212,110,127,.34); color: #ffbdc8; background: rgba(212,110,127,.08); }
.ordered-list { display: grid; gap: 6px; }
.order-row { min-height: 44px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 6px 7px 6px 10px; border: 1px solid rgba(255,255,255,.05); border-radius: 9px; background: #0c0c0c; }
.order-num { color: #595959; font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.order-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.order-actions { display: flex; gap: 4px; }
.add-song-box { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.add-song-box h4 { margin: 0 0 9px; color: #aaa; font-size: 10px; }
.song-picker { display: flex; flex-wrap: wrap; gap: 5px; }
.song-chip { max-width: 235px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 7px 9px; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; background: #131313; color: #999; font-size: 9px; }
.song-chip:hover { color: #fff; border-color: rgba(255,255,255,.2); }

.background-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.background-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #0d0d0d; }
.background-thumb { aspect-ratio: 16/9; overflow: hidden; background: #050505; }
.background-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.84) contrast(.95); transition: .18s ease; }
.background-card:hover .background-thumb img { transform: scale(1.015); filter: saturate(1) contrast(.98); }
.background-info { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 9px; }
.background-info b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; }
.background-actions { display: flex; gap: 4px; }

/* Settings */
.source-card { grid-column: 1 / -1; padding: 16px; }
.source-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; padding-bottom: 12px; }
.source-card-head h3 { margin: 4px 0 0; font-size: 15px; }
.source-hint { color: #5f5f5f; font-size: 9px; }
.source-toggle { min-height: 66px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.source-symbol { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #0b0b0b; color: #bcbcbc; }
.source-copy b { display: block; font-size: 11px; }
.source-copy small { display: block; margin-top: 3px; color: #777; font-size: 9px; line-height: 1.45; }
.source-state { min-width: 48px; text-align: right; }
.source-state.is-custom { color: #efefef; }
.switch { position: relative; width: 40px; height: 22px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: #161616; transition: .16s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #7b7b7b; transition: .16s ease; }
.switch input:checked + .switch-track { border-color: #f0f0f0; background: #efefef; }
.switch input:checked + .switch-track::after { left: 21px; background: #090909; }
.switch input:focus-visible + .switch-track { outline: 2px solid #fff; outline-offset: 2px; }
.settings-card { padding: 16px; }
.card-kicker { color: #666; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.settings-card h3 { margin: 4px 0 8px; font-size: 15px; }
.setting-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.setting-row b { display: block; font-size: 10px; }
.setting-row small { display: block; margin-top: 3px; color: #707070; font-size: 9px; line-height: 1.45; }
select, .text-input { min-height: 37px; padding: 0 10px; outline: none; border: 1px solid var(--line); border-radius: 8px; background: #101010; color: #d8d8d8; }
select:focus, .text-input:focus { border-color: rgba(255,255,255,.3); box-shadow: 0 0 0 3px rgba(255,255,255,.035); }
.range-wrap { min-width: 170px; display: flex; align-items: center; gap: 9px; }
.range-wrap input { width: 125px; accent-color: #f2f2f2; }
.range-wrap output { min-width: 36px; color: #bbb; text-align: right; font-size: 9px; }
.save-row { margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.save-note { margin-right: auto; color: #666; font-size: 9px; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
.modal-card { position: relative; width: min(410px,100%); padding: 20px; border: 1px solid var(--line-strong); border-radius: 13px; background: #0e0e0e; box-shadow: var(--shadow); }
.modal-card h3 { margin: 5px 0 13px; }
.modal-close { position: absolute; top: 8px; right: 9px; width: 30px; height: 30px; cursor: pointer; border: 0; background: transparent; color: #777; font-size: 22px; }
.text-input { width: 100%; }
.modal-actions { margin-top: 13px; display: flex; justify-content: flex-end; gap: 7px; }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 150; width: min(350px,calc(100vw - 36px)); display: grid; gap: 7px; }
.toast { padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(13,13,13,.97); color: #e8e8e8; box-shadow: var(--shadow); font-size: 10px; line-height: 1.45; animation: toastIn .18s ease-out; }
.toast.is-error { border-color: rgba(212,110,127,.35); }
@keyframes toastIn { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 980px) {
  .side-art { display: none; }
  .page-glow { left: 0; right: 0; }
  .site-shell { width: min(900px,calc(100% - 24px)); padding-top: 28px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-head > p { text-align: left; }
  .background-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 12px; }
  .side-art, .page-glow { top: 58px; }
  .brand span { display: none; }
  .nav-link, .login-btn { padding-inline: 10px; }
  .guest-hero { padding: 34px 20px 29px; }
  .profile-strip { align-items: flex-start; flex-direction: column; }
  .profile-right { width: 100%; align-items: stretch; flex-direction: column; }
  .profile-stats { width: 100%; }
  .stat { flex: 1; min-width: 0; }
  .logout-btn { align-self: flex-end; }
  .workspace-tabs { overflow-x: auto; }
  .tab { min-width: 92px; }
  .workspace-view { padding: 16px; }
  .upload-grid, .settings-grid, .playlist-layout { grid-template-columns: 1fr; }
  .background-grid { grid-template-columns: 1fr; }
  .source-toggle { grid-template-columns: 34px minmax(0,1fr) auto; }
  .source-state { display: none; }
  .setting-row { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .range-wrap { width: 100%; }
  .range-wrap input { flex: 1; width: auto; }
  .save-row { align-items: stretch; flex-direction: column; }
  .save-note { margin-right: 0; }
  .save-row .primary-btn { width: 100%; }
}

/* V7: skutečný název souboru je vidět i u pozadí */
.background-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.background-copy b,.background-copy small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.background-copy small{color:#666;font-size:8px}
