/* musicplayer — wspólny styl strony i panelu */

:root {
  --bg: #f6f6f8;
  --card: #ffffff;
  --text: #16161a;
  --muted: #6b6b73;
  --line: #e2e2e7;
  --accent: #16161a;
  --on-accent: #ffffff;
  --ok: #1a7f37;
  --err: #c92a2a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #141416;
    --text: #f4f4f6;
    --muted: #97979f;
    --line: #2a2a2e;
    --accent: #f4f4f6;
    --on-accent: #111113;
    --ok: #4ade80;
    --err: #ff6b6b;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Nagłówki */

h1 { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; font-weight: 620; margin: 32px 0 8px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--muted); }

.muted { color: var(--muted); font-size: .875rem; }
.err { color: var(--err); font-size: .875rem; margin-top: 12px; }
.ok { color: var(--ok); }
.hidden { display: none !important; }

/* Ikona aplikacji */

.icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: block;
  box-shadow: var(--shadow);
}
.icon.small { width: 44px; height: 44px; border-radius: 10px; }

/* Ekran startowy */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}
.hero h1 { font-size: 1.9rem; margin: 4px 0 0; }
.hero + footer { margin-top: 8px; }
.hero .tagline { color: var(--muted); margin: 0; }

/* Karty i wiersze */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.bar { display: flex; align-items: center; gap: 12px; }
.bar .grow { flex: 1; min-width: 0; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .meta {
  color: var(--muted);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Przyciski */

button {
  font: inherit;
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 550;
  cursor: pointer;
  transition: opacity .15s;
}
button:hover { opacity: .85; }
button:disabled { opacity: .45; cursor: default; }

button.apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 300px;
  max-width: 100%;
  /* Apple zaleca, by tekst miał około 43% wysokości przycisku. */
  font-size: 1.1875rem;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: 14px;
}
button.ghost {
  background: none;
  color: var(--muted);
  padding: 8px 10px;
  font-weight: 450;
  font-size: .875rem;
}
button.ghost:hover { color: var(--text); }

/* Strefa upuszczania */

#drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--card);
  margin-bottom: 16px;
}
#drop:hover, #drop.over { border-color: var(--accent); }
#drop.over { background: var(--bg); }
#drop strong { display: block; color: var(--text); font-weight: 550; margin-bottom: 4px; }

progress { width: 84px; height: 6px; }

/* Stopka */

.links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: .875rem;
  margin-top: 28px;
}
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--text); }


.back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--text); }

/* Telefon */

@media (max-width: 520px) {
  main { padding: 24px 16px 60px; }
  h1 { font-size: 1.4rem; }
  .hero h1 { font-size: 1.6rem; }
  .card, #drop { border-radius: 14px; }
  #drop { padding: 36px 16px; }
  button.apple { width: 300px; }
  .row { flex-wrap: wrap; gap: 8px; }
  .row .name { flex-basis: 100%; }
}
