/* Basal Pay – Single-screen Web Sunset & App Download Notice */
:root {
  --brand: #1033ff;
  --brand-hover: #0d2ae0;
  --brand-strong: #0a21a6;
  --brand-glow: rgba(16, 51, 255, 0.28);
  --brand-soft: #d6dfff;
  --tint: #edf1ff;
  --ink: #0b1533;
  --text-1: #0b1533;
  --text-2: #4a5568;
  --text-3: #667085;
  --line: #e4e8f0;
  --line-2: #ccd3e0;
  --paper: #ffffff;
  --surface: #f4f7fb;
  --badge: #110f0f;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-card: 0 24px 64px -16px rgba(16, 51, 255, 0.14), 0 8px 28px -6px rgba(11, 21, 51, 0.07);
  --shadow-float: 0 12px 28px rgba(16, 51, 255, 0.20);
  --font-display: "Inter Tight", "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--paper);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 100dvh Single-screen Viewport ---------- */
.viewport {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
  background:
    radial-gradient(760px 500px at 10% 14%, rgba(16, 51, 255, 0.18), transparent 65%),
    radial-gradient(680px 460px at 90% 84%, rgba(16, 51, 255, 0.16), transparent 65%),
    radial-gradient(520px 380px at 82% 16%, rgba(0, 166, 255, 0.11), transparent 60%),
    linear-gradient(180deg, #e6ecff 0%, #f2f5ff 48%, #f8faff 100%);
  isolation: isolate;
  overflow: hidden;
}

.viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(16, 51, 255, 0.068) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 51, 255, 0.068) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, #000 35%, transparent 100%);
}

/* ---------- Animated Background Decor ---------- */
.bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: 420px;
  height: 420px;
  left: -8%;
  top: -10%;
  background: radial-gradient(circle, rgba(16, 51, 255, 0.42) 0%, rgba(16, 51, 255, 0) 70%);
}

.orb-2 {
  width: 460px;
  height: 460px;
  right: -10%;
  bottom: -14%;
  background: radial-gradient(circle, rgba(16, 51, 255, 0.36) 0%, rgba(59, 99, 255, 0) 70%);
}

.orb-3 {
  width: 340px;
  height: 340px;
  right: 14%;
  top: 8%;
  background: radial-gradient(circle, rgba(0, 174, 255, 0.26) 0%, rgba(16, 51, 255, 0) 70%);
}

.bg-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.bg-rings i {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(16, 51, 255, 0.13);
}

.bg-rings i:nth-child(1) {
  width: min(560px, 88vw);
  height: min(560px, 88vw);
  border-color: rgba(16, 51, 255, 0.16);
  box-shadow: 0 0 80px rgba(16, 51, 255, 0.06) inset;
}

.bg-rings i:nth-child(2) {
  width: min(760px, 118vw);
  height: min(760px, 118vw);
  border-style: dashed;
  border-color: rgba(16, 51, 255, 0.14);
}

.bg-rings i:nth-child(2)::before,
.bg-rings i:nth-child(2)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(16, 51, 255, 0.16), 0 0 14px rgba(16, 51, 255, 0.55);
}

.bg-rings i:nth-child(2)::before {
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.bg-rings i:nth-child(2)::after {
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.bg-rings i:nth-child(3) {
  width: min(980px, 148vw);
  height: min(980px, 148vw);
  border-color: rgba(16, 51, 255, 0.08);
}

/* ---------- Top Bar ---------- */
.topbar {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.logo img {
  height: 32px;
  width: auto;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(16, 51, 255, 0.08);
}

.lang button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.04em;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.lang button:hover:not([aria-pressed="true"]) {
  color: var(--brand);
}

.lang button[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px var(--brand-glow);
}

/* ---------- Center Stage & Card ---------- */
.center-stage {
  display: grid;
  place-items: center;
  padding: 12px 0;
}

.notice-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 51, 255, 0.14);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  padding: 36px 32px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 20px;
}

@media (min-width: 640px) {
  .notice-card {
    padding: 44px 48px;
    gap: 22px;
  }
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--tint);
  color: var(--brand);
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.badge-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 51, 255, 0.18);
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  color: var(--ink);
}

.notice-body {
  margin: 0;
  color: var(--text-2);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  line-height: 1.65;
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- Store Buttons ---------- */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  border-radius: 12px;
  background: var(--badge);
  line-height: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.badge svg {
  width: 177px;
  height: 49px;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

/* Khi nhận diện iOS: chỉ hiện App Store, ẩn Google Play */
.notice-card.is-ios #badge-android {
  display: none;
}

/* Khi nhận diện Android: chỉ hiện Google Play, ẩn App Store */
.notice-card.is-android #badge-ios {
  display: none;
}

/* Trên thiết bị di động: phóng nhẹ nút Store duy nhất để dễ chạm hơn */
.notice-card.is-mobile .badge svg {
  width: 204px;
  height: 56px;
}

/* ---------- QR Section ---------- */
.qr-section {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: linear-gradient(135deg, #f3f6ff 0%, #ebf0ff 100%);
  border: 1px solid var(--brand-soft);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-top: 4px;
}

.qr-box {
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  border: 1px solid var(--brand-soft);
  border-radius: var(--r-md);
  padding: 9px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 51, 255, 0.08);
}

.qr-box svg {
  width: 100%;
  height: 100%;
  fill: var(--ink);
}

.qr-meta {
  display: grid;
  gap: 4px;
}

.qr-meta strong {
  color: var(--text-1);
  font-size: 14.5px;
  font-weight: 600;
}

.qr-meta span {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .qr-section {
    flex-direction: column;
    text-align: center;
  }
}

/* Ẩn mã QR khi mở trực tiếp bằng điện thoại */
.notice-card.is-mobile .qr-section {
  display: none;
}

/* ---------- Minimal Footer ---------- */
.footbar {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  font-size: 12.5px;
  color: var(--text-3);
  padding: 4px 0;
  text-align: center;
}

.footbar a {
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.footbar a:hover {
  color: var(--brand);
}

.footbar .sep {
  opacity: 0.5;
}

/* ---------- Entrance & Ambient Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.65s var(--ease) both;
  }
  @keyframes rise {
    from {
      opacity: 0.001;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .orb-1 {
    animation: orb-drift-1 14s ease-in-out infinite alternate;
  }
  .orb-2 {
    animation: orb-drift-2 17s ease-in-out infinite alternate;
  }
  .orb-3 {
    animation: orb-drift-3 12s ease-in-out infinite alternate;
  }

  @keyframes orb-drift-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(48px, 36px) scale(1.12); }
  }
  @keyframes orb-drift-2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-52px, -40px) scale(1.14); }
  }
  @keyframes orb-drift-3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-36px, 32px) scale(1.1); }
  }

  .bg-rings i:nth-child(2) {
    animation: ring-spin 48s linear infinite;
  }
  .bg-rings i:nth-child(1) {
    animation: ring-breathe 7s ease-in-out infinite alternate;
  }

  @keyframes ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  @keyframes ring-breathe {
    from { transform: scale(0.985); opacity: 0.75; }
    to { transform: scale(1.015); opacity: 1; }
  }

  .badge-chip .dot {
    animation: dot-pulse 2.4s ease-in-out infinite;
  }
  @keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(16, 51, 255, 0.16); }
    50% { box-shadow: 0 0 0 7px rgba(16, 51, 255, 0.28); }
  }
}
