:root {
  --bg0: #f7f9ff;
  --bg1: #f3fbff;
  --card: rgba(255, 255, 255, 0.92);
  --card-border: rgba(15, 23, 42, 0.08);
  --text: #0b1220;
  --muted: rgba(17, 24, 39, 0.72);
  --primary0: #2563eb;
  --primary1: #7c3aed;
  --shadow: 0 18px 55px rgba(3, 7, 18, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 15% 10%, rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(900px 480px at 80% 18%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(900px 560px at 50% 100%, rgba(34, 197, 94, 0.08), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.container {
  max-width: 980px;
  margin: 28px auto;
  padding: 0 16px 28px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
}

h1 {
  font-size: 22px;
  margin: 0;
  letter-spacing: 0.2px;
}

h2 {
  font-size: 16px;
  margin: 0;
}

.page-header {
  margin: 0 0 12px;
  padding: 16px 16px 6px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.62);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.08);
  backdrop-filter: blur(14px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.field span {
  font-size: 12px;
  color: var(--muted);
}

textarea,
select,
input {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea:focus,
select:focus,
input:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.row.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 780px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 32px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

.switch .slider {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.switch .slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.14);
  transition: transform 160ms ease, left 160ms ease;
}

.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border-color: rgba(37, 99, 235, 0.35);
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(124, 58, 237, 0.92));
  border-color: rgba(37, 99, 235, 0.25);
}

.switch input:checked + .slider::after {
  left: 26px;
}

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

button {
  background: linear-gradient(135deg, var(--primary0), var(--primary1));
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, opacity 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

button.secondary {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.12);
}

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

.link {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.86);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.link:hover {
  background: rgba(255, 255, 255, 0.9);
}

.status {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.9);
  min-height: 18px;
}

.status.error {
  color: #b91c1c;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.result {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.result:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.1);
}

.result img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  background: rgba(148, 163, 184, 0.26);
}

.result .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.72);
}

.result a {
  font-size: 12px;
  color: rgba(37, 99, 235, 0.95);
  text-decoration: none;
}

.result a:hover {
  text-decoration: underline;
}
