:root {
  color-scheme: dark light;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top left, #1f2937, #0f172a 60%);
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  color: #f8fafc;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 40px;
  max-width: 720px;
  width: min(90vw, 720px);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.45);
}

h1 {
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 24px;
  line-height: 1.6;
  color: #e2e8f0;
}

.controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.status {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: color 0.3s ease;
}

.status[data-state="success"] {
  color: #4ade80;
  opacity: 1;
}

.status[data-state="error"] {
  color: #f87171;
  opacity: 1;
}

button {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.35);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(165, 180, 252, 0.35);
  color: #c7d2fe;
  box-shadow: none;
}

.secondary-btn:hover:not(:disabled) {
  background: rgba(165, 180, 252, 0.15);
  box-shadow: none;
}

.advanced-toggle-btn {
  align-self: flex-start;
  padding: 8px 18px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.outputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.output {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.output-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.output-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.7;
}

.output-value {
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Menlo, monospace;
  word-break: break-all;
  font-size: 0.98rem;
  line-height: 1.5;
}

.copy-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.copy-feedback {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translate(12px, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-feedback .check {
  color: #4ade80;
  font-size: 1rem;
}

.copy-feedback[hidden] {
  display: none;
}

.copy-feedback.visible {
  opacity: 1;
  transform: translate(0, -50%);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(165, 180, 252, 0.12);
  border: 1px solid rgba(165, 180, 252, 0.2);
  color: #c7d2fe;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.copy-btn[hidden] {
  display: none;
}

.copy-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.copy-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(74, 222, 128, 0.4);
  color: #bbf7d0;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
}

.repo-link:hover {
  color: #c7d2fe;
}
