:root {
  --bg: #05060a;
  --bg-elevated: #0b0d16;
  --bg-card: #0f111c;
  --accent: #c9a86a;
  --accent-soft: rgba(201, 168, 106, 0.18);
  --accent-strong: #e0c48a;
  --text-main: #f5f5f7;
  --text-sub: #a0a3b5;
  --border-subtle: #1b1f2b;
  --danger: #ff5c5c;
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.7);
  --shadow-subtle: 0 0 0 1px rgba(255, 255, 255, 0.03);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top, #15192a 0, #05060a 55%),
    radial-gradient(circle at bottom, #05060a 0, #020308 55%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.96), rgba(5, 6, 10, 0.7), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #c9a86a 40%, #4b3b1f 70%, #05060a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 14px 30px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.brand-orb {
  position: absolute;
  inset: 18% 18% auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  opacity: 0.8;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-main {
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), rgba(5, 6, 10, 0.9));
  font-size: 11px;
  color: var(--text-sub);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, #4cff9a, #0f5130);
  box-shadow: 0 0 0 1px rgba(76, 255, 154, 0.4);
}

/* Main layout */

.site-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 18px 16px 40px;
}

.main-inner {
  max-width: 1280px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .main-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Hero */

.hero {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 24px 22px 20px;
  background: radial-gradient(circle at top left, rgba(201, 168, 106, 0.16), rgba(5, 6, 10, 0.96));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-height: 260px;
}

.hero-glow {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(201, 168, 106, 0.22), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.9), #05060a 70%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 10px;
}

.hero-lead {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
  margin: 0 0 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 10, 0.7);
  font-size: 11px;
  color: var(--text-sub);
}

.badge-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
}

.badge-icon-gradient {
  background: radial-gradient(circle, #ffffff, #c9a86a);
}

.hero-footer {
  display: flex;
  justify-content: flex-start;
}

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

.hero-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 6, 10, 0.7);
  color: var(--text-sub);
}

.hero-chip-soft {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Tool */

.tool {
  border-radius: var(--radius-xl);
  padding: 18px 18px 16px;
  background: linear-gradient(145deg, rgba(12, 15, 24, 0.96), rgba(5, 6, 10, 0.98));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.tool::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 0 0, rgba(201, 168, 106, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.06), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.tool-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.tool-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-sub);
}

.tool-meta-pill {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), rgba(5, 6, 10, 0.9));
  color: var(--text-sub);
}

/* Presets */

.preset-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.preset-btn {
  position: relative;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 10, 0.9);
  color: var(--text-main);
  font-size: 11px;
  padding: 7px 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    filter 0.15s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.preset-main {
  font-size: 11px;
}

.preset-sub {
  font-size: 10px;
  color: var(--text-sub);
}

.preset-btn.primary {
  background: linear-gradient(135deg, #c9a86a, #e0c48a);
  color: #05060a;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.preset-btn.primary .preset-sub {
  color: rgba(5, 6, 10, 0.7);
}

.preset-btn:hover {
  filter: brightness(1.05);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(201, 168, 106, 0.4);
}

.preset-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Options */

.options {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(5, 6, 10, 0.9);
  box-shadow: var(--shadow-subtle);
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
}

.options[open] {
  animation: options-open 0.18s ease-out;
}

@keyframes options-open {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.options-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(201, 168, 106, 0.16), transparent);
}

.options-summary::-webkit-details-marker {
  display: none;
}

.options-summary::after {
  content: "▼";
  margin-left: auto;
  font-size: 10px;
  color: var(--text-sub);
}

.options[open] .options-summary::after {
  content: "▲";
}

.options-summary-sub {
  font-size: 10px;
  color: var(--text-sub);
}

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

@media (max-width: 720px) {
  .options-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.option-group {
  border-radius: var(--radius-md);
  padding: 8px 9px;
  background: rgba(5, 6, 10, 0.9);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.option-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.option-label {
  font-size: 11px;
  color: var(--text-main);
}

.option-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-sub);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.option-row label {
  font-size: 11px;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.option-row input[type="radio"],
.option-row input[type="checkbox"] {
  width: 13px;
  height: 13px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* IO panels */

.io-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

@media (max-width: 960px) {
  .io-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.io-panel {
  border-radius: var(--radius-lg);
  padding: 10px 10px 8px;
  background: rgba(5, 6, 10, 0.9);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 200px;
}

.io-panel-output {
  background: radial-gradient(circle at top left, rgba(201, 168, 106, 0.12), rgba(5, 6, 10, 0.96));
}

.io-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.io-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.io-label {
  font-size: 11px;
  color: var(--text-main);
}

.io-caption {
  font-size: 10px;
  color: var(--text-sub);
}

.io-counter {
  font-size: 10px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.io-counter strong {
  color: var(--accent-strong);
  font-weight: 500;
}

textarea {
  width: 100%;
  flex: 1;
  resize: vertical;
  min-height: 130px;
  max-height: 360px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), rgba(5, 6, 10, 0.98));
  color: var(--text-main);
  font-size: 13px;
  padding: 8px 9px;
  outline: none;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

textarea::placeholder {
  color: rgba(160, 163, 181, 0.7);
}

textarea:focus {
  border-color: rgba(201, 168, 106, 0.8);
  box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.5);
}

/* IO footer */

.io-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.copy-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #c9a86a, #e0c48a);
  color: #05060a;
  font-size: 11px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.copy-btn:hover {
  filter: brightness(1.05);
}

.copy-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.copy-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(5, 6, 10, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  position: relative;
}

.copy-icon::after {
  content: "";
  position: absolute;
  inset: 2px 2px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.copy-status {
  font-size: 10px;
  color: var(--text-sub);
  min-width: 80px;
  text-align: right;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.copy-status.show {
  opacity: 1;
  transform: translateY(0);
}

.copy-status.ok {
  color: #4cff9a;
}

.copy-status.ng {
  color: var(--danger);
}

/* Helper row */

.helper-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-sub);
  flex-wrap: wrap;
}

.helper-summary strong {
  color: var(--accent-strong);
  font-weight: 500;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at top, rgba(201, 168, 106, 0.12), #05060a 55%);
  padding: 18px 16px 22px;
  display: flex;
  justify-content: center;
}

.footer-inner {
  max-width: 1280px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-sub);
  flex-wrap: wrap;
}
