/* ===== Tũn JB — landing page ===== */

:root {
  --bg: #05070d;
  --panel: rgba(14, 21, 37, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --fg: #e8eefc;
  --dim: #8b98b4;
  --accent: #4f8cff;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 22px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1100px 620px at 12% -12%, rgba(79, 140, 255, 0.22), transparent 60%),
    radial-gradient(900px 520px at 112% 8%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(820px 620px at 50% 122%, rgba(139, 92, 246, 0.14), transparent 60%),
    linear-gradient(165deg, #05070d 0%, #080d18 52%, #05070d 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* subtle drifting glow */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(79, 140, 255, 0.14), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  0% {
    transform: translate3d(-6%, -4%, 0) scale(1);
  }
  100% {
    transform: translate3d(8%, 6%, 0) scale(1.15);
  }
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* ---------- brand ---------- */

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 22px;
}

.logo {
  width: 58px;
  height: 58px;
  margin-right: 14px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f8cff 0%, #22d3ee 100%);
  box-shadow: 0 14px 34px -10px rgba(79, 140, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  flex: 0 0 auto;
}

.logo svg {
  width: 30px;
  height: 30px;
  display: block;
}

.titles h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.titles h1 span {
  color: #5eead4;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .titles h1 span {
    background: linear-gradient(135deg, #8ab6ff 0%, #5eead4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.titles p {
  margin: 6px 0 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--dim);
}

/* ---------- panel ---------- */

.panel {
  position: relative;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 34px 80px -26px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 185, 255, 0.7), transparent);
}

/* ---------- meta chips ---------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 18px;
}

.chip {
  display: inline-block;
  margin: 3px;
  padding: 6px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.chip strong {
  color: var(--fg);
  font-weight: 800;
}

.chip.ok {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.06);
}

/* ---------- payload cards ---------- */

.pick {
  margin: 0;
}

.opts {
  display: flex;
  margin: 0 0 12px;
}

.opt {
  position: relative;
  flex: 1 1 0;
  cursor: pointer;
}

.opt + .opt {
  margin-left: 10px;
}

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.18s ease, background 0.18s ease,
    box-shadow 0.18s ease, transform 0.18s ease;
}

.opt input:checked + .card {
  border-color: rgba(79, 140, 255, 0.7);
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.18), rgba(79, 140, 255, 0.04));
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.25),
    0 16px 34px -16px rgba(79, 140, 255, 0.75);
}

.opt:active .card {
  transform: scale(0.985);
}

.card .ico {
  font-size: 15px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}

.card .name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.card .desc {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.opt input:checked + .card .desc {
  color: #a9c6ff;
}

/* ---------- autostart switch ---------- */

.auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.auto-row .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.auto-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 27px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.auto-row input:checked + .switch {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px -4px rgba(79, 140, 255, 0.8);
}

.auto-row input:checked + .switch::after {
  transform: translateX(21px);
}

/* ---------- start button ---------- */

.btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 15px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  box-shadow: 0 20px 44px -16px rgba(59, 130, 246, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

/* ---------- status lines ---------- */

.count {
  min-height: 17px;
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.count:not(:empty) {
  color: #9fd0ff;
}

.count.small {
  min-height: 0;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--dim);
  opacity: 0.85;
}

/* ---------- footer ---------- */

.byline {
  margin: 16px 0 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(139, 152, 180, 0.65);
}

/* ---------- responsive ---------- */

@media (max-width: 380px) {
  .titles h1 {
    font-size: 23px;
  }
  .logo {
    width: 50px;
    height: 50px;
  }
  .card {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
  * {
    transition: none !important;
  }
}
