/* iM3U Cloud Player site: the app's palette (CoreLayout UIColor + Palette) on the web. Dark, like the player. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #191919;
  --surface-2: #323232;
  --line: #4c4c4c;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.38);
  --blue: #a9cbd1;
  --blue-light: #dbfeff;
  --blue-dark: #799aa0;
  --peach: #eeb899;
  --peach-light: #ffeaca;
  --peach-dark: #ba886b;
  --shell: #fff5ee;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); font-weight: 600; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--blue-light); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(169, 203, 209, 0.22) 0%, rgba(169, 203, 209, 0) 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(238, 184, 153, 0.14) 0%, rgba(238, 184, 153, 0) 60%),
    var(--surface);
  border-bottom: 1px solid var(--surface-2);
}
.hero.peach {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(238, 184, 153, 0.24) 0%, rgba(238, 184, 153, 0) 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(169, 203, 209, 0.12) 0%, rgba(169, 203, 209, 0) 60%),
    var(--surface);
}
.hero::after { /* the "iM3U" wordmark from the icon, as a watermark */
  content: "iM3U";
  position: absolute;
  right: -12px;
  bottom: -36px;
  font-size: 150px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  opacity: 0.05;
  pointer-events: none;
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 700; }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); }

.tabs { display: flex; gap: 6px; padding: 4px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--surface-2); border-radius: 12px; }
.tab { padding: 6px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.tab[aria-current="page"] { background: var(--blue); color: #000; }

.hero-body { position: relative; z-index: 1; padding: 28px 0 44px; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--peach);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.015em; }
h1 { margin: 0; font-size: clamp(2.2rem, 8vw, 3.4rem); line-height: 1.05; }
.lede { margin: 14px 0 0; font-size: 1.12rem; color: var(--muted); max-width: 620px; }

/* ---------- Pills (the player's "Live" badge) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-weight: 600;
  font-size: 0.88rem;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--peach); }

/* ---------- Content ---------- */
main { padding: 36px 0 24px; }

.card {
  margin: 20px 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }

.badge-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--blue);
}
.badge-icon svg { width: 24px; height: 24px; }
.badge-icon.peach { color: var(--peach); }

h2 { margin: 44px 0 10px; font-size: 1.5rem; line-height: 1.2; }
h3 { margin: 22px 0 4px; font-size: 1.1rem; color: var(--blue-light); }
p, ul, ol { margin: 8px 0; }
ul, ol { padding-left: 1.3em; }
li { margin: 5px 0; }
li::marker { color: var(--peach); }
strong { font-weight: 700; }
em { font-style: normal; color: var(--peach-light); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.muted { color: var(--muted); }

.section-title { display: flex; align-items: center; gap: 12px; margin: 48px 0 12px; }
.section-title h2 { margin: 0; }
.num {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--blue);
  color: #000;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s, transform 0.08s;
}
.button:hover { color: #000; background: var(--blue-light); }
.button:active { transform: translateY(1px); }

/* ---------- Contents chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}
.chips a:hover { background: var(--line); }

/* ---------- FAQ ---------- */
.faq-group { display: grid; gap: 10px; }
details { background: var(--surface); border: 1px solid var(--surface-2); border-radius: var(--radius); }
details[open] { border-color: var(--blue-dark); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.15s;
}
details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details > p, details > ul, details > ol { margin: 0; padding: 0 18px 16px; color: rgba(255, 255, 255, 0.82); }
details > ul, details > ol { padding-left: 40px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--surface-2); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; }
th { background: var(--surface-2); font-weight: 700; }
tr + tr td { border-top: 1px solid var(--surface-2); }

/* ---------- Home ---------- */
.links-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.link-card { display: flex; align-items: center; gap: 16px; margin: 0; color: var(--ink); text-decoration: none; }
.link-card:hover { color: var(--ink); border-color: var(--blue-dark); }
.link-card p { margin: 2px 0 0; font-weight: 400; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (min-width: 720px) { .links-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
footer { margin-top: 40px; padding: 22px 0 40px; border-top: 1px solid var(--surface-2); color: var(--faint); font-size: 0.92rem; }
footer a { color: var(--muted); }
