/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  background: #0a0a0a;
  font-family: 'Inter', sans-serif;
  color: #e0e0e0;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Bar ─────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid #1a1a1a;
}

.back-link {
  color: #888;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: #fff;
}

.top-bar h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.6rem;
  color: #f0f0f0;
  letter-spacing: 0.05em;
}

.top-bar h1 span {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: #666;
  margin-left: 6px;
  letter-spacing: 0;
}

/* ── Container ───────────────────────────────────── */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Card ────────────────────────────────────────── */
.card {
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #2a2a2a;
}

.card h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.05rem;
  color: #f0f0f0;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

/* ── Input Row (single input + button) ───────────── */
.input-row {
  display: flex;
  gap: 10px;
}

.input-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

/* ── Shared input styles ─────────────────────────── */
input[type="text"],
select {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 10px 14px;
  color: #e0e0e0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
select:focus {
  border-color: #4a9eff;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

select option {
  background: #111;
  color: #e0e0e0;
}

/* ── Buttons ─────────────────────────────────────── */
button,
.submit-btn {
  background: #4a9eff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

button:hover,
.submit-btn:hover {
  background: #6bb3ff;
}

button:active,
.submit-btn:active {
  transform: scale(0.97);
}

/* ── Form Grid (multi-field form) ────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 20px;
}

.form-grid label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  text-align: right;
}

.form-grid input[type="text"],
.form-grid select {
  width: 100%;
}

.submit-btn {
  display: inline-block;
}

/* ── Result Frame ────────────────────────────────── */
.result-frame {
  margin-top: 16px;
  background: #0d1117;
  border: 1px solid #1e1e1e;
  border-radius: 8px;
  padding: 4px;
  min-height: 0;
  overflow: hidden;
  transition: min-height 0.3s;
}

.result-frame iframe {
  width: 100%;
  height: 60px;
  border: none;
  background: transparent;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 520px) {
  .top-bar {
    padding: 16px 20px;
  }

  .container {
    padding: 24px 16px 40px;
  }

  .card {
    padding: 20px;
  }

  .input-row {
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-grid label {
    text-align: left;
  }
}
