:root {
  --bg: #0b1020;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.13);
  --text: #eef3ff;
  --muted: #aeb9d3;
  --accent: #74f0c3;
  --accent2: #7aa7ff;
  --danger: #ff9c9c;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(116, 240, 195, 0.20), transparent 32rem),
    radial-gradient(circle at top right, rgba(122, 167, 255, 0.24), transparent 34rem),
    linear-gradient(135deg, #070a14, var(--bg));
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
}

h1 {
  margin: 18px 0 10px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, var(--card), rgba(255,255,255,0.03));
  box-shadow: var(--shadow);
}

.hero-card span {
  min-height: 82px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--card-strong);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.card-head p, .hint {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.tabs {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.tab {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.tab.active {
  color: #061116;
  background: var(--accent);
}

.panel { display: none; }
.panel.active { display: block; }

textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

textarea:focus, input:focus {
  border-color: rgba(116, 240, 195, 0.75);
  box-shadow: 0 0 0 4px rgba(116, 240, 195, 0.12);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 24px;
  border: 1px dashed rgba(255,255,255,0.32);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  text-align: center;
}

.dropzone.drag {
  border-color: var(--accent);
  background: rgba(116, 240, 195, 0.08);
}

.dropzone input { display: none; }
.dropzone span, .dropzone em { color: var(--muted); }
.dropzone em { font-style: normal; overflow-wrap: anywhere; }

.algos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.algos label, .checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 18px;
  color: #061116;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.primary:hover { filter: brightness(1.07); }

.uuid-controls {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.uuid-controls label:not(.checkbox) {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input[type="number"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: rgba(0,0,0,0.24);
  font: inherit;
}

.results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.result {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.copy {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text);
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  font-weight: 700;
}

pre {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d9e3ff;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.error {
  color: var(--danger);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .hero, .grid {
    grid-template-columns: 1fr;
  }

  .hero-card span {
    min-height: 64px;
  }

  footer {
    flex-direction: column;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #9ff8d9;
  opacity: 0.9;
}

a:visited {
  color: var(--accent);
}