/* nunu, in the brand of the nunu app (Figma "nunu-Appdesign"): warm black with red glows, rose
   type in Funnel Sans with an italic serif accent, the coral-to-lilac gradient, pale rose buttons,
   the pink gem for songs you can make, line icons, and a blurred tab bar on phones. */

@font-face {
  font-family: "Funnel Sans";
  src: url("/assets/fonts/FunnelSans.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
}
/* The design's serif is a trial font; Instrument Serif (OFL) carries the same italic accent. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #100101;
  --rose: #ffcece;
  --rose-2: #c68685;
  --red: #f44e4e;
  --lilac: #e4abff;
  --gradient: linear-gradient(-65.67deg, #e4abff 0%, #f44e4e 60.58%);
  --glass: rgba(255, 206, 206, 0.08);
  --line: rgba(255, 206, 206, 0.14);
  --line-strong: rgba(255, 206, 206, 0.32);
  --panel: rgba(16, 1, 1, 0.7);
  --pad: clamp(16px, 4vw, 32px);
  --serif: "Instrument Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--rose); }
html { background: var(--black); }
body {
  font-family: "Funnel Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  /* The app's background: deep red light pooling at the edges of the black. */
  background:
    radial-gradient(60vmax 50vmax at 105% 110%, rgba(150, 30, 30, 0.45), transparent 70%),
    radial-gradient(40vmax 30vmax at -10% -10%, rgba(120, 25, 25, 0.35), transparent 70%),
    var(--black);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0.01em; }
h1, h2, h3 { font-weight: 400; margin: 0; }

/* Icons: the app's line icons, drawn in the current text colour. */
.icon {
  display: inline-block; width: 24px; height: 24px; flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / 80% no-repeat; mask: var(--i) center / 80% no-repeat;
}
.i-generate { --i: url("/assets/brand/icon-generate.svg"); }
.i-songs { --i: url("/assets/brand/icon-songs.svg"); }
.i-profile { --i: url("/assets/brand/icon-profile.svg"); }
.i-arrow { --i: url("/assets/brand/icon-arrow-right.svg"); -webkit-mask-size: 62%; mask-size: 62%; }
.i-like { --i: url("/assets/brand/icon-like.svg"); }
.i-check { --i: url("/assets/brand/icon-check.svg"); -webkit-mask-size: 60%; mask-size: 60%; }
/* The gem: one song you can make. */
.gem, .cube-icon {
  display: inline-block; width: 18px; height: 20px; flex: none;
  background: url("/assets/brand/gem.svg") center / 200% no-repeat;
}

/* ------------------------------------------------------------------ header */
header.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad);
  background: linear-gradient(rgba(16, 1, 1, 0.92) 60%, transparent);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 2px; font-size: 24px; letter-spacing: 0.02em; }
.brand img { width: 46px; height: 46px; margin: -8px -4px -8px -10px; }
nav.links { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 30px); color: var(--rose-2); font-size: 15px; }
nav.links a { display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s; }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--rose); }
nav.links .icon { width: 20px; height: 20px; }
nav.links .credits { color: var(--rose); gap: 6px; position: relative; }
.claim-dot {
  position: absolute; top: -3px; right: -9px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 8px rgba(244, 78, 78, 0.7);
  animation: dot 2.4s ease-in-out infinite;
}
@keyframes dot { 0%, 100% { opacity: 0.5; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }

main { padding: 8px var(--pad) 60px; max-width: 1120px; margin: 0 auto; }

/* ------------------------------------------------------------------ the tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 720px) {
  nav.links .wide { display: none; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; justify-content: center; gap: clamp(8px, 6vw, 30px);
    padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 24px 24px 0 0; border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    width: 68px; height: 60px; border-radius: 12px; color: var(--rose-2); font-size: 11px; line-height: 1.1;
  }
  .tabbar a[aria-current="page"] { color: var(--rose); }
  main { padding-bottom: 120px; }
  footer.foot { padding-bottom: 110px; }
}

/* ------------------------------------------------------------------ buttons */
.btn, .play, .claim {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 10px;
  background: var(--rose); color: var(--black); font-size: 15px; line-height: 1.1;
  transition: transform 0.15s ease, filter 0.2s;
}
.btn:hover, .play:hover, .claim:hover { filter: brightness(1.04); }
.btn:active, .play:active, .claim:active { transform: scale(0.985); }
.btn-dark { background: var(--black); color: var(--rose); }
.btn-gradient, .claim { background: var(--gradient); color: var(--black); }
.like, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 10px;
  background: var(--glass); color: var(--rose); font-size: 15px;
}
.like.on { color: var(--red); }
.like .icon { width: 22px; height: 22px; }
.link-arrow { display: inline-flex; align-items: center; gap: 2px; }

/* ------------------------------------------------------------------ hero (the gradient card) */
.hero {
  border-radius: 20px; padding: 18px 22px 22px; margin: 6px 0 28px;
  background: var(--gradient); color: var(--black);
  display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: end;
}
.hero h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.08; }
.hero p { margin: 10px 0 0; max-width: 520px; font-size: 15px; line-height: 1.3; }
.hero .cta { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero .cta .btn { min-width: 240px; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero .cta .btn { width: 100%; }
}

/* ------------------------------------------------------------------ feed */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; }
.section-head h2 { font-size: 20px; line-height: 1.4; }
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px;
  border: 1px solid var(--line);
}
.tabs button { padding: 8px 18px; border-radius: 8px; color: var(--rose); font-size: 15px; }
.tabs button.on { background: var(--rose); color: var(--black); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }

.card { display: block; border-radius: 14px; padding: 10px; background: rgba(255, 206, 206, 0.035); border: 1px solid var(--line); transition: transform 0.25s ease, border-color 0.25s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.thumb { aspect-ratio: 16 / 10; position: relative; border-radius: 8px; overflow: hidden; }
.thumb .mood {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px 6px; border-radius: 54px;
  background: rgba(16, 1, 1, 0.45); backdrop-filter: blur(8px); font-size: 12px; color: var(--rose);
}
.meta { padding: 12px 4px 4px; }
.title { font-size: 17px; line-height: 1.2; }
.tags, .sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span, .sub span {
  padding: 4px 10px 6px; border-radius: 54px; background: var(--glass); backdrop-filter: blur(8px);
  color: var(--rose-2); font-size: 12px; line-height: 1.1;
}

/* ------------------------------------------------------------------ a song */
.song { max-width: 760px; margin: 0 auto; }
.song .thumb { border-radius: 16px; }
.song h1 { font-size: clamp(34px, 7vw, 56px); line-height: 1.05; margin: 22px 0 4px; }
.actions { display: flex; gap: 12px; margin: 24px 0 32px; flex-wrap: wrap; }
.actions .play { min-width: 180px; }

.comments h2, .create h2 { font-size: 20px; line-height: 1.4; margin: 0 0 12px; }
.comment { padding: 14px 0; border-top: 1px solid var(--line); }
.comment .who { font-size: 12px; color: var(--rose-2); }
.comment .body { margin-top: 6px; font-size: 15px; line-height: 1.45; }
.hint { color: var(--rose-2); font-size: 14px; padding: 12px 0; }
.hint a { color: var(--rose); border-bottom: 1px solid var(--rose-2); }
.hint.center, .center { text-align: center; }

.comment-form textarea, .field input, .field textarea, .dev-login input {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--rose); font: inherit; font-size: 15px;
}
.comment-form textarea::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--rose-2); opacity: 0.8; }
.comment-form textarea:focus, .field input:focus, .field textarea:focus, .dev-login input:focus { outline: none; border-color: var(--rose); }
.comment-form textarea { min-height: 88px; resize: vertical; }
.comment-form .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 10px; }
.comment-form .post { min-height: 40px; padding: 0 22px; border-radius: 10px; background: var(--rose); color: var(--black); }

.soon { text-align: center; padding: 80px 0; color: var(--rose-2); font-size: 18px; }
.loading { color: var(--rose-2); padding: 40px 0; }

/* ------------------------------------------------------------------ account */
.account { max-width: 480px; margin: 40px auto; text-align: center; }
.account h1 { font-size: clamp(34px, 8vw, 48px); line-height: 1.1; margin: 0 0 10px; }
.account .sub, .account .actions { justify-content: center; }
.account .lead { color: var(--rose-2); line-height: 1.45; }
.g-signin { display: flex; justify-content: center; margin: 26px 0; min-height: 44px; }
.dev-login { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); }
.dev-login .hint { padding: 0; }
.dev-login input { text-align: center; max-width: 260px; }

/* ------------------------------------------------------------------ shop (the plan card) */
.shop { max-width: 440px; margin: 10px auto 30px; }
.shop > h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.1; margin: 0 0 6px; }
.shop > .lead { color: var(--rose-2); margin: 0 0 24px; }
.free-card {
  position: relative; padding: 20px; border-radius: 16px;
  background: rgba(255, 206, 206, 0.035); border: 1px solid var(--line);
}
.free-card.mine { border-color: var(--red); box-shadow: 0 0 0 1px rgba(244, 78, 78, 0.25), 0 20px 60px rgba(244, 78, 78, 0.08); }
.free-card .badge {
  position: absolute; top: 14px; right: 14px; padding: 4px 10px 5px; border-radius: 6px;
  background: var(--gradient); color: var(--black); font-size: 12px;
}
.free-card h2 { font-size: 20px; margin: 0 0 10px; }
.free-card .price { font-family: var(--serif); font-style: italic; font-size: 40px; line-height: 1; }
.free-card .price small { font-family: "Funnel Sans", sans-serif; font-style: normal; color: var(--rose-2); font-size: 15px; }
.free-card .claim { width: 100%; margin-top: 20px; }
.claim.waiting { background: var(--glass); color: var(--rose-2); cursor: default; font-variant-numeric: tabular-nums; }
.free-card ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.free-card li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.free-card li .icon { width: 20px; height: 20px; color: var(--rose); }
.free-card li.streak { color: var(--rose-2); padding-left: 30px; }

/* ------------------------------------------------------------------ the celebration (calm, no flashes) */
.celebrate { position: fixed; inset: 0; z-index: 50; background: rgba(16, 1, 1, 0.6); backdrop-filter: blur(4px); animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.celebrate .sprite {
  position: fixed; left: 0; top: 0; width: 18px; height: 20px; margin: -10px 0 0 -9px;
  background: url("/assets/brand/gem.svg") center / 200% no-repeat;
  opacity: 0; animation: fly 1.15s cubic-bezier(0.45, 0.05, 0.3, 1) both;
}
@keyframes fly {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) scale(0.4); }
  15% { opacity: 1; }
  40% { transform: translate(var(--hx), var(--hy)) scale(1.15); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) scale(0.6); }
}
.celebrate-card {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-width: min(86vw, 320px); padding: 26px 28px; border-radius: 20px; text-align: center;
  background: var(--panel); border: 1px solid var(--line-strong); backdrop-filter: blur(16px);
}
.celebrate-card .title { font-family: var(--serif); font-style: italic; font-size: 26px; }
.celebrate-card .counter { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 48px; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.celebrate-card .counter .gem, .celebrate-card .counter .cube-icon { width: 28px; height: 32px; }
.celebrate-card .sub { justify-content: center; margin-bottom: 18px; }
@media (prefers-reduced-motion: reduce) {
  .celebrate, .claim-dot { animation: none; }
  .celebrate .sprite { display: none; }
}

/* ------------------------------------------------------------------ create */
.create { max-width: 640px; margin: 10px auto; }
.create h1 { font-size: clamp(34px, 7vw, 48px); line-height: 1.1; margin: 0 0 8px; }
.create .lead { color: var(--rose-2); line-height: 1.45; margin: 0 0 8px; }
.field { display: block; margin: 22px 0 6px; }
.field > span { display: block; font-size: 20px; line-height: 1.4; margin-bottom: 10px; }
.field em { font-family: "Funnel Sans", sans-serif; font-style: normal; font-size: 14px; color: var(--rose-2); }
.field small { display: block; text-align: right; color: var(--rose-2); font-size: 12px; margin-top: 4px; opacity: 0.8; }
.field textarea.style { min-height: 100px; resize: vertical; }
.field textarea.lyrics { min-height: 220px; resize: vertical; line-height: 1.45; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.idea { padding: 5px 12px 7px; border-radius: 54px; background: var(--glass); color: var(--rose-2); font-size: 12px; text-align: left; }
.idea:hover { color: var(--rose); }
.choice { display: flex; gap: 24px; margin: 8px 0 4px; }
.radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--rose-2); }
.radio input { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.radio input:checked { border-color: var(--rose); }
.radio input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.radio input:checked + span { color: var(--rose); }
.create .claim, .create .make { display: flex; width: 100%; margin-top: 26px; background: var(--rose); color: var(--black); }
.create .make:disabled { opacity: 0.6; cursor: default; }
.mine-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.mine-row .t { font-size: 15px; }
.mine-row a.t { color: var(--rose); }
.mine-row a.t:hover { color: var(--red); }
.mine-row .st { padding: 4px 10px 6px; border-radius: 54px; background: var(--glass); color: var(--rose-2); font-size: 12px; text-align: right; }
.mine-row.working .st { animation: dot 2.4s ease-in-out infinite; }
.mine-row.failed .st { color: var(--red); }

/* ------------------------------------------------------------------ footer and legal pages */
footer.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; padding: 30px var(--pad) 40px; font-size: 13px; color: var(--rose-2); }
footer.foot a:hover { color: var(--rose); }
.legal { max-width: 680px; margin: 10px auto; line-height: 1.6; }
.legal h1 { font-size: clamp(34px, 7vw, 48px); margin: 0 0 6px; }
.legal h2 { font-size: 20px; margin: 30px 0 6px; }
.legal p { margin: 8px 0; color: #f0c2c2; }
.legal a { color: var(--rose); border-bottom: 1px solid var(--rose-2); }
.legal .sub { margin-bottom: 12px; }
