:root {
  --bg: #1a0303;
  --red: #7a0d0d;
  --gold: #ffc21a;
  --gold-2: #ff8a00;
  --cream: #ffe9b8;
  --line: rgba(255, 194, 26, .35);
  --zalo: #0a7cff;
  --zalo-2: #0052d6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--cream);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.45;
  padding-bottom: 84px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(26, 3, 3, .45) 0%, rgba(26, 3, 3, .3) 45%, rgba(26, 3, 3, .7) 100%),
    url("img/bg.webp") center bottom / cover no-repeat;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }

.petals { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.petal {
  position: absolute;
  top: -40px;
  background: center / contain no-repeat;
  opacity: .85;
  animation: fall linear infinite;
  will-change: transform;
}
.petal--pink { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cg fill='%23ff6fa5'%3E%3Cellipse rx='3.200' ry='6' cy='-6'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(72)'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(144)'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(216)'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='2.200' fill='%23ffe08a'/%3E%3C/svg%3E"); }
.petal--gold { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cg fill='%23ffc21a'%3E%3Cellipse rx='3.200' ry='6' cy='-6'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(72)'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(144)'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(216)'/%3E%3Cellipse rx='3.200' ry='6' cy='-6' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='2.200' fill='%23c2410c'/%3E%3C/svg%3E"); }

@keyframes fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 40px), 110vh, 0) rotate(540deg); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(40, 4, 4, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.topbar__nav { display: flex; align-items: center; gap: 14px; }
.topbar__link { font-weight: 600; font-size: 14px; opacity: .9; }
.topbar__link:hover { color: var(--gold); }

.logo, .brand {
  font-weight: 900;
  letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff3a8 0%, var(--gold) 45%, var(--gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo { display: block; }
.logo img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }

.hero { text-align: center; padding-top: 18px; padding-bottom: 22px; }

.badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(0, 0, 0, .25);
}

.brand {
  font-size: clamp(40px, 12vw, 104px);
  line-height: 1.05;
  margin-top: 6px;
  filter: drop-shadow(0 0 22px rgba(255, 150, 0, .55));
}

h1 { font-size: clamp(19px, 5.200vw, 34px); line-height: 1.25; color: #fff; margin-top: 6px; }

.sub { font-size: 14px; font-style: italic; color: #f3c98a; margin-top: 4px; }

.cta { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid #bfe0ff;
  background: linear-gradient(180deg, #37a0ff 0%, var(--zalo) 45%, var(--zalo-2) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .02em;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  box-shadow: 0 6px 0 #003a99, 0 10px 28px rgba(10, 124, 255, .55);
  animation: pulse 1.600s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.join-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #003a99; animation: none; }
.join-btn--hero { min-height: 64px; font-size: clamp(16px, 4.600vw, 22px); }
.join-btn--sm {
  width: auto;
  min-height: 36px;
  padding: 6px 16px;
  font-size: 13px;
  box-shadow: 0 3px 0 #003a99;
  animation: none;
}

@keyframes pulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 6px 0 #003a99, 0 10px 28px rgba(10, 124, 255, .55), 0 0 0 0 rgba(120, 190, 255, .7); }
  50% { transform: translateY(-3px) scale(1.030); box-shadow: 0 9px 0 #003a99, 0 14px 34px rgba(10, 124, 255, .7), 0 0 0 14px rgba(120, 190, 255, 0); }
}

.hint { font-size: 13px; color: #fff; background: rgba(0, 0, 0, .4); padding: 8px 12px; border-radius: 10px; max-width: 440px; }

.qr {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line);
  text-align: left;
}
html.is-desktop .qr { display: flex; }
#qr-code { width: 148px; height: 148px; border-radius: 10px; background: #fff; overflow: hidden; flex: 0 0 auto; }
#qr-code svg { display: block; width: 100%; height: 100%; }
@media (max-width: 1023px) {
  .qr { display: none !important; }
}
.qr p { font-size: 14px; max-width: 150px; font-weight: 600; }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.feat {
  padding: 14px 10px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(110, 16, 12, .9), rgba(40, 4, 4, .9));
  border: 1px solid var(--line);
}
.feat i { display: block; font-style: normal; font-size: 26px; }
.feat b { display: block; color: var(--gold); font-size: 15px; margin-top: 4px; }
.feat span { font-size: 12px; opacity: .85; }

.footer {
  margin-top: 40px;
  padding-top: 26px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line);
  text-shadow: 0 1px 4px #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  font-size: 13px;
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(20, 2, 2, .95) 35%);
  display: flex;
  justify-content: center;
}
.sticky-cta .join-btn { min-height: 52px; }

@media (max-width: 767px) {
  .topbar .join-btn { display: none; }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .topbar__in { height: 64px; }
  .logo img { width: 58px; height: 58px; }
  .hero { padding-top: 34px; padding-bottom: 34px; }
  .badge { font-size: 13px; padding: 6px 20px; }
  .sub { font-size: 17px; }
  .cta { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 24px; }
  .hint { flex-basis: 100%; margin: 0 auto; }
  .join-btn--hero { min-height: 76px; width: auto; max-width: none; padding: 14px 44px; white-space: nowrap; }
  .features { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .join-btn, .petal { animation: none; }
  .petals { display: none; }
  html { scroll-behavior: auto; }
}
