:root {
  --bg: #0b0a12;
  --bg-soft: #14121f;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #f4f1f8;
  --muted: #a49fb5;
  --pink: #ff6fa8;
  --pink-soft: #ffa8c8;
  --violet: #9b7bff;
  --green: #43d69b;
  --amber: #ffc861;
  --red: #ff7a7a;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgba(255, 111, 168, 0.20), transparent 60%),
    radial-gradient(50rem 35rem at 90% 0%, rgba(155, 123, 255, 0.18), transparent 60%),
    radial-gradient(40rem 30rem at 50% 110%, rgba(255, 111, 168, 0.10), transparent 60%);
}

a { color: var(--pink-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
}

.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; letter-spacing: 0.2px; }
.brand-text small { color: var(--muted); font-size: 0.78rem; }

.bot-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.88rem;
}

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-online { background: var(--green); box-shadow: 0 0 0 4px rgba(67, 214, 155, 0.16); animation: pulse 2.4s infinite; }
.dot-offline { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.14); }
.dot-wait { background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 200, 97, 0.14); }
.dot-unknown { background: var(--muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Layout */
.container {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 3rem;
  display: grid;
  gap: 1.5rem;
}

.hero { text-align: center; padding: clamp(1rem, 3vw, 2rem) 0 0.5rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--pink-soft);
  margin: 0 0 0.6rem;
}
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 5.5vw, 3rem);
  line-height: 1.15;
  background: linear-gradient(100deg, #fff 10%, var(--pink-soft) 55%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { margin: 0 auto; max-width: 46rem; color: var(--muted); font-size: 1.03rem; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.card-title { margin: 0 0 1.1rem; font-size: 1.15rem; }

/* Form */
.field-label { display: block; font-weight: 600; margin-bottom: 0.45rem; font-size: 0.94rem; }

input[type="url"], input[type="text"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="url"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 111, 168, 0.15);
}
input::placeholder { color: #6f6a80; }

.field-hint { margin: 0.5rem 0 1.1rem; color: var(--muted); font-size: 0.85rem; }

.checkbox {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.3rem;
  cursor: pointer;
}
.checkbox input { margin-top: 0.28rem; width: 18px; height: 18px; accent-color: var(--pink); flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.95rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.btn-primary {
  background: linear-gradient(100deg, var(--pink), var(--violet));
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 111, 168, 0.25);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn.loading .btn-label::after {
  content: "";
  display: inline-block;
  width: 0.9em;
  text-align: left;
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.form-note { margin: 0.9rem 0 0; font-size: 0.9rem; min-height: 1.4em; }
.form-note.error { color: var(--red); }
.form-note.info { color: var(--muted); }
.form-note.success { color: var(--green); }

/* Steps */
.steps { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 0.7rem; }
.steps li { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.94rem; }
.step-marker {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--card-border);
  flex: none;
  display: grid; place-items: center;
  font-size: 0.7rem;
  transition: all 0.25s;
}
.steps li.active { color: var(--text); }
.steps li.active .step-marker { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 111, 168, 0.14); animation: pulse 1.6s infinite; }
.steps li.done { color: var(--text); }
.steps li.done .step-marker { background: var(--green); border-color: var(--green); }
.steps li.done .step-marker::after { content: "✓"; color: #06231a; font-weight: 700; }

/* Result */
.result {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  animation: rise 0.35s ease both;
}
.result-icon { font-size: 1.6rem; line-height: 1; flex: none; }
.result-body h3 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.result-body p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.result.ok { border-color: rgba(67, 214, 155, 0.4); }
.result.pending { border-color: rgba(255, 200, 97, 0.4); }
.result.bad { border-color: rgba(255, 122, 122, 0.4); }

.ticket-meta { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.8rem; }

/* Grid */
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mini h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.mini p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Notice */
.notice {
  border: 1px dashed var(--card-border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background: rgba(255, 255, 255, 0.02);
}
.notice h2 { margin: 0 0 0.7rem; font-size: 1rem; }
.notice ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.9rem; }
.notice li { margin-bottom: 0.35rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 1.6rem clamp(1rem, 4vw, 2.5rem) 2.2rem;
  text-align: center;
}
.footer-links { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; font-size: 0.9rem; }
.footer-brand { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; }

/* Legal pages */
.legal { width: min(820px, 100%); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 3rem; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1.2rem; }
.legal h2 { font-size: 1.1rem; margin: 1.8rem 0 0.6rem; }
.legal p, .legal li { color: var(--muted); font-size: 0.95rem; }
.legal .card { margin-bottom: 1.2rem; }
.todo {
  border: 1px solid rgba(255, 200, 97, 0.45);
  background: rgba(255, 200, 97, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  color: var(--amber);
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}
.back-link { display: inline-block; margin-bottom: 1.2rem; font-size: 0.9rem; }

@media (max-width: 560px) {
  .site-header { justify-content: center; }
  .bot-status { width: 100%; justify-content: center; }
}

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