﻿:root {
  --bg: #050607;
  --muted: #b1a58a;
  --text: #f7f0dc;
  --accent: #cda349;
  --accent2: #f6d47a;
  --border: #3b3122;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
}

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

html,
body {
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(205, 163, 73, 0.16), transparent 65%),
    radial-gradient(900px 600px at 110% -10%, rgba(246, 212, 122, 0.14), transparent 60%),
    #050607;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC",
    "Noto Sans TC", Arial, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER */
header {
  padding: 18px 0 10px;
  text-align: center;
}

header img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
}

header h1 {
  font-size: 22px;
  margin: 0;
  color: #fdf6e3;
  letter-spacing: 0.4px;
}

.header-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* LAYOUT */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container {
  width: min(1080px, 96vw);
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: radial-gradient(
      circle at 0 0,
      rgba(246, 212, 122, 0.12),
      transparent 50%
    ),
    radial-gradient(
      circle at 100% 0,
      rgba(205, 163, 73, 0.08),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(10, 9, 6, 0.96), rgba(8, 7, 5, 0.96));
  border: 1px solid rgba(109, 93, 62, 0.65);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card.card--inline {
  box-shadow: none;
  border-radius: 14px;
}

/* TYPOGRAPHY */
h2 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.sub {
  margin: 0 0 14px;
  color: var(--muted);
}

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

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.note-small {
  font-size: 12px;
}

/* FORM & BUTTONS */
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

input#ticker {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #080707;
  color: #fdf6e3;
  font-size: 16px;
}

input#ticker::placeholder {
  color: rgba(177, 165, 138, 0.9);
}

input#ticker:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(205, 163, 73, 0.5);
}

.btn {
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.06s, filter 0.2s, box-shadow 0.2s;
  font-size: 14px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: radial-gradient(circle at 0 0, #f6d47a, #cda349);
  color: #20160a;
  box-shadow: 0 8px 22px rgba(255, 215, 128, 0.45);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: #14100b;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  filter: brightness(1.05);
}

.btn-close {
  font-size: 13px;
  padding-inline: 14px;
}

.btn-wa {
  background: linear-gradient(135deg, #f6d47a, #cda349);
  color: #20160a;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 10px 26px rgba(255, 215, 128, 0.5);
  margin-top: 8px;
}

.btn-wa:hover {
  filter: brightness(1.04);
}

.btn-wa-disabled {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

.btn-link {
  background: transparent;
  border: none;
  color: #f6d47a;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

/* PROGRESS BAR */
.progress {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed rgba(109, 93, 62, 0.75);
  border-radius: 14px;
  background: rgba(9, 7, 4, 0.9);
}

.progress[aria-hidden="false"] {
  display: block;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #0b0907;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f6d47a, #cda349);
  background-size: 200% 100%;
  animation: slide 1.2s linear infinite;
}

@keyframes slide {
  0% {
    background-position: 0;
  }
  100% {
    background-position: -200%;
  }
}

.steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.steps li {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.steps li.active {
  background: rgba(205, 163, 73, 0.16);
  color: #fdecc0;
  border-color: rgba(246, 212, 122, 0.65);
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  padding: 16px;
  z-index: 100;
}

.modal[aria-hidden="false"] {
  display: grid;
}

.dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  background: radial-gradient(
      circle at 0 0,
      rgba(246, 212, 122, 0.14),
      transparent 50%
    ),
    linear-gradient(180deg, #0c0906, #050404);
  border: 1px solid rgba(109, 93, 62, 0.85);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(109, 93, 62, 0.65);
}

.dialog__timer {
  padding: 8px 16px 0;
}

.dialog__body {
  padding: 8px 16px 12px;
  overflow: auto;
}

.dialog__foot {
  position: sticky;
  bottom: 0;
  padding: 10px 16px 14px;
  background: linear-gradient(180deg, rgba(5, 4, 3, 0.96), rgba(10, 8, 6, 0.98));
  border-top: 1px solid rgba(109, 93, 62, 0.8);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* COUNTDOWN */
.countdown {
  text-align: center;
  font-size: 14px;
  color: var(--accent2);
  margin-bottom: 4px;
}

.countdown span {
  font-weight: 700;
  font-size: 16px;
}

.countdown-ended {
  color: #ffb4b4;
}

/* DETAILS */
details {
  border: 1px solid rgba(109, 93, 62, 0.7);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(11, 9, 6, 0.96);
  margin: 12px 0;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
  list-style: none;
  background: linear-gradient(90deg, rgba(8, 7, 5, 0.95), rgba(24, 19, 12, 0.96));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(205, 163, 73, 0.65);
  position: relative;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "▼";
  font-weight: 700;
  font-size: 16px;
  color: var(--accent2);
}

details[open] summary::after {
  content: "▲";
}

details ul {
  margin: 0;
  padding: 10px 16px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

details ul li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(109, 93, 62, 0.6);
  padding: 4px 0;
}

/* BULLETS */
.bullets {
  margin: 0;
  padding-left: 18px;
}

.bullets li {
  margin: 4px 0;
  color: var(--muted);
}

/* CLAIM TICKER */
.claim-ticker {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(109, 93, 62, 0.7);
  background: radial-gradient(circle at 0 0, rgba(246, 212, 122, 0.18), transparent 55%);
  overflow: hidden;
  padding: 4px 0;
  margin-bottom: 6px;
}

.claim-ticker__track {
  display: inline-flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 26s linear infinite;
  padding-left: 16px;
}

.claim-ticker__track span {
  font-size: 12px;
  color: var(--muted);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ACCESSIBILITY */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* FOOTER */
.site-footer {
  background: #050405;
  border-top: 1px solid rgba(109, 93, 62, 0.7);
  padding: 18px 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.site-footer .footer-links {
  margin-bottom: 8px;
}

.site-footer .footer-links a {
  margin: 0 8px;
  color: #f6d47a;
  text-decoration: none;
  font-weight: 600;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(9, 7, 4, 0.96);
  color: var(--text);
  padding: 10px 14px;
  display: flex;
  justify-content: center;
  font-size: 13px;
  border-top: 1px solid rgba(109, 93, 62, 0.75);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.85);
  z-index: 200;
}

.cookie-content {
  width: min(960px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-actions {
  display: flex;
  gap: 8px;
}

.cookie-banner button {
  font-size: 13px;
  padding: 8px 14px;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  header h1 {
    font-size: 18px;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .dialog {
    max-height: calc(100vh - 16px);
  }

  details ul {
    grid-template-columns: 1fr;
  }

  .dialog__body details summary {
    font-size: 15px;
    padding: 12px 14px;
  }

  .btn-wa {
    font-size: 15px;
    padding: 12px 14px;
  }

  .container {
    width: 98vw;
    padding-left: 10px;
    padding-right: 10px;
  }

  .cookie-banner {
    align-items: flex-start;
  }

  .cookie-content {
    align-items: flex-start;
  }
}
