@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --night: #070d24;
  --night-2: #0d1736;
  --night-3: #142152;
  --frost: #eef4ff;
  --frost-dim: #a9b6d8;
  --gold: #f6c453;
  --gold-deep: #d99a1e;
  --berry: #e8364f;
  --pine: #1f9d6a;
  --ice: #7fd3ff;
  --card: rgba(18, 30, 72, 0.72);
  --line: rgba(170, 196, 255, 0.16);
  --radius: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--frost);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(127, 211, 255, 0.14), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(232, 54, 79, 0.12), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(31, 157, 106, 0.16), transparent 60%),
    var(--night);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--gold); }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; position: relative; z-index: 2; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* ---------- Garland ---------- */
.garland {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between;
  margin: 0; padding: 0 0 0 0; list-style: none;
  height: 64px; overflow: hidden;
  width: 100%;
}
.garland li {
  position: relative; flex: 0 0 auto;
  width: 14px; height: 24px; margin: 14px 18px 0;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--c);
  box-shadow: 0 6px 22px 3px var(--c);
  animation: blink 2.4s ease-in-out infinite;
  animation-delay: var(--d);
}
.garland li::before {
  content: ""; position: absolute; top: -6px; left: 2px;
  width: 10px; height: 8px; border-radius: 3px;
  background: #3a4568;
}
.garland li::after {
  content: ""; position: absolute; top: -14px; left: 8px;
  width: 52px; height: 18px;
  border-bottom: 2px solid #2b3553;
  border-radius: 50%;
}
.garland li:last-child::after { display: none; }
@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 6px 24px 4px var(--c); }
  50% { opacity: 0.35; box-shadow: 0 0 4px 0 var(--c); }
}

/* ---------- Header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 6px 0 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--frost); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: -0.5px;
  color: var(--night); background: linear-gradient(140deg, #fff3c7, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 8px 24px -8px rgba(246, 196, 83, 0.8);
}
.brand-text { font-weight: 700; font-size: 14px; line-height: 1.2; }
.brand-text small { display: block; color: var(--frost-dim); font-weight: 500; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--frost); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: 999px; border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav a:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.04); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px;
  padding: 40px 0 70px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
  padding: 8px 14px; border-radius: 999px;
  background: rgba(246, 196, 83, 0.08); border: 1px solid rgba(246, 196, 83, 0.28);
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 12px var(--berry); animation: blink 1.6s infinite; --c: var(--berry); }
h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(42px, 6.6vw, 86px); line-height: 0.98; letter-spacing: -0.035em;
  margin: 22px 0 22px;
}
h1 .line2 {
  display: block;
  background: linear-gradient(100deg, #fff6d6 0%, var(--gold) 35%, #ff8a5c 60%, var(--berry) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(246, 196, 83, 0.25));
}
.hero-lead { font-size: clamp(17px, 1.6vw, 20px); color: #cfd9f5; max-width: 34em; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; text-decoration: none;
  font-weight: 800; font-size: 16px;
  padding: 16px 26px; border-radius: 16px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-gold {
  color: #2a1600;
  background: linear-gradient(140deg, #fff0b8, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 14px 34px -12px rgba(246, 196, 83, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-gold:hover { box-shadow: 0 18px 44px -10px rgba(246, 196, 83, 1), inset 0 1px 0 rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.btn-ghost { color: var(--frost); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.hero-art { position: relative; }
.hero-art .frame {
  position: relative; border-radius: 34px; overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transform: rotate(1.5deg);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .frame::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 60%, transparent 40%, rgba(7, 13, 36, 0.55));
}
.sticker {
  position: absolute; z-index: 3;
  font-family: var(--display); font-weight: 700;
  padding: 14px 18px; border-radius: 18px;
  background: var(--berry); color: #fff;
  box-shadow: 0 18px 40px -14px rgba(232, 54, 79, 0.9);
  transform: rotate(-6deg);
}
.sticker.s1 { left: -22px; bottom: 34px; font-size: 15px; }
.sticker.s2 {
  right: -10px; top: 26px; background: var(--pine); transform: rotate(7deg); font-size: 13px;
  box-shadow: 0 18px 40px -14px rgba(31, 157, 106, 0.9);
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex; gap: 10px; margin: 34px 0 0; flex-wrap: wrap; align-items: stretch;
}
.countdown .label {
  align-self: center; font-size: 13px; color: var(--frost-dim); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; margin-right: 6px; width: 100%;
}
.cd-cell {
  min-width: 74px; padding: 12px 10px 10px; text-align: center;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.cd-cell b { display: block; font-family: var(--display); font-size: 28px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-cell span { font-size: 12px; color: var(--frost-dim); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 70px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.025em; margin: 0;
}
h2 em { font-style: normal; color: var(--gold); }
.section-sub { color: var(--frost-dim); margin: 10px 0 0; max-width: 36em; }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule {
  padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
}
.rule .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 16px; background: rgba(255, 255, 255, 0.06);
}
.rule h3 { font-family: var(--display); font-size: 18px; margin: 0 0 8px; font-weight: 700; }
.rule p { margin: 0; color: var(--frost-dim); font-size: 15px; }
.rule:nth-child(1) .ico { background: rgba(246, 196, 83, 0.14); }
.rule:nth-child(2) .ico { background: rgba(232, 54, 79, 0.16); }
.rule:nth-child(3) .ico { background: rgba(31, 157, 106, 0.18); }

/* ---------- Suggest form ---------- */
.suggest-wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 34px; align-items: start; }
.howto { padding: 6px 0; }
.howto ol { counter-reset: step; list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.howto li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; color: #cfd9f5; }
.howto li::before {
  content: counter(step);
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; color: var(--night);
  background: var(--frost);
}
.howto li b { color: var(--frost); }

.card {
  position: relative;
  padding: 30px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(24, 38, 90, 0.92), rgba(14, 23, 58, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(246, 196, 83, 0.7), transparent 30%, transparent 70%, rgba(127, 211, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 14px; }
.field label small { color: var(--frost-dim); font-weight: 500; }
.input {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  color: var(--frost); background: rgba(5, 10, 30, 0.55);
  border: 1.5px solid rgba(170, 196, 255, 0.18);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: #6c7aa3; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(246, 196, 83, 0.15); }
.field.invalid .input { border-color: var(--berry); box-shadow: 0 0 0 4px rgba(232, 54, 79, 0.14); }
.field.valid .input { border-color: rgba(31, 157, 106, 0.8); }
.hint { font-size: 13px; color: var(--frost-dim); min-height: 1em; }
.field.invalid .hint { color: #ff8b9b; font-weight: 600; }
.field.valid .hint { color: #6ee0ad; font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row.r-3-1 { grid-template-columns: 1.6fr 1fr; }
.link-input-wrap { position: relative; }
.link-input-wrap .input { padding-left: 50px; }
.link-input-wrap .ym {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: conic-gradient(from 200deg, #ffcc00, #ff3d3d, #ffcc00);
  display: grid; place-items: center; font-size: 13px; color: #fff; font-weight: 900;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form-foot p { margin: 0; color: var(--frost-dim); font-size: 13px; flex: 1; min-width: 200px; }
.alert { padding: 14px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.alert.err { background: rgba(232, 54, 79, 0.14); border: 1px solid rgba(232, 54, 79, 0.4); color: #ffc2cb; }
.success { text-align: center; padding: 30px 10px 10px; }
.success .big { font-size: 64px; line-height: 1; margin-bottom: 14px; animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
.success h3 { font-family: var(--display); font-size: 26px; margin: 0 0 10px; }
.success p { color: var(--frost-dim); margin: 0 auto 24px; max-width: 26em; }
@keyframes pop { from { transform: scale(0.3) rotate(-20deg); opacity: 0; } }

/* ---------- Playlist ---------- */
.playlist-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { width: min(320px, 100%); }
.count-pill {
  font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  background: rgba(246, 196, 83, 0.12); color: var(--gold); border: 1px solid rgba(246, 196, 83, 0.3);
}
.tracks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.track {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
  transition: transform 0.2s, border-color 0.2s;
}
.track:hover { transform: translateY(-2px); border-color: rgba(246, 196, 83, 0.35); }
.track .num {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  background: linear-gradient(140deg, rgba(127, 211, 255, 0.2), rgba(232, 54, 79, 0.2));
}
.track .meta { min-width: 0; }
.track .t { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .a { color: var(--frost-dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .by { font-size: 12px; color: #8090bd; margin-top: 2px; }
.track .open {
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); color: var(--frost);
}
.track .open:hover { background: rgba(255, 204, 0, 0.18); }
.empty {
  padding: 40px; text-align: center; border-radius: var(--radius);
  border: 1.5px dashed var(--line); color: var(--frost-dim);
}
.empty b { display: block; font-family: var(--display); color: var(--frost); font-size: 20px; margin-bottom: 6px; }
.skeleton { height: 76px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
footer { padding: 40px 0 60px; color: #7d8bb5; font-size: 14px; border-top: 1px solid var(--line); margin-top: 30px; }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: #7d8bb5; }

/* ---------- Moderator ---------- */
.mod-page main { padding: 30px 0 80px; }
.login-card { max-width: 440px; margin: 50px auto; text-align: center; }
.login-card .lock { font-size: 52px; margin-bottom: 10px; }
.login-card h1 { font-size: 30px; margin: 0 0 8px; }
.login-card p { color: var(--frost-dim); margin: 0 0 24px; }
.login-card .btn { width: 100%; }
.mod-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.mod-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab {
  cursor: pointer; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--frost);
  padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px;
  display: inline-flex; gap: 8px; align-items: center;
}
.tab .n { background: rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.tab[aria-selected="true"] { background: var(--frost); color: var(--night); border-color: var(--frost); }
.tab[aria-selected="true"] .n { background: var(--night); color: var(--frost); }
.tab.pending .n { background: var(--berry); color: #fff; }
.mod-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.mod-item {
  padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 14px 18px; align-items: center;
}
.mod-item .t { font-weight: 800; font-size: 17px; }
.mod-item .a { color: var(--frost-dim); }
.mod-item .info { font-size: 13px; color: #8090bd; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.mod-item .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mod-item .player { grid-column: 1 / -1; }
.mod-item .player iframe { width: 100%; height: 180px; border: 0; border-radius: 14px; background: #111; }
.chip { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.chip.pending { background: rgba(246, 196, 83, 0.16); color: var(--gold); }
.chip.approved { background: rgba(31, 157, 106, 0.2); color: #6ee0ad; }
.chip.rejected { background: rgba(232, 54, 79, 0.18); color: #ff8b9b; }
.sbtn {
  cursor: pointer; border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px;
  font-weight: 700; font-size: 14px; color: var(--frost); background: rgba(255, 255, 255, 0.05);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.sbtn:hover { background: rgba(255, 255, 255, 0.1); }
.sbtn.ok { background: var(--pine); border-color: var(--pine); color: #fff; }
.sbtn.no { background: rgba(232, 54, 79, 0.16); border-color: rgba(232, 54, 79, 0.45); color: #ffc2cb; }
.sbtn.del { color: #8b97bd; }
.sbtn[disabled] { opacity: 0.5; cursor: progress; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(30px);
  z-index: 50; opacity: 0; pointer-events: none;
  padding: 13px 20px; border-radius: 14px; font-weight: 700;
  background: var(--frost); color: var(--night); box-shadow: var(--shadow);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 20px; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; order: -1; }
  .rules { grid-template-columns: 1fr; }
  .suggest-wrap { grid-template-columns: 1fr; }
  .tracks { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .container { width: min(1160px, 100% - 28px); }
  .nav { display: none; }
  .row, .row.r-3-1 { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .cd-cell { min-width: 0; flex: 1; }
  .cd-cell b { font-size: 22px; }
  .sticker.s1 { left: 6px; }
  .sticker.s2 { right: 6px; }
  .track { grid-template-columns: 40px 1fr; }
  .track .num { width: 40px; height: 40px; }
  .track .open { grid-column: 2; justify-self: start; }
  .mod-item { grid-template-columns: 1fr; }
  .mod-item .actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
