:root {
  color-scheme: light dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #0f172a;
  background-image: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.98),
    rgba(30, 41, 59, 0.95)
  );
  color: #e2e8f0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header,
.app-footer {
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  text-align: center;
}

.app-header h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.app-header p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
}

.app-main {
  flex: 1;
  display: grid;
  gap: 1.5rem;
  padding: clamp(1rem, 4vw, 3rem);
}

@media (min-width: 800px) {
  .app-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.editor-card,
.output-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(12px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field-label {
  font-weight: 600;
}

.script-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.script-select {
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
}

.code-input {
  min-height: 280px;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: inherit;
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", monospace;
  font-size: 0.95rem;
  resize: vertical;
}

.controls {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.primary-button,
.ghost-button {
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-button {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0f172a;
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

.primary-button:active {
  transform: translateY(1px);
}

.ghost-button {
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.output-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.output {
  min-height: 180px;
  margin: 0;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.75);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-footer a {
  color: #38bdf8;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}
