/* zyyl998.cc UI Upgrade v2 — visual layer only; no business/API changes */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --bg: #070b16;
  --bg-card: #121a2c;
  --bg-card2: #182238;
  --bg-nav: rgba(10, 14, 28, 0.88);
  --bg-section: #0e1526;
  --accent: #2a6bff;
  --accent2: #5aa8ff;
  --accent3: #3d8bff;
  --green: #14d9a0;
  --gold: #f0b429;
  --red: #ff4d6a;
  --border: rgba(255, 255, 255, 0.1);
  --border2: rgba(255, 255, 255, 0.18);
  --text: #f7f9ff;
  --text2: rgba(247, 249, 255, 0.68);
  --text3: rgba(247, 249, 255, 0.42);
  --radius: 16px;
  --bnav-h: 66px;
  --bnav-margin: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --tg-top: calc(88px + var(--safe-top));
  --ui-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  --ui-glow: 0 8px 28px rgba(42, 107, 255, 0.35);
}

html,
body,
#root {
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(42, 107, 255, 0.2), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(20, 217, 160, 0.08), transparent 48%),
    linear-gradient(180deg, #0a1224 0%, var(--bg) 42%, #05070f 100%) !important;
  color: var(--text);
  font-family: "Sora", "Noto Sans SC", -apple-system, "PingFang SC", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  padding-bottom: calc(var(--safe-bottom) + 8px) !important;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Shell atmosphere */
.app-shell {
  background: transparent !important;
}

.app-shell:before {
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(42, 107, 255, 0.28), transparent 70%),
    radial-gradient(100% 34% at 50% 100%, rgba(20, 217, 160, 0.1), transparent 72%) !important;
}

.bg-stars:before,
.bg-stars:after {
  opacity: 0.85;
}

/* Header */
.app-header,
.app-header-sub {
  background: rgba(8, 12, 24, 0.82) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.hdr-logo-text {
  font-family: "Sora", Georgia, serif !important;
  letter-spacing: 0.04em !important;
  background: linear-gradient(120deg, #fff 20%, #8ec5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.hdr-balance-pill {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.hdr-btn-blue,
.btn-reg,
.btn-deposit,
.btn-full,
.btn-glass-primary,
.pf-big-btn,
.pf-login-big {
  background: linear-gradient(135deg, #2a6bff, #4f97ff) !important;
  box-shadow: var(--ui-glow) !important;
}

/* Bottom nav */
.bottom-nav-inner {
  background: rgba(10, 14, 28, 0.86) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), inset 0 1px rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(26px) saturate(1.45);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
}

.nav-active-bg {
  background: linear-gradient(135deg, rgba(42, 107, 255, 0.55), rgba(80, 160, 255, 0.35)) !important;
  border-color: rgba(90, 168, 255, 0.4) !important;
  box-shadow: 0 0 18px rgba(42, 107, 255, 0.35) !important;
}

.nav-item.active .nav-icon-inner {
  filter: drop-shadow(0 0 8px rgba(90, 168, 255, 0.85)) !important;
}

/* Home banners / cards / games */
.banner-track,
.banner-slide img,
.banner-placeholder {
  border-radius: 18px !important;
}

.ac-img-card,
.gc,
.hot-card,
.poster-card,
.pf-action-card,
.pf-menu-card,
.pf-vip-card,
.pf-invite-card {
  box-shadow: var(--ui-shadow) !important;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.gc,
.ac-img-card {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.gc:active,
.ac-img-card:active,
.hot-card:active,
.poster-card:active {
  transform: scale(0.96) !important;
}

.gc-name,
.hot-card-name,
.poster-name {
  letter-spacing: 0.01em;
}

.prov-item.active,
.pchip.active,
.btn-glass-chip.active,
.modal-tab.active {
  background: linear-gradient(135deg, #2a6bff, #4f97ff) !important;
  box-shadow: 0 4px 16px rgba(42, 107, 255, 0.4) !important;
}

.section-hdr-l {
  letter-spacing: 0.02em;
}

.notice-strip {
  background: rgba(42, 107, 255, 0.1) !important;
  border-bottom-color: rgba(42, 107, 255, 0.18) !important;
}

/* Forms / wallet / auth */
.inp,
.search-input-wrap,
.inp-wrap input {
  border-radius: 12px !important;
}

.inp:focus,
.search-input-wrap:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(42, 107, 255, 0.28);
}

.btn-glass-preset.active {
  border-color: var(--accent) !important;
  color: var(--accent2) !important;
  background: rgba(42, 107, 255, 0.22) !important;
  box-shadow: 0 0 14px rgba(42, 107, 255, 0.25) !important;
}

.modal-sheet {
  background: linear-gradient(180deg, #18233a 0%, #10182a 100%) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 -10px 48px rgba(0, 0, 0, 0.55) !important;
}

.modal-overlay {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Profile */
.pf-vip-card {
  background: linear-gradient(135deg, #2a6bff, #3d8bff 55%, #1aa884) !important;
  box-shadow: 0 10px 28px rgba(42, 107, 255, 0.4) !important;
}

.pf-invite-card {
  background: linear-gradient(135deg, #0f9a55, #1ed06a) !important;
}

.pf-menu-row:active,
.pf-grid-item:active {
  background: rgba(255, 255, 255, 0.1) !important;
}

.pf-topbar {
  padding-top: var(--tg-top) !important;
}

/* Buttons shared */
button,
[role="button"],
.nav-item,
.gc,
.ac-img-card,
.pf-menu-row,
.pf-grid-item {
  -webkit-tap-highlight-color: transparent;
}

button:active,
[role="button"]:active,
.btn-full:active,
.btn-glass-primary:active,
.hdr-btn-blue:active {
  transform: scale(0.98);
}

/* OkPay overlay CTA */
#okpay-open-cta {
  animation: uiRise 0.28s ease both;
}

#okpay-open-cta button[type="button"]:first-of-type {
  box-shadow: 0 12px 32px rgba(42, 171, 238, 0.38) !important;
}

/* Page enter */
#root > div,
.page-scroll > div,
.app-shell {
  animation: uiRise 0.3s ease both;
}

@keyframes uiRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes uiSoftPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(42, 107, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(42, 107, 255, 0);
  }
}

.hdr-btn-blue,
.btn-reg {
  animation: uiSoftPulse 2.8s ease-in-out infinite;
}

/* Toast / spinner polish */
.toast-item {
  border-radius: 24px !important;
  backdrop-filter: blur(18px);
}

.spinner {
  border-top-color: var(--accent2) !important;
}

/* Tables / dense lists */
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Desktop phone shell */
@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    background-attachment: fixed !important;
  }
  #root,
  .app-shell {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  #root {
    min-height: 100dvh;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px rgba(0, 0, 0, 0.55);
    background: rgba(7, 11, 22, 0.55);
  }
  .bottom-nav {
    max-width: 456px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #root > div,
  .app-shell,
  .hdr-btn-blue,
  .btn-reg,
  button,
  [role="button"] {
    animation: none !important;
    transition: none !important;
  }
}
