:root {
  --ink: #10233b;
  --bg: #fff3c4;
  --paper: #ffffff;
  --magenta: #ff2e88;
  --lime: #c6ff3a;
  --blue: #2d7bff;
  --cyan: #57c7e0;
  --gold: #ffd02e;
  --purple: #9b5cff;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 100px;
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 46, 136, 0.12) 0 12px, transparent 13px),
    radial-gradient(circle at 88% 12%, rgba(45, 123, 255, 0.12) 0 12px, transparent 13px),
    linear-gradient(180deg, #ffe9a8, #ffd9ec 60%, #d8f0ff);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.muted { color: #6b6b80; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 22px; margin: 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mascot { display: flex; }
.brand-word { font-family: "Bungee", sans-serif; font-size: 22px; letter-spacing: 0.5px; }
.brand-dash { color: var(--magenta); }
.nav { display: flex; gap: 8px; }
.nav a {
  font-weight: 600; font-size: 15px; padding: 7px 14px; border-radius: 10px;
  border: 2px solid transparent;
}
.nav a:hover { background: var(--lime); border-color: var(--ink); }
.nav a.active { background: var(--magenta); color: #fff; border-color: var(--ink); }
.auth-area { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.balance {
  display: flex; align-items: center; gap: 7px;
  font-family: "Bungee", sans-serif; font-size: 16px;
  background: var(--gold); border: 3px solid var(--ink); border-radius: 99px;
  padding: 6px 16px 6px 10px; box-shadow: var(--shadow-sm);
}
.balance:hover { transform: translate(-1px, -1px); }
.logout {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; cursor: pointer; font-size: 18px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow-sm); color: var(--ink);
}
.logout:active { transform: translate(2px, 2px); box-shadow: none; }
.auth-area .btn { padding: 8px 16px; font-size: 15px; }

/* ---------- Layout ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 6px 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.section-head h2 { font-family: "Bungee", sans-serif; font-size: 22px; margin: 0; }
.tag {
  font-family: "Press Start 2P", monospace; font-size: 9px;
  background: var(--blue); color: #fff; border: 2px solid var(--ink);
  border-radius: 8px; padding: 6px 9px; display: inline-block;
}
.link { color: var(--magenta); font-weight: 600; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  text-align: center; margin-top: 16px; padding: 36px 22px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero h1 { font-family: "Bungee", sans-serif; font-size: 40px; margin: 14px 0 8px; line-height: 1.05; }
.hero h1 .pink { color: var(--magenta); }
.hero p { font-size: 17px; max-width: 460px; margin: 0 auto 22px; font-weight: 500; }
.hero-bunny { width: 88px; height: 88px; }
.sticker {
  position: absolute; font-family: "Press Start 2P", monospace; font-size: 10px;
  background: var(--lime); border: 2px solid var(--ink); border-radius: 8px; padding: 6px 8px;
}
.sticker.s1 { top: 18px; left: 18px; transform: rotate(-8deg); }
.sticker.s2 { top: 22px; right: 16px; transform: rotate(7deg); background: var(--cyan); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Fredoka", sans-serif; font-size: 16px; font-weight: 700; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 14px; padding: 11px 22px;
  background: var(--lime); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform 0.05s;
}
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: default; box-shadow: none; }
.btn-pink { background: var(--magenta); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-white { background: var(--paper); }

/* ---------- Track grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px;
  padding: 12px; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform 0.08s;
  position: relative;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.cover {
  height: 134px; border-radius: 12px; border: 3px solid var(--ink); margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.cover i { font-size: 34px; color: var(--ink); }
.card h3 { font-size: 16px; font-weight: 700; margin: 0; }
.card .sub { font-size: 13px; color: #6b6b80; margin: 3px 0 0; font-weight: 500; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.likes { font-size: 13px; color: #6b6b80; font-weight: 600; }
.boost-btn {
  font-family: "Fredoka", sans-serif; font-size: 12px; font-weight: 700; cursor: pointer;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; padding: 4px 9px;
  display: inline-flex; align-items: center; gap: 4px;
}
.boost-btn:active { transform: translate(1px, 1px); }
.card-actions { display: flex; align-items: center; gap: 6px; }
.report-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; cursor: pointer; font-size: 14px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; color: var(--ink);
}
.report-btn:hover { background: var(--magenta); color: #fff; }
.report-btn:active { transform: translate(1px, 1px); }

/* AI badge */
.ai-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-family: "Press Start 2P", monospace; font-size: 8px;
  background: var(--blue); color: #fff; border: 2px solid var(--ink);
  border-radius: 7px; padding: 4px 6px; display: inline-flex; align-items: center; gap: 4px;
}
.boost-flag {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-family: "Press Start 2P", monospace; font-size: 8px;
  background: var(--magenta); color: #fff; border: 2px solid var(--ink);
  border-radius: 7px; padding: 4px 6px;
}

/* Цветные обложки */
.lime { background: var(--lime); }
.magenta { background: #ffc2dd; }
.blue { background: #bcd4ff; }
.gold { background: var(--gold); }
.purple { background: #d9c2ff; }
.cyan { background: #bdeefa; }

/* ---------- Upload ---------- */
.panel {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow); max-width: 560px; margin: 22px auto;
}
.panel h2 { font-family: "Bungee", sans-serif; font-size: 22px; margin: 0 0 6px; }
.panel .lead { margin: 0 0 18px; font-weight: 500; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
input[type="text"], select {
  width: 100%; font-family: "Fredoka", sans-serif; font-size: 15px; font-weight: 500;
  background: #fffdf3; border: 3px solid var(--ink); border-radius: 12px; padding: 11px 13px;
  outline: none; color: var(--ink);
}
input[type="text"]:focus, select:focus { background: #fff; box-shadow: var(--shadow-sm); }
.dropzone {
  border: 3px dashed var(--ink); border-radius: 16px; padding: 30px; text-align: center;
  background: #fffdf3; cursor: pointer; transition: background 0.1s;
}
.dropzone:hover { background: var(--lime); }
.dropzone i { font-size: 40px; }
.dropzone p { margin: 8px 0 0; font-weight: 600; }
.dropzone .hint { font-size: 13px; color: #6b6b80; font-weight: 500; }
.file-chip {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px;
  background: var(--cyan); border: 3px solid var(--ink); border-radius: 12px; font-weight: 600;
}
.disclaimer {
  font-size: 13px; color: #6b6b80; font-weight: 500; margin-top: 14px;
  background: #fff7df; border: 2px solid var(--ink); border-radius: 10px; padding: 10px 12px;
}

/* ---------- Pricing (гроши) ---------- */
.pricing { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pack { display: flex; flex-direction: column; align-items: flex-start; cursor: default; padding: 22px; }
.pack:hover { transform: none; box-shadow: var(--shadow-sm); }
.pack.best { box-shadow: var(--shadow); border-color: var(--magenta); }
.pack-badge {
  font-family: "Press Start 2P", monospace; font-size: 8px;
  background: var(--magenta); color: #fff; border: 2px solid var(--ink);
  border-radius: 7px; padding: 5px 7px; margin-bottom: 10px;
}
.pack h3 { font-family: "Bungee", sans-serif; font-size: 18px; margin: 0 0 10px; }
.pack-amount { display: flex; align-items: center; gap: 8px; font-family: "Bungee", sans-serif; font-size: 26px; }
.pack .sub { min-height: 22px; }
.pack-price { font-family: "Bungee", sans-serif; font-size: 22px; margin: 12px 0 14px; }

/* ---------- Player ---------- */
.player {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  background: var(--ink); color: #fff;
  border: 3px solid var(--ink); border-radius: 16px; padding: 10px 18px;
  box-shadow: 0 -2px 0 rgba(0,0,0,0.1);
}
.player-track { display: flex; align-items: center; gap: 12px; min-width: 170px; }
.player-cover {
  width: 42px; height: 42px; border-radius: 10px; border: 2px solid #fff;
  background: var(--magenta); display: flex; align-items: center; justify-content: center;
}
.player-meta p { margin: 0; font-size: 14px; font-weight: 600; }
.player-meta .muted { font-size: 12px; color: #b9b9cc; font-weight: 500; }
.player-controls { display: flex; align-items: center; gap: 12px; }
.icon-btn { background: none; border: none; color: var(--lime); cursor: pointer; font-size: 18px; display: flex; }
.play-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--ink);
  border: 2px solid #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.player-progress { flex: 1; display: flex; align-items: center; gap: 10px; }
.player-progress input { flex: 1; accent-color: var(--magenta); }
.time { font-size: 12px; color: #b9b9cc; font-variant-numeric: tabular-nums; min-width: 34px; }

/* ---------- Footer ---------- */
.site-foot { max-width: 1040px; margin: 24px auto 0; padding: 0 22px; }
.site-foot p {
  font-size: 13px; color: #5a5a70; font-weight: 500; text-align: center;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 12px 16px;
}
.site-foot a { color: var(--magenta); font-weight: 700; }

/* ---------- Misc ---------- */
.spinner { display: inline-block; width: 16px; height: 16px; border: 3px solid rgba(16,35,59,.25); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-weight: 600; z-index: 50; border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
}
.empty { text-align: center; color: #6b6b80; font-weight: 500; padding: 40px 0; }

@media (max-width: 720px) {
  .nav { display: none; }
  .hero h1 { font-size: 28px; }
  .brand-word { font-size: 18px; }
}
