  :root {
    --bg:    #0E0B1A;
    --card:  #17132B;
    --pink:  #FF3D7F;
    --cyan:  #22D3EE;
    --text:  #F2EEF7;
    --muted: #9A93B8;
    --line:  rgba(255,255,255,0.10);
    --mix:   linear-gradient(105deg, var(--pink), var(--cyan));
  }

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

  body {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 40px 24px;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  /* soft brand glow behind everything */
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(40% 45% at 22% 35%, rgba(255,61,127,0.20), transparent 70%),
                radial-gradient(40% 45% at 70% 60%, rgba(34,211,238,0.16), transparent 70%);
    filter: blur(20px);
  }

  .page {
    width: 100%; max-width: 1180px;
    display: grid; grid-template-columns: 1fr 340px;
    grid-template-areas: "brand auth" "mixes auth";
    gap: 40px 72px; align-items: start;
  }
  .brand { grid-area: brand; align-self: end; }
  .mixes { grid-area: mixes; }
  .auth  { grid-area: auth; align-self: center; }

  /* ---------- Left: wordmark ---------- */
  .brand h1 {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: clamp(56px, 9vw, 96px); font-weight: 700;
    line-height: 1; letter-spacing: -0.04em;
    background: var(--mix); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .brand p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 26ch; }

  /* ---------- Floating mix cards ---------- */
  .mixes { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  .mix {
    flex: 1 1 200px; min-width: 0; max-width: 290px;
    text-align: left; padding: 12px 14px; border-radius: 13px;
    background: rgba(255,255,255,0.045); border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    animation: float 8s ease-in-out infinite;
  }
  /* stagger so they drift at different heights and tempos */
  .mix:nth-child(2) { margin-top: 30px; animation-duration: 10.5s; animation-delay: -3.5s; }
  .mix:nth-child(3) { margin-top: 12px; animation-duration: 9.2s;  animation-delay: -6s; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

  .mix-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .mix-head-txt { min-width: 0; }
  .mix-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center;
            font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 12px; color: #0B0814;
            background: var(--mix) center/cover no-repeat; }
  .mix h3 { font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 500;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mix .meta { margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px;
               font-size: 11.5px; color: var(--muted); }
  .mix .meta > span { white-space: nowrap; }   /* radšej zalom celý údaj než uprostred */
  .mix .by { padding: 2px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
             color: #0B0814; background: var(--mix); }
  .mix ol { list-style: none; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
  .mix li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); line-height: 1.7; }
  .mix li span { flex: 1; min-width: 0; color: var(--text);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mix li em { font-style: normal; color: var(--muted); }
  .mix li b { color: var(--cyan); font-weight: 600; font-variant-numeric: tabular-nums; }

  /* prehratie ukážky priamo pri skladbe — bez rámika, nech zoznam zostane pokojný;
     že niečo hrá, povie len prepnutie ikony na dve paličky */
  .mix-ico { width: 26px; height: 26px; flex: none; display: grid; place-items: center; padding: 0;
    color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
    transition: color .16s, background .16s, transform .16s; }
  .mix-ico svg { width: 13px; height: 13px; display: block; pointer-events: none; }
  .mix-ico:hover { color: var(--cyan); background: rgba(34,211,238,0.13); transform: scale(1.08); }


  /* pätka okienka: hlasovanie vľavo, export vpravo */
  .mix-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }

  .vote { display: flex; align-items: center; gap: 2px;
    border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
  .vote-btn { width: 24px; height: 24px; display: grid; place-items: center; padding: 0;
    color: var(--muted); background: none; border: 0; border-radius: 50%; cursor: pointer;
    transition: color .16s, background .16s; }
  .vote-btn svg { width: 13px; height: 13px; display: block; pointer-events: none; }
  .vote-btn:hover:not(:disabled) { color: var(--text); background: rgba(255,255,255,0.08); }
  .vote-btn:disabled { opacity: .4; cursor: default; }
  .vote-btn.on[data-vote="1"] { color: var(--cyan); background: rgba(34,211,238,0.16); }
  .vote-btn.on[data-vote="-1"] { color: var(--pink); background: rgba(255,61,127,0.16); }
  .vote-score { min-width: 18px; text-align: center; font-size: 12px; font-weight: 600;
    color: var(--muted); font-variant-numeric: tabular-nums; }
  .vote.up .vote-score { color: var(--cyan); }
  .vote.down .vote-score { color: var(--pink); }

  .mix-txt { display: flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
    font: inherit; font-size: 12px; font-weight: 500; color: var(--muted);
    background: none; border: 1px solid var(--line); cursor: pointer;
    transition: color .16s, background .16s, border-color .16s; }
  .mix-txt svg { width: 13px; height: 13px; flex: none; }
  .mix-txt:hover { color: var(--text); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.26); }

  /* ---------- Right: login card ---------- */
  .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8);
  }
  .card h2 { font-family: "Space Grotesk", sans-serif; font-size: 20px; font-weight: 500; margin-bottom: 18px; }

  .field { width: 100%; margin-bottom: 10px; padding: 13px 14px; font: inherit; font-size: 15px;
    color: var(--text); background: rgba(255,255,255,0.04);
    border: 1px solid var(--line); border-radius: 10px; transition: border-color .18s, background .18s; }
  .field::placeholder { color: var(--muted); }
  .field:focus { outline: none; border-color: var(--cyan); background: rgba(255,255,255,0.06); }
  .field.bad, .field.bad:focus { border-color: var(--pink); background: rgba(255,61,127,0.06); }

  /* Jeden systém tlačidiel pre celý web: rovnaká výška, text presne v strede,
     žiadne farebné haló okolo — zvýraznenie rieši jas a orámovanie. */
  .btn { width: 100%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 0 18px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 15px;
    line-height: 1.2; text-decoration: none; border-radius: 11px; cursor: pointer;
    border: 1px solid transparent; transition: filter .16s, background .16s, border-color .16s; }
  .btn:disabled { opacity: .5; cursor: default; }
  /* "border-box" v skratke je dôležité: inak sa gradient kreslí len po vnútornú
     hranu a pod priehľadným 1px rámikom presvitá jeho zopakovaný koniec. */
  .btn-primary { background: var(--mix) border-box; color: #0B0814; }
  .btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
  .btn-primary:active:not(:disabled) { filter: brightness(.94); }
  .btn-ghost { color: var(--text); background: rgba(255,255,255,0.03); border-color: var(--line); }
  .btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.26); }
  .btn-sm { width: auto; min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

  #saveBtn + .btn { margin-top: 8px; }

  /* odstup tlačidla od toho, čo mu predchádza */
  .field + .btn, .msg + .btn, .totals + .btn, .hint + .btn, .who-since + .btn { margin-top: 12px; }

  :where(.btn, .icon, .field, .forgot, .me-link, .logo):focus-visible {
    outline: 2px solid var(--cyan); outline-offset: 2px; }

  .forgot { display: block; width: 100%; margin: 14px 0; padding: 0; font: inherit; font-size: 14px;
    text-align: center; color: var(--cyan); background: none; border: 0; cursor: pointer; }
  .forgot:hover { text-decoration: underline; }
  .sep { height: 1px; background: var(--line); margin: 16px 0; }

  /* Nenápadný odkaz s ikonkou — žiadne podčiarknutie, zvýrazní sa až pod myšou. */
  .quiet-link { display: flex; align-items: center; justify-content: center; gap: 7px;
    width: fit-content; margin: 12px auto 0; padding: 7px 14px; border-radius: 999px;
    font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none;
    transition: color .16s, background .16s; }
  .quiet-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .quiet-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }

  [hidden] { display: none !important; }

  /* Tenký posuvník namiesto systémového — ten na tmavom podklade pôsobí cudzo. */
  * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.20) transparent; }
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.20); border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.34); }
  ::-webkit-scrollbar-button { display: none; }
  ::-webkit-scrollbar-corner { background: transparent; }

  /* ---------- Auth feedback + profile ---------- */
  .msg { margin: 6px 0 2px; padding: 10px 12px; border-radius: 9px; font-size: 13px; line-height: 1.45;
         color: var(--pink); background: rgba(255,61,127,0.10); border: 1px solid rgba(255,61,127,0.3);
         transition: opacity .35s ease; }
  .msg.ok { color: var(--cyan); background: rgba(34,211,238,0.10); border-color: rgba(34,211,238,0.3); }
  .msg.out { opacity: 0; }

  .who { display: flex; align-items: center; gap: 14px; }
  .avatar { position: relative; overflow: hidden; cursor: pointer;
            width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
            font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px;
            color: #0B0814; background: var(--mix) center/cover no-repeat; }
  .avatar::after { content: "Zmeniť"; position: absolute; inset: 0; display: grid; place-items: center;
                   font-family: "Inter", sans-serif; font-size: 10px; font-weight: 600; color: #fff;
                   background: rgba(0,0,0,0.55); opacity: 0; transition: opacity .18s; }
  .avatar:hover::after, .avatar:focus-within::after { opacity: 1; }
  .who-name { font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 500; line-height: 1.35; }
  .who-mail { font-size: 13px; color: var(--muted); word-break: break-all; }
  .who-since { margin-top: 18px; font-size: 12.5px; color: var(--muted); }
  #profileCard .msg { margin-top: 14px; }
  #profileCard .sep { margin: 20px 0; }

  @media (max-width: 780px) {
    /* poradie na telefóne: názov → prihlásenie → mixy (nech je formulár hneď po ruke) */
    .page { grid-template-columns: 1fr; grid-template-areas: "brand" "auth" "mixes";
            gap: 28px; max-width: 420px; text-align: center; }
    .brand { align-self: auto; }
    .brand p { margin-inline: auto; }
    .mix { flex-basis: 100%; max-width: none; text-align: left; }
    .mix:nth-child(2), .mix:nth-child(3) { margin-top: 0; }
  }

  @media (prefers-reduced-motion: reduce) {
    .mix { animation: none; }
  }

/* =========================================================================
   Stránka Moje mixy
   ========================================================================= */

.topbar { position: sticky; top: 0; z-index: 20; width: 100%; padding: 14px 0; margin-bottom: 28px;
  background: rgba(14,11,26,0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 24px; letter-spacing: -0.03em;
  text-decoration: none; background: var(--mix); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .me { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.topbar .avatar { width: 32px; height: 32px; font-size: 14px; cursor: default; }
.topbar .avatar::after { content: none; }

body.app { display: block; padding: 0 0 64px; }
.shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.shell h1 { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.shell > h1 + p { color: var(--muted); margin-top: 6px; margin-bottom: 26px; font-size: 15px; }

.build { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
/* bez min-width:0 sa položka mriežky nezmrští pod šírku svojho obsahu
   a dlhý názov skladby vytlačí celý panel mimo obrazovku */
.build > *, .mix-grid > * { min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.panel > h2 { font-family: "Space Grotesk", sans-serif; font-size: 18px; font-weight: 500; margin-bottom: 14px; }
.panel .hint { font-size: 13px; color: var(--muted); padding: 18px 4px; text-align: center; }

/* Riadok so skladbou (výsledky hľadania aj rozrobený mix) */
.rows { list-style: none; max-height: 420px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.row { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 11px; }
.row + .row { margin-top: 2px; }
.row:hover { background: rgba(255,255,255,0.04); }
.row .art { width: 42px; height: 42px; flex: none; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,0.06); }
.row .txt { flex: 1; min-width: 0; }
.row .t { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .a { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .dur { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .no { width: 18px; flex: none; text-align: right; font-size: 12.5px; color: var(--cyan);
  font-weight: 600; font-variant-numeric: tabular-nums; }

.icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; padding: 0;
  color: var(--text); background: rgba(255,255,255,0.06);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s; }
.icon svg { width: 14px; height: 14px; display: block; pointer-events: none; }
.icon:hover { background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.22); }
/* pridaná skladba: fajka, už nie tlačidlo */
.icon:disabled { color: var(--cyan); background: transparent; border-color: transparent; cursor: default; }

.totals { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 14px 0 2px; }

/* Plávajúci súhrn rozrobeného mixu (telefón) */
.draft-bar { display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border: 0; border-radius: 13px; cursor: pointer; font: inherit; font-size: 14px;
  color: #0B0814; background: var(--mix) border-box; box-shadow: 0 12px 30px -12px rgba(0,0,0,0.95);
  transition: opacity .3s ease, transform .3s ease; }
.draft-bar.out { opacity: 0; transform: translateY(10px); }
.draft-bar-cta { font-family: "Space Grotesk", sans-serif; font-weight: 700; }

/* Uložené mixy */
.saved { margin-top: 34px; }
.saved h2 { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.mix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.mix-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.mix-card h3 { font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 500; }
.mix-card .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.mix-card ol { list-style: none; margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--line); }
.mix-card li { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.mix-card li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mix-card li b { color: var(--cyan); font-weight: 600; font-variant-numeric: tabular-nums; }
.mix-card.editing { border-color: rgba(34,211,238,0.55); background: rgba(34,211,238,0.05); }
.mix-card .tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mix-card .tools .btn { width: auto; flex: 1 1 0; min-width: 0; min-height: 38px; padding: 0 8px; font-size: 13px; }

@media (max-width: 860px) {
  .build { grid-template-columns: 1fr; }
  .rows { max-height: 340px; }
}

/* =========================================================================
   Telefóny: riadky nech držia pohromade a na tlačidlá sa dá trafiť palcom
   ========================================================================= */
@media (max-width: 560px) {
  .btn { white-space: nowrap; }
  .topbar { padding: 10px 0; margin-bottom: 20px; }
  .topbar .inner { padding: 0 16px; gap: 10px; }
  .topbar .me #meName { display: none; }
  .shell { padding: 0 16px; }
  .shell h1 { font-size: 26px; }
  .shell > h1 + p { font-size: 14px; margin-bottom: 20px; }

  .panel { padding: 16px 14px; }
  /* pod 16px iOS pri ťuknutí do poľa priblíži stránku */
  .field { font-size: 16px; }

  /* zoznam nech tečie so stránkou — vnorené skrolovanie sa na telefóne ovláda zle */
  .rows { max-height: none; overflow: visible; margin: 0; padding: 0; }

  .row { gap: 10px; padding: 7px 4px; }
  .row .art { width: 38px; height: 38px; }
  .row .dur { display: none; }                        /* čas ide k interpretovi */
  .row .a::after { content: " · " attr(data-dur); }
  .row .no { width: 14px; }
  .icon { width: 36px; height: 36px; }                /* terč pre palec */
  .icon svg { width: 16px; height: 16px; }

  .draft-bar { display: flex; }
  body.app { padding-bottom: 96px; }                  /* nech pruh neprekryje obsah */

  .mix-grid { grid-template-columns: 1fr; }
  .edit-photo { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .row-btns { justify-content: center; }
  .avatar-lg { width: 84px; height: 84px; font-size: 32px; }
}

/* ---------- Preklik na profil v hlavičke ---------- */
.me-link { display: flex; align-items: center; gap: 10px; padding: 4px; margin: -4px;
  border-radius: 999px; color: var(--muted); text-decoration: none; transition: color .16s, background .16s; }
.me-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ---------- Stránka Profil ---------- */
.edit-photo { display: flex; align-items: center; gap: 18px; }
.avatar-lg { width: 96px; height: 96px; font-size: 36px; }
.edit-photo-txt { min-width: 0; }
.edit-photo-txt p { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.lbl { display: block; font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
textarea.field { resize: vertical; min-height: 92px; line-height: 1.5; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; word-break: break-all; }


/* ---------- Právna pätka ---------- */
.legal { width: 100%; max-width: 1180px; margin: 44px auto 0; padding: 18px 24px 0;
  border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.legal p { max-width: 90ch; margin: 0 auto; text-align: center; }
.legal p + p { margin-top: 8px; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--text); }
.shell .legal { padding-left: 0; padding-right: 0; }

/* ---------- Podmienky ---------- */
.doc { max-width: 76ch; margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.doc h2 { font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 500;
  color: var(--text); margin: 28px 0 8px; }
.doc p + p { margin-top: 10px; }
.doc strong { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .legal { margin-top: 32px; padding: 16px 0 0; }
}
