:root {
  color-scheme: dark;
  --bg: #10131f;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f9ff;
  --muted: #aab2c5;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --danger: #ff5c7a;
  --ok: #4ade80;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 92, 255, 0.35), transparent 28rem),
    radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.24), transparent 24rem),
    linear-gradient(135deg, #0d1020, var(--bg));
}

button,
input,
select {
  font: inherit;
}

button,
.button {
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.15rem;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

button.secondary,
.button.secondary {
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

button.danger {
  background: linear-gradient(135deg, #ff3d62, #ff8a3d);
}

button.ghost,
.button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  text-decoration: none;
}

.brand strong {
  font-size: 1.12rem;
  letter-spacing: 0.05em;
}

.brand span,
.muted {
  color: var(--muted);
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.hero {
  min-height: 68vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.45rem, 7vw, 6.2rem);
  line-height: 0.96;
  margin: 0 0 1.2rem;
  letter-spacing: -0.08em;
}

.hero p {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
  margin: 0 0 1.6rem;
}

.hero-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
}

.hero-card {
  padding: 1.3rem;
}

.panel {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.demo-timer,
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.time-box {
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  padding: clamp(0.8rem, 2vw, 1.2rem);
  text-align: center;
}

.time-box strong {
  display: block;
  font-size: clamp(1.8rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.time-box span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field label {
  color: var(--muted);
  font-size: 0.95rem;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.86rem 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.checkbox-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.07);
}

.result-card {
  display: grid;
  gap: 1rem;
}

.share-link {
  word-break: break-all;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.24);
  color: #dbeafe;
  border: 1px solid var(--line);
}

.qr-box {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 1.4rem;
  background: white;
}

.qr-box canvas,
.qr-box img {
  max-width: 100%;
}

.list {
  display: grid;
  gap: 0.9rem;
}

.item-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.08);
}

.item-title {
  margin: 0 0 0.3rem;
  font-size: 1.18rem;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.countdown-page {
  min-height: 78vh;
  display: grid;
  place-items: center;
}

.countdown-card {
  width: min(980px, 100%);
  text-align: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.countdown-title {
  font-size: clamp(2.2rem, 7vw, 5.6rem);
  line-height: 1;
  margin: 0 0 1.5rem;
  letter-spacing: -0.06em;
}

.countdown-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.fullscreen {
  width: 100%;
  min-height: 100vh;
  padding: 2vw;
  display: grid;
  place-items: center;
  text-align: center;
}

.fullscreen .countdown-title {
  font-size: clamp(2rem, 7vw, 7rem);
  margin-bottom: 3vh;
}

.fullscreen .countdown-grid {
  width: min(1500px, 100%);
  gap: 1.2vw;
}

.fullscreen .time-box {
  border-radius: 2vw;
  padding: 2.2vw 1vw;
}

.fullscreen .time-box strong {
  font-size: clamp(4rem, 15vw, 17rem);
}

.fullscreen .time-box span {
  font-size: clamp(1rem, 2vw, 2rem);
}

.empty {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 1.4rem;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-0.25rem);
}

.theme-aurora {
  --bg: #10131f;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
}

.theme-sunset {
  --bg: #1f1014;
  --accent: #ff4d7d;
  --accent-2: #ffb84d;
}

.theme-forest {
  --bg: #0d1f1a;
  --accent: #20c997;
  --accent-2: #a3e635;
}

.theme-ocean {
  --bg: #0a1628;
  --accent: #2563eb;
  --accent-2: #38bdf8;
}

.theme-mono {
  --bg: #101010;
  --accent: #f8fafc;
  --accent-2: #94a3b8;
}

@media (max-width: 820px) {
  .topbar,
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-actions {
    justify-content: flex-start;
  }

  .checkbox-row,
  .demo-timer,
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .item-card {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 1rem;
  }

  .checkbox-row {
    grid-template-columns: 1fr;
  }
}
