/* DT // FUSCATOR theme — deep navy night, star specks, cyan glow.
   Background illustration: /assets/bg.jpg under a dark navy overlay. */
:root {
  --bg0: #04070f;
  --panel: rgba(9, 17, 34, 0.72);
  --panel2: rgba(18, 30, 55, 0.66);
  --panel-solid: #0b1425;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eaf2fb;
  --muted: #9db1c7;
  --cyan: #67d7f7;
  --sky: #38bdf8;
  --accent: #5865f2; /* Discord blurple (icon accents only) */
  --accent2: #34d399;
  --warn: #e3b341;
  --danger: #fb7185;
  --mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg0);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  min-height: 100vh;
}

/* --- layered background: illustration + navy overlay + stars --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/assets/bg.jpg") center center / cover no-repeat;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.55) 0.8px, transparent 1.3px),
    radial-gradient(rgba(147, 197, 253, 0.45) 0.8px, transparent 1.3px),
    radial-gradient(rgba(255, 255, 255, 0.35) 0.6px, transparent 1.1px),
    linear-gradient(180deg, rgba(4, 9, 20, 0.68) 0%, rgba(3, 8, 18, 0.80) 42%, rgba(2, 5, 12, 0.90) 100%);
  background-size: 190px 190px, 270px 270px, 130px 130px, cover;
  background-position: 0 0, 70px 110px, 30px 60px, 0 0;
}

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 10, 22, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(103, 215, 247, 0.10);
  border: 1px solid rgba(103, 215, 247, 0.28);
  border-radius: 12px;
  color: var(--cyan);
}
.logo svg { width: 22px; height: 22px; }
.wordmark {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.mainnav {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
.mainnav a {
  padding: 7px 20px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
}
.mainnav a:hover { background: rgba(255, 255, 255, 0.09); }

.header-right { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; white-space: nowrap;
}
.lang svg { width: 16px; height: 16px; }

.auth-area { display: flex; align-items: center; gap: 10px; }
.topbar .btn { border-radius: 999px; }
.auth-user { display: flex; align-items: center; gap: 10px; }
.auth-user img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); }
.avatar-fallback {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: grid; place-items: center;
  font-weight: 700; color: #fff;
}

.banner {
  max-width: 1180px;
  margin: 14px auto 0;
  padding: 10px 16px;
  border: 1px solid rgba(227, 179, 65, 0.55);
  background: rgba(60, 44, 4, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  font-size: 13px;
}
.hidden { display: none !important; }

/* ---------- hero ---------- */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 20px 26px;
  text-align: center;
}
.hero-badge {
  width: 74px; height: 74px;
  margin: 0 auto 22px;
  display: grid; place-items: center;
  background: rgba(103, 215, 247, 0.08);
  border: 1px solid rgba(103, 215, 247, 0.30);
  border-radius: 20px;
  color: var(--cyan);
  box-shadow: 0 0 44px rgba(56, 189, 248, 0.28);
}
.hero-badge svg { width: 38px; height: 38px; }
.hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.08;
  text-shadow: 0 0 34px rgba(103, 215, 247, 0.45), 0 0 90px rgba(56, 189, 248, 0.25);
}
.hero-by {
  margin: 12px 0 0;
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.hero-tag {
  margin: 20px 0 0;
  font-size: clamp(1.25rem, 3.4vw, 1.9rem);
  font-weight: 800;
  text-shadow: 0 0 22px rgba(147, 197, 253, 0.35);
}
.hero-desc {
  margin: 18px auto 0;
  max-width: 680px;
  color: #c3d2e4;
  font-size: 15px;
  line-height: 1.85;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding: 16px 42px;
  border-radius: 16px;
  background: linear-gradient(92deg, #c9efff 0%, #6fd3fa 55%, #3aaef2 100%);
  color: #06283f;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 38px rgba(56, 189, 248, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 46px rgba(56, 189, 248, 0.60), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}
.hero-cta svg { width: 20px; height: 20px; }
.hero-sub { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- how it works ---------- */
.how {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px 6px;
}
.how h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(103, 215, 247, 0.30);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
}
.step-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(103, 215, 247, 0.10);
  border: 1px solid rgba(103, 215, 247, 0.26);
  border-radius: 12px;
  color: var(--cyan);
  margin-bottom: 14px;
}
.step-icon svg { width: 23px; height: 23px; }
.step-kicker {
  margin: 0 0 6px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.20em;
}
.step-card h3 { margin: 0 0 8px; font-size: 16px; }
.step-card p:last-child { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }

/* ---------- panels / tool ---------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 96px;
}
.panel.dragging {
  border-color: rgba(103, 215, 247, 0.65);
  box-shadow: 0 0 0 2px rgba(103, 215, 247, 0.35), 0 18px 50px rgba(0, 0, 0, 0.35);
}
.anchor { position: absolute; top: -96px; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.panel-head h2 { margin: 0; font-size: 16px; letter-spacing: 0.02em; }
.panel h3 { font-size: 14px; margin: 18px 0 8px; }

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

.editor {
  width: 100%;
  min-height: 260px;
  background: rgba(3, 8, 18, 0.78);
  color: #d6e6f7;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}
.editor.short { min-height: 170px; }
.editor:focus { outline: 2px solid rgba(103, 215, 247, 0.55); outline-offset: -1px; }
.editor::placeholder { color: #647d99; }

.stats { color: var(--muted); font-size: 12px; margin-top: 6px; }

.controls {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: end;
  margin-top: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field.grow { flex: 1 1 220px; }
.field input[type="text"] {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; font-size: 13px;
}
.key-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.field select, .field input {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; font-size: 13px;
}
.field input:focus, .field select:focus { outline: 2px solid rgba(103, 215, 247, 0.45); outline-offset: -1px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; padding-bottom: 9px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--sky); }

.main-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.status { font-size: 13px; color: var(--muted); }
.status.error { color: var(--danger); }
.status.ok { color: var(--accent2); }

.btn {
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 15px;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { border-color: var(--border-strong); background: rgba(30, 46, 78, 0.75); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: rgba(255, 255, 255, 0.05); }
.btn.primary {
  background: linear-gradient(92deg, #b9e9ff 0%, #5ec8f8 55%, #2ea3ec 100%);
  border-color: rgba(255, 255, 255, 0.25);
  color: #06283f;
  font-weight: 800;
  padding: 11px 26px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.38);
}
.btn.primary:hover { background: linear-gradient(92deg, #d2f1ff 0%, #74d2fa 55%, #45b2f2 100%); }
.btn.discord {
  background: linear-gradient(92deg, #b9e9ff 0%, #5ec8f8 55%, #2ea3ec 100%);
  border-color: rgba(255, 255, 255, 0.25);
  color: #06283f; font-weight: 800; text-decoration: none; display: inline-block;
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.35);
}
.btn.danger { color: var(--danger); }
.file-label { display: inline-block; }

.muted { color: var(--muted); font-size: 13px; }
.warn { color: var(--warn); font-size: 12px; line-height: 1.7; }

.script-list { display: flex; flex-direction: column; gap: 8px; }
.script-item, .script-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; font-size: 12.5px; flex-wrap: wrap;
}
.script-item code { font-family: var(--mono); }
.script-row code { font-family: var(--mono); }
.revoked { color: var(--danger); }

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 16px 20px 28px;
  color: var(--muted); font-size: 12px; line-height: 1.8;
  max-width: 1180px; margin: 0 auto;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}
@media (max-width: 700px) {
  .topbar { justify-content: center; text-align: center; }
  .brand { order: 1; }
  .header-right { order: 2; }
  .mainnav { order: 3; margin: 2px auto 0; }
  .wordmark { font-size: 15px; }
  .hero-title { letter-spacing: 0.08em; }
  .hero-cta { padding: 14px 30px; font-size: 16px; }
  .banner { margin-left: 12px; margin-right: 12px; }
  main, .how { padding-left: 12px; padding-right: 12px; }
  .panel { padding: 16px; }
}
