:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

body {
  margin: 0;
  padding: 2rem;
  background: #f4f5f7;
  color: #1f2933;
}

main {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 2rem 2.5rem 3rem;
}

h1 {
  margin-top: 0;
  font-size: 2rem;
}

nav {
  margin-bottom: 2rem;
}

nav a {
  margin-right: 1rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

form label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
  color: #475569;
}

input,
select,
textarea {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  font-size: 0.95rem;
}

button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

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

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.output {
  margin-top: 1.5rem;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  min-height: 3rem;
}

.status {
  font-size: 0.9rem;
  color: #64748b;
}

fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

legend {
  font-weight: 700;
  padding: 0 0.5rem;
}

.helper {
  font-size: 0.85rem;
  color: #64748b;
}

.table {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-top: 1.5rem;
}

.table table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 600;
}

.frame-wrapper {
  margin-top: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem 1.5rem;
  background: #f8fafc;
}

.frame-wrapper h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.frame-wrapper iframe {
  width: 100%;
  min-height: 480px;
  border: none;
  border-radius: 8px;
  background: #000;
  margin-top: 1rem;
}

.frame-empty {
  font-size: 0.9rem;
  color: #64748b;
}

.frame-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}
