:root {
  --bg: #050101;
  --bg-soft: #120304;
  --card: rgba(31, 8, 7, 0.74);
  --card-strong: rgba(54, 13, 9, 0.88);
  --border: rgba(255, 92, 38, 0.38);
  --border-hot: rgba(255, 122, 38, 0.9);
  --text: #fff1e8;
  --muted: #c99a8c;
  --accent: #ff3a1e;
  --accent-2: #ff8a26;
  --danger: #ff2d2d;
  --shadow: rgba(255, 55, 20, 0.34);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 48% -10%, rgba(255, 89, 21, 0.38), transparent 28%),
    radial-gradient(circle at 14% 12%, rgba(160, 12, 7, 0.45), transparent 34%),
    radial-gradient(circle at 86% 28%, rgba(255, 45, 18, 0.18), transparent 30%),
    linear-gradient(155deg, #020000 0%, #120203 48%, #050101 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 106, 28, 0.2), transparent 36%),
    radial-gradient(circle at 50% 62%, rgba(255, 49, 18, 0.09), transparent 36%),
    linear-gradient(180deg, rgba(96, 15, 8, 0.18), transparent 38%);
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.app-shell::before {
  left: -60px;
  right: -60px;
  bottom: 34px;
  height: 180px;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255, 81, 29, 0.32), transparent 30%),
    radial-gradient(ellipse at 80% 90%, rgba(120, 6, 5, 0.42), transparent 36%),
    linear-gradient(180deg, transparent, rgba(3, 0, 0, 0.86));
}

.app-shell::after {
  right: 18px;
  bottom: 96px;
  width: 150px;
  height: 86px;
  transform: rotate(-7deg);
  border: 1px solid rgba(255, 110, 69, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(145deg, rgba(40, 10, 8, 0.72), rgba(7, 1, 1, 0.84));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  opacity: 0.55;
}

.embers,
.embers::before,
.embers::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 92, 21, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 203, 133, 0.8) 0 1px, transparent 2px),
    radial-gradient(ellipse, rgba(255, 46, 16, 0.75) 0 2px, transparent 4px);
  background-size: 72px 96px, 118px 142px, 180px 220px;
  animation: embers 12s linear infinite;
  opacity: 0.34;
}

.embers::before,
.embers::after {
  content: "";
}

.embers::before {
  transform: rotate(17deg) scale(1.1);
  animation-duration: 18s;
  opacity: 0.2;
}

.embers::after {
  transform: rotate(-10deg) scale(1.25);
  animation-duration: 24s;
  opacity: 0.14;
}

@keyframes embers {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 -420px, 0 -620px, 0 -700px; }
}

.screen {
  position: relative;
  z-index: 1;
  display: none;
  min-height: calc(100dvh - 112px);
}

.screen-active {
  display: block;
  animation: rise 0.28s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  position: relative;
  min-height: 392px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 52% 45%, rgba(255, 94, 26, 0.82), transparent 28%),
    radial-gradient(circle at 58% 94%, rgba(255, 62, 24, 0.26), transparent 30%),
    linear-gradient(135deg, #2a0505 0%, #500906 45%, #080102 100%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    0 0 54px var(--shadow),
    inset 0 0 0 1px rgba(255, 210, 170, 0.04);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  opacity: 0.98;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  filter: saturate(1.16) contrast(1.12);
  transform: scale(1.01);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 1, 1, 0.04), rgba(5, 1, 1, 0.14) 34%, rgba(5, 1, 1, 0.9) 100%),
    radial-gradient(circle at 50% 72%, transparent 0 20%, rgba(0, 0, 0, 0.4) 62%),
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 42%, rgba(0,0,0,.22));
}

.hero-couple::before {
  background-image: url("./assets/hero-couple.png"), url("./assets/couple.svg");
}

body[data-user="fox"] .hero-partner::before {
  background-image: url("./assets/hero-devil.png"), url("./assets/devil.svg");
}

body[data-user="devil"] .hero-partner::before {
  background-image: url("./assets/hero-fox.png"), url("./assets/fox.svg");
}

.topbar,
.hero-copy,
.page-head {
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 107, 28, 0.56);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.035em;
  text-shadow: 0 0 30px rgba(255, 75, 30, 0.48), 0 3px 20px rgba(0,0,0,.65);
}

h1 {
  font-size: 35px;
}

h2 {
  font-size: 32px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(13, 3, 3, 0.68);
  color: var(--text);
  box-shadow: inset 0 0 18px rgba(255, 80, 35, 0.18), 0 0 26px rgba(255, 58, 25, 0.18);
}

.hero-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.quote {
  display: inline-block;
  max-width: 88%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 154, 109, 0.38);
  border-radius: 18px;
  background: rgba(20, 4, 4, 0.62);
  color: #ffe1d3;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 0 24px rgba(255, 55, 25, 0.24), inset 0 0 18px rgba(255, 91, 42, 0.08);
  backdrop-filter: blur(12px);
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.small-line {
  margin-top: 8px;
  font-size: 12px;
}

.glass-card,
.menu-card,
.status-card,
.wide-card {
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at 88% 16%, rgba(255, 87, 28, 0.16), transparent 34%),
    var(--card);
  box-shadow:
    inset 0 0 0 1px rgba(255, 190, 140, 0.055),
    0 18px 48px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(255, 52, 22, 0.08);
  backdrop-filter: blur(18px);
}

.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
  padding: 16px;
  border-radius: var(--radius-lg);
}

.balance-card strong {
  display: block;
  margin-top: 3px;
  font-size: 23px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 120, 54, 0.44);
  border-radius: 999px;
  background: rgba(255, 67, 30, 0.13);
  color: #ffd6c4;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(255, 61, 28, 0.16);
}

.pill.danger {
  border-color: rgba(255, 52, 52, 0.75);
  background: rgba(255, 42, 42, 0.22);
}

.grid-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.menu-card,
.status-card {
  min-height: 118px;
  padding: 15px;
  border-radius: var(--radius-lg);
  text-align: left;
}

.menu-card strong,
.status-card strong,
.wide-card strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.menu-card small,
.status-card small,
.wide-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.menu-icon,
.status-card span {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 79, 29, 0.28), rgba(90, 12, 8, 0.42));
  box-shadow: 0 0 28px rgba(255, 63, 26, 0.3);
  font-size: 21px;
}

.glow,
.selected {
  border-color: var(--border-hot);
  box-shadow:
    0 0 38px rgba(255, 60, 30, 0.32),
    inset 0 0 28px rgba(255, 70, 32, 0.12);
}

.footer-line {
  margin: 20px 10px 0;
  color: #e9b0a0;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.hero-partner {
  min-height: 345px;
}

.hero-partner .quote {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 20px;
  max-width: 210px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.comment-card,
.song-card,
.request-card,
.empty-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
}

.comment-input {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 120, 54, 0.28);
  border-radius: 16px;
  background: rgba(8, 2, 2, 0.58);
  color: var(--text);
  resize: vertical;
}

.primary-button,
.secondary-button,
.actions-row button {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ff6f35, #d91e12 72%, #83100b);
  color: #fff8f2;
  font-weight: 900;
  box-shadow: 0 0 38px rgba(255, 62, 26, 0.4), inset 0 1px 0 rgba(255,255,255,.16);
}

.secondary-button,
.actions-row button:last-child {
  background: rgba(28, 8, 7, 0.88);
  border: 1px solid var(--border);
  box-shadow: none;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 205px;
  margin-bottom: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), 0 0 42px rgba(255, 52, 22, .18);
}

body[data-user="fox"] .partner-head {
  background:
    linear-gradient(90deg, rgba(6, 1, 1, 0.82), rgba(6, 1, 1, 0.14)),
    radial-gradient(circle at 74% 50%, rgba(255, 78, 24, 0.5), transparent 28%),
    url("./assets/hero-devil.png") right bottom / 62% auto no-repeat,
    url("./assets/devil.svg") right bottom / 58% auto no-repeat,
    linear-gradient(135deg, #270606, #050101);
}

body[data-user="devil"] .page-head,
body[data-user="devil"] .partner-head {
  background:
    linear-gradient(90deg, rgba(6, 1, 1, 0.82), rgba(6, 1, 1, 0.14)),
    radial-gradient(circle at 74% 50%, rgba(255, 78, 24, 0.5), transparent 28%),
    url("./assets/hero-fox.png") right bottom / 62% auto no-repeat,
    url("./assets/fox.svg") right bottom / 58% auto no-repeat,
    linear-gradient(135deg, #270606, #050101);
}

.card-row,
.actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-row {
  justify-content: space-between;
  margin-bottom: 14px;
}

.actions-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.actions-row button {
  flex: 1;
}

.request-card.hot {
  border-color: var(--border-hot);
}

.list-cards {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.wide-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 15px;
  border-radius: var(--radius-lg);
  text-align: left;
}

.wide-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(255, 61, 29, 0.16);
  color: #ffb49d;
  font-size: 21px;
}

.song-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
}

.album-art {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border: 1px solid var(--border-hot);
  border-radius: 20px;
  background:
    radial-gradient(circle, rgba(255, 135, 45, 0.34), transparent 54%),
    linear-gradient(135deg, #59110c, #120303);
  box-shadow: 0 0 28px rgba(255, 68, 24, 0.28);
  font-size: 30px;
}

.album-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: #ffd2bd;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  padding: 5px;
  border: 1px solid rgba(255, 91, 42, 0.26);
  border-radius: 999px;
  background: rgba(12, 3, 3, 0.72);
}

.tabs button {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tabs button.active {
  color: #fff2e9;
  background: linear-gradient(180deg, rgba(255, 91, 42, 0.42), rgba(125, 16, 10, 0.8));
  box-shadow: 0 0 22px rgba(255, 62, 26, 0.28);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sticker-grid div {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 52% 35%, rgba(255, 82, 27, 0.28), transparent 46%),
    linear-gradient(145deg, rgba(45, 10, 8, 0.88), rgba(7, 1, 1, 0.92));
  box-shadow: inset 0 0 20px rgba(255, 65, 25, 0.08), 0 12px 26px rgba(0,0,0,.28);
  color: #ffb6a0;
  font-size: 28px;
}

.bottom-nav {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: min(calc(100% - 28px), 402px);
  padding: 9px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 91, 42, 0.25);
  border-radius: 26px;
  background: rgba(9, 2, 2, 0.82);
  box-shadow: 0 22px 70px rgba(0,0,0,.72), 0 0 28px rgba(255, 40, 15, 0.14);
  backdrop-filter: blur(24px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 48px;
  border-radius: 18px;
  background: transparent;
  color: #a8796e;
  font-size: 18px;
}

.bottom-nav button span {
  font-size: 10px;
  font-weight: 800;
}

.bottom-nav .nav-active {
  color: #fff0e8;
  background: linear-gradient(180deg, rgba(255, 86, 34, 0.3), rgba(100, 12, 8, 0.48));
  box-shadow: inset 0 0 22px rgba(255, 65, 25, 0.14);
}

@media (max-width: 360px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 31px;
  }

  .grid-menu,
  .status-grid {
    gap: 10px;
  }

  .menu-card,
  .status-card {
    min-height: 108px;
    padding: 13px;
  }
}
