:root {
  --bg: #0b1022;
  --panel: #0f172a;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --brand: #60a5fa;
  --accent: #a78bfa;
  --ok: #34d399;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ring: rgba(96, 165, 250, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui;
  color: var(--text);
  background: var(--bg);
}

/* fancy background */
.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}
.bg-aurora {
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(
      60% 40% at 20% 20%,
      rgba(96, 165, 250, 0.35),
      transparent 60%
    ),
    radial-gradient(
      50% 40% at 80% 30%,
      rgba(167, 139, 250, 0.35),
      transparent 60%
    ),
    radial-gradient(
      40% 40% at 50% 80%,
      rgba(52, 211, 153, 0.25),
      transparent 60%
    );
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(60% 60% at 50% 30%, black, transparent);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 6px 14px rgba(96, 165, 250, 0.35));
}
.sub {
  color: var(--muted);
  margin: 4px 0 0;
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 18px;
  backdrop-filter: blur(6px);
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
input,
button {
  font: inherit;
}
input {
  width: 100%;
  background: #0b1227;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.mt {
  margin-top: 12px;
}
.row {
  display: grid;
  gap: 8px;
}
.status {
  font-size: 13px;
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
  background: var(--muted);
}
.dot.warn {
  background: var(--warn);
}
.dot.ok {
  background: var(--ok);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0e1328;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  transition: transform 0.05s ease, box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.btn.primary {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border: 0;
  font-weight: 600;
}
.btn.ok {
  background: #0b3b2e;
  border-color: #0f4e3b;
}
.btn.warn {
  background: #3a2305;
  border-color: #4b2b07;
}
.btn.danger {
  background: #3b0b0b;
  border-color: #4e0f0f;
}

.preview-code {
  display: block;
  background: #05070f;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  padding: 12px;
  border-radius: 12px;
  word-break: break-all;
}
.link {
  color: #93c5fd;
  text-decoration: none;
}
.history {
  display: grid;
  gap: 10px;
}
.hist {
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}
.hist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.small {
  font-size: 12px;
  color: var(--muted);
}
.footer {
  opacity: 0.8;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
