:root {
  color-scheme: dark;
  --bg: #05060d;
  --panel: #0b1020;
  --panel-2: #101735;
  --line: rgba(166, 95, 255, 0.35);
  --purple: #9b39ff;
  --purple-2: #5e1bd3;
  --gold: #ffbf35;
  --blue: #20b7ff;
  --green: #38d66b;
  --red: #ff486a;
  --text: #f8f7ff;
  --muted: #a8a5bd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(130, 42, 255, 0.28), transparent 34rem),
    linear-gradient(180deg, #060711 0%, #03040a 100%);
  color: var(--text);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 120px;
  background: rgba(3, 4, 10, 0.72);
}

.topbar,
.wallet-row,
.bottom-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar {
  justify-content: space-between;
}

.brand {
  direction: ltr;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  color: var(--purple);
  margin-left: 5px;
}

.icon-btn,
.vip-btn,
.wallet-card,
.quick-actions button,
.bottom-nav,
.content-panel,
.hero-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 23, 52, 0.92), rgba(7, 10, 24, 0.94));
  box-shadow: 0 0 22px rgba(126, 39, 255, 0.18);
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  position: relative;
}

.bell b {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--red);
  font-size: 11px;
  line-height: 18px;
}

.vip-btn {
  min-width: 84px;
  height: 46px;
  border-radius: 14px;
  color: var(--gold);
  font-weight: 800;
}

.wallet-row {
  margin-top: 16px;
}

.wallet-card {
  flex: 1;
  min-height: 64px;
  border-radius: 16px;
  padding: 10px 14px;
}

.wallet-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.wallet-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.diamond strong {
  color: var(--blue);
}

.coin strong {
  color: var(--gold);
}

.stories {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 0 8px;
  scrollbar-width: none;
}

.story {
  height: 92px;
  border: 1px solid rgba(155, 57, 255, 0.55);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: end;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 22%, rgba(155, 57, 255, 0.65), transparent 38px),
    #080b18;
}

.live::before,
.vip-story::before {
  content: "●";
  color: var(--red);
  margin-left: 5px;
}

.hero-card {
  min-height: 182px;
  border-radius: 20px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 12px;
  align-items: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 191, 53, 0.18), transparent 8rem),
    radial-gradient(circle at 85% 65%, rgba(155, 57, 255, 0.42), transparent 9rem),
    linear-gradient(180deg, rgba(16, 23, 53, 0.96), rgba(5, 7, 17, 0.96));
}

.eyebrow {
  color: var(--gold);
  margin: 0 0 8px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

h1 span {
  color: var(--purple);
  display: block;
}

.muted {
  color: var(--muted);
}

.prediction {
  border: 1px solid rgba(32, 183, 255, 0.45);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  background: rgba(4, 9, 22, 0.72);
}

.prediction strong {
  display: block;
  font-size: 34px;
  color: var(--green);
}

.prediction small {
  color: var(--muted);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.quick-actions button {
  min-height: 48px;
  border-radius: 14px;
}

.content-panel {
  border-radius: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.grid-2,
.grid-3,
.feature-grid,
.store-grid,
.admin-actions {
  display: grid;
  gap: 10px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.metric,
.feature,
.store-card,
.profile-room,
.price-card,
.video-card,
.vip-hero,
.banner {
  border: 1px solid rgba(155, 57, 255, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.page-hero {
  min-height: 150px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  background:
    radial-gradient(circle at 20% 25%, rgba(32, 183, 255, 0.18), transparent 7rem),
    radial-gradient(circle at 88% 70%, rgba(155, 57, 255, 0.38), transparent 10rem),
    linear-gradient(180deg, rgba(16, 23, 53, 0.96), rgba(5, 7, 17, 0.96));
  box-shadow: 0 0 22px rgba(126, 39, 255, 0.18);
}

.page-hero span {
  color: var(--gold);
  font-weight: 800;
}

.page-hero h1 {
  margin: 6px 0;
  font-size: 32px;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
}

.back-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(155, 57, 255, 0.4);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 30px;
  line-height: 1;
}

.metric span,
.metric small,
.feature span,
.store-card small {
  color: var(--muted);
  display: block;
}

.metric strong {
  display: block;
  margin: 6px 0;
  font-size: 22px;
  color: var(--gold);
}

.banner {
  margin: 12px 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(32, 183, 255, 0.22), transparent 6rem),
    radial-gradient(circle at 82% 65%, rgba(155, 57, 255, 0.32), transparent 9rem),
    rgba(255, 255, 255, 0.035);
}

.banner h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.gold-banner {
  border-color: rgba(255, 191, 53, 0.36);
}

.cup-banner {
  border-color: rgba(255, 191, 53, 0.42);
}

.section-title {
  margin: 0 0 12px;
  font-size: 20px;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.item.done {
  border-color: rgba(56, 214, 107, 0.35);
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(155, 57, 255, 0.22);
  color: #dcc5ff;
  font-size: 12px;
}

.primary {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #b83dff, #621fd8);
  font-weight: 800;
  box-shadow: 0 0 26px rgba(155, 57, 255, 0.45);
}

.primary.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  box-shadow: none;
}

.option {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  border: 1px solid rgba(155, 57, 255, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: right;
  padding: 0 16px;
}

.option.correct {
  border-color: var(--green);
  background: rgba(56, 214, 107, 0.16);
}

.chips {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.chips button,
.admin-actions button,
.buy-btn {
  border: 1px solid rgba(155, 57, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 10px 14px;
}

.chips button.selected,
.admin-actions button:hover,
.buy-btn:hover {
  background: linear-gradient(180deg, rgba(155, 57, 255, 0.75), rgba(82, 25, 184, 0.75));
}

.match-line {
  display: grid;
  grid-template-columns: 1fr 78px 1fr;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-top: 12px;
}

.match-line span {
  color: var(--purple);
  font-weight: 900;
}

.match-line b {
  display: block;
  font-size: 20px;
}

.prediction-bars {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 76px 1fr 48px;
  align-items: center;
  gap: 8px;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar .green {
  background: var(--green);
}

.bar .gold {
  background: var(--gold);
}

.bar .red {
  background: var(--red);
}

.timer {
  color: var(--red);
  font-size: 24px;
}

.store-grid,
.feature-grid {
  grid-template-columns: repeat(2, 1fr);
}

.store-card {
  text-align: center;
}

.store-card strong {
  display: block;
  margin: 6px 0 10px;
}

.store-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(155, 57, 255, 0.55), rgba(14, 18, 39, 0.8));
  font-size: 28px;
}

.buy-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  color: var(--gold);
  font-weight: 700;
}

.rank-row {
  grid-template-columns: 34px 1fr auto 34px;
  display: grid;
  align-items: center;
  gap: 8px;
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--gold);
  color: #1b1200;
  font-weight: 900;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.news-item strong {
  display: block;
  margin: 10px 0 4px;
}

.video-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  margin-bottom: 12px;
  background:
    linear-gradient(180deg, rgba(4, 5, 12, 0.2), rgba(4, 5, 12, 0.88)),
    radial-gradient(circle at 50% 25%, rgba(155, 57, 255, 0.45), transparent 7rem);
}

.vip-hero {
  min-height: 190px;
  text-align: center;
  display: grid;
  place-content: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 191, 53, 0.34), transparent 7rem),
    radial-gradient(circle at 50% 70%, rgba(155, 57, 255, 0.32), transparent 9rem);
}

.vip-hero h2 {
  margin: 0;
  font-size: 38px;
  color: var(--gold);
}

.feature strong {
  display: block;
  margin-bottom: 5px;
}

.price-card {
  margin-top: 12px;
  text-align: center;
}

.price-card strong {
  display: block;
  font-size: 36px;
  color: var(--gold);
}

.notification {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
}

.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  background: radial-gradient(circle, rgba(155, 57, 255, 0.42), rgba(10, 13, 28, 0.9));
  font-weight: 900;
}

.admin-actions {
  grid-template-columns: repeat(2, 1fr);
  margin: 12px 0;
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 12px;
  transform: translateX(50%);
  width: min(calc(100% - 24px), 456px);
  height: 66px;
  border-radius: 20px;
  padding: 8px;
  justify-content: space-between;
}

.bottom-nav button {
  flex: 1;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.bottom-nav button.active {
  background: linear-gradient(180deg, rgba(155, 57, 255, 0.8), rgba(74, 26, 160, 0.8));
  color: white;
}

@media (max-width: 380px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .quick-actions,
  .grid-3,
  .store-grid,
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


.toast {
  position: fixed;
  right: 50%;
  bottom: 92px;
  z-index: 50;
  transform: translate(50%, 18px);
  min-width: min(320px, calc(100vw - 32px));
  border: 1px solid rgba(255, 191, 53, 0.42);
  border-radius: 14px;
  padding: 13px 16px;
  background: linear-gradient(180deg, rgba(24, 18, 42, 0.96), rgba(8, 9, 18, 0.98));
  box-shadow: 0 0 26px rgba(155, 57, 255, 0.32);
  color: var(--text);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

@media (display-mode: standalone) {
  .app-shell {
    padding-top: max(18px, env(safe-area-inset-top));
  }
}

.auth-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid rgba(155, 57, 255, 0.32);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-card input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(155, 57, 255, 0.35);
  border-radius: 12px;
  background: rgba(4, 7, 18, 0.88);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
}

.auth-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
  border: 1px solid rgba(155, 57, 255, 0.28);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.pill-btn {
  border: 1px solid rgba(255, 191, 53, 0.42);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 191, 53, 0.1);
  color: var(--gold);
}

.admin-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid rgba(155, 57, 255, 0.32);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-panel h2 {
  margin: 0;
  font-size: 18px;
}

.admin-panel input,
.admin-panel textarea,
.admin-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(155, 57, 255, 0.35);
  border-radius: 12px;
  background: rgba(4, 7, 18, 0.88);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.admin-panel textarea {
  min-height: 86px;
  resize: vertical;
}
