:root {
  --bg: #0b1220;
  --surface: #121c2f;
  --card: #162237;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eefc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent2: #fbbf24;
  --ok: #34d399;
  --danger: #fb7185;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  font-family: "Noto Sans Thai", "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.14), transparent),
    radial-gradient(900px 500px at 90% 0%, rgba(251, 191, 36, 0.08), transparent), var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.wrap {
  width: min(1100px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.82);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.35);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__text strong {
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand__text small {
  color: var(--muted);
  font-weight: 500;
}

.trust-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.trust-strip span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.hero {
  padding: 36px 0 12px;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 0.85rem;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.hero__lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.promo-section {
  padding: 8px 0 10px;
}

.promo-shell {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(56, 189, 248, 0.08);
  overflow: hidden;
}

.promo-shell__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.22), rgba(251, 191, 36, 0.08), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.promo-flash-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626, #be185d);
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.promo-flash-icon {
  font-size: 1.1rem;
  animation: promo-flash-bolt 1.1s ease-in-out infinite;
}

@keyframes promo-flash-bolt {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.12);
    filter: brightness(1.35);
  }
}

.promo-flash-pulse {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(251, 191, 36, 0.55);
  animation: promo-ring 2s ease-out infinite;
  pointer-events: none;
}

@keyframes promo-ring {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

.promo-shell__tagline {
  flex: 1;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 12rem;
}

.promo-countdown {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.promo-countdown__label {
  font-size: 0.75rem;
  color: var(--muted);
}

.promo-countdown__digits {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #fde047;
  font-variant-numeric: tabular-nums;
}

.promo-carousel {
  position: relative;
  padding: 0 0 16px;
}

.promo-viewport {
  overflow: hidden;
  margin: 0 44px;
}

.promo-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.promo-slide {
  flex: 0 0 100%;
  position: relative;
  min-height: min(52vw, 280px);
  max-height: 320px;
}

.promo-slide__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.02);
}

.promo-slide__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.45) 42%, rgba(11, 18, 32, 0.25) 100%);
}

.promo-slide__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 22px 26px;
  gap: 10px;
}

.promo-slide__badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.95);
  color: #052e16;
}

.promo-slide__title {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 20ch;
}

.promo-slide__sub {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.88);
  max-width: 36ch;
}

.promo-slide__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-top: 4px;
}

.promo-slide__was {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.promo-slide__now {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  color: #fde047;
  text-shadow: 0 2px 16px rgba(250, 204, 21, 0.35);
}

.promo-slide__unit {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.95);
}

.promo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}

.promo-nav:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.45);
}

.promo-nav--prev {
  left: 8px;
}

.promo-nav--next {
  right: 8px;
}

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px 4px;
}

.promo-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.promo-dot[aria-selected="true"] {
  background: linear-gradient(90deg, #38bdf8, #fbbf24);
  transform: scale(1.25);
}

@media (max-width: 640px) {
  .promo-shell__bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .promo-viewport {
    margin: 0 36px;
  }

  .promo-slide {
    min-height: 240px;
  }

  .promo-nav {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-track {
    transition-duration: 0.01ms;
  }

  .promo-flash-icon,
  .promo-flash-pulse {
    animation: none;
  }
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 0 36px;
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 40%), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}

.card--accent {
  border-color: rgba(56, 189, 248, 0.35);
}

.step__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.step__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.step__num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.18);
  color: var(--accent2);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.step--pick-game .step__num {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
}

.step--pick-game .step__head h2 {
  color: #60a5fa;
}

.muted {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 14px;
}

.game-tile {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0;
  background: rgba(15, 23, 42, 0.65);
  cursor: pointer;
  text-align: center;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.game-tile__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.25));
  overflow: hidden;
}

.game-tile__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  padding: 4px 6px;
  color: #fff;
  background: linear-gradient(180deg, #dc2626, #b91c1c);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.game-banner--th {
  background: linear-gradient(180deg, #e11d48, #be123c);
}

.game-banner--global {
  background: linear-gradient(180deg, #dc2626, #991b1b);
}

.game-ribbon--hot {
  position: absolute;
  top: 10px;
  left: -28px;
  z-index: 4;
  width: 96px;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: #e11d48;
  padding: 4px 0;
  transform: rotate(-42deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.game-corner {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 4;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.game-tile--has-banner .game-corner {
  top: 26px;
}

.game-partner-pill {
  position: absolute;
  bottom: 5px;
  right: 5px;
  z-index: 4;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  background: rgba(220, 38, 38, 0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.game-tile__meta {
  padding: 8px 8px 10px;
}

.game-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
}

.game-tile.is-selected {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.65), 0 10px 26px rgba(0, 0, 0, 0.35);
}

.game-tile__name {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0;
  line-height: 1.35;
  color: #60a5fa;
}

.game-tile.is-selected .game-tile__name {
  color: #4ade80;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 0.88rem;
  color: var(--muted);
}

.field input {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.field input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 1px;
}

.pkg-empty {
  padding: 12px 0;
}

.pkg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pkg-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

.pkg-row__title {
  margin: 0;
  font-weight: 600;
}

.pkg-row__price {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.pkg-row__was {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  opacity: 0.75;
  margin-right: 6px;
}

.pkg-row__now {
  color: #fde047;
  font-weight: 700;
}

.pkg-row__sku {
  opacity: 0.85;
  font-weight: 500;
}

.pkg-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pkg-qty button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.pkg-qty span {
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pay-methods {
  display: grid;
  gap: 10px;
}

.pay-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.15);
}

.pay-opt:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.06);
}

.pay-opt input {
  margin-top: 4px;
}

.pay-opt strong {
  display: block;
}

.pay-opt small {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  border-radius: 11px;
  border: 1px solid var(--border);
  padding: 11px 18px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn--primary {
  border: none;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #04101f;
  box-shadow: 0 14px 28px rgba(56, 189, 248, 0.28);
}

.btn--ghost {
  background: transparent;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.summary {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.summary dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.summary dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.summary__total {
  border-bottom: none !important;
  padding-top: 4px;
}

.summary__total dd {
  font-size: 1.35rem;
  color: var(--accent2);
}

.match-msg {
  margin-top: 12px;
}

.footnote {
  padding: 8px 0 28px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.modal__card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: 0;
  box-shadow: var(--shadow);
}

.modal__message {
  margin: 0 0 20px;
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .pkg-row {
    grid-template-columns: 1fr;
  }
}
