:root {
  color-scheme: dark;
  --bg: #06080f;
  --bg-elevated: rgba(12, 18, 32, 0.72);
  --text: #eef3ff;
  --muted: #8b9bb8;
  --line: rgba(120, 150, 255, 0.14);
  --tron-red: #ff0420;
  --tron-red-soft: #ff4d5e;
  --cyan: #22d3ee;
  --green: #34d399;
  --gold: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
}

.bg-glow-a {
  top: -120px;
  left: -80px;
  background: var(--tron-red);
}

.bg-glow-b {
  right: -120px;
  bottom: -80px;
  background: #2563eb;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  margin-bottom: 24px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 4, 32, 0.24), rgba(255, 4, 32, 0.05)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 77, 94, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 40px rgba(255, 4, 32, 0.18);
}

.logo span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--tron-red-soft);
  text-shadow: 0 0 24px rgba(255, 4, 32, 0.45);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 55%, #fda4af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.dot-cyan {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.dot-red {
  background: var(--tron-red);
  box-shadow: 0 0 10px var(--tron-red);
}

.card {
  position: relative;
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 77, 94, 0.35),
    rgba(34, 211, 238, 0.08) 45%,
    rgba(255, 255, 255, 0.05)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.card-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.card-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.notice-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(3, 7, 18, 0.72);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.92rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: rgba(139, 155, 184, 0.55);
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: rgba(255, 77, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 4, 32, 0.12);
  background: rgba(3, 7, 18, 0.92);
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--tron-red);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  position: relative;
  border: 0;
  border-radius: 12px;
  padding: 14px 22px;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--tron-red) 0%, #ff3350 55%, #ff6b6b 100%);
  box-shadow: 0 12px 30px rgba(255, 4, 32, 0.28);
  overflow: hidden;
}

.btn-primary .btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.22) 45%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: shine 4s ease-in-out infinite;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.btn-outline {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.24);
}

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.25);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat strong {
  font-family: var(--mono);
  font-size: 1.15rem;
  color: #f8fafc;
}

.bar {
  margin-top: 18px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tron-red), #fb7185, var(--cyan));
  box-shadow: 0 0 18px rgba(255, 4, 32, 0.45);
  transition: width 0.25s ease;
}

body.is-running .progress-card {
  border-color: rgba(255, 77, 94, 0.28);
}

body.is-running .pulse-icon {
  animation: pulse 1.4s ease-in-out infinite;
}

body.is-running #status-text {
  color: var(--tron-red-soft);
}

.result {
  border-color: rgba(52, 211, 153, 0.28);
}

.success-icon {
  color: var(--green);
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
}

.result-grid {
  display: grid;
  gap: 14px;
}

.result-item {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.result-item.highlight {
  border-color: rgba(255, 77, 94, 0.28);
  background: rgba(255, 4, 32, 0.06);
}

.result-item.secret {
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.05);
}

.result-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-item code,
.result-meta strong {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.6;
  word-break: break-all;
}

.result-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.footer {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: rgba(139, 155, 184, 0.75);
  font-size: 0.86rem;
}

.footer-brand {
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #f8fafc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-brand:hover {
  color: #00d4aa;
}

/* Hide Vercel preview toolbar injected on deployments */
vercel-live-feedback {
  display: none !important;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(6, 8, 15, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  color: #fff;
  background: rgba(255, 4, 32, 0.22);
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.inline-link {
  color: var(--cyan);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.hero-compact {
  margin-bottom: 8px;
}

.guide-section {
  scroll-margin-top: 80px;
}

.prose {
  color: var(--muted);
  line-height: 1.75;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  padding-left: 20px;
}

.prose h3 {
  margin: 18px 0 10px;
  color: var(--text);
  font-size: 1rem;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fde68a;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.steps li {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.steps strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.steps span {
  color: var(--muted);
  line-height: 1.6;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rule-item {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.rule-item h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text);
}

.rule-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.rule-item .hint {
  font-size: 0.88rem;
  color: rgba(139, 155, 184, 0.85);
}

.table-wrap {
  overflow-x: auto;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.guide-table th,
.guide-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.guide-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-table td {
  color: var(--text);
}

.guide-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.muted-note {
  margin-top: 14px;
  margin-bottom: 0 !important;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@keyframes shine {
  0%,
  70%,
  100% {
    transform: translateX(-120%);
  }
  85% {
    transform: translateX(120%);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 4, 32, 0);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 18px rgba(255, 4, 32, 0.25);
  }
}

@media (max-width: 760px) {
  .hero-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid,
  .stats,
  .result-meta,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-field {
    margin-top: 0;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }
}
