:root {
  --c1: #f4f7f8;
  --c2: #d6e5ec;
  --c3: #9fbfd4;
  --c4: #667585;
  --c5: #2a2e36;

  --bg: #edf3f6;
  --text: var(--c5);
  --muted: var(--c4);
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(42, 46, 54, 0.10);
  --shadow: 0 20px 45px rgba(42, 46, 54, 0.12);

  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(159, 191, 212, 0.28), transparent 22%),
    radial-gradient(circle at bottom left, rgba(214, 229, 236, 0.7), transparent 30%),
    linear-gradient(180deg, #eaf1f5 0%, var(--c1) 100%);
}

.app-shell {
  min-height: 100vh;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 56px;
}

.hero {
  border-radius: 34px;
  padding: 34px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.hero-dark {
  background:
    radial-gradient(circle at top right, rgba(159, 191, 212, 0.22), transparent 30%),
    linear-gradient(135deg, #232830 0%, #2a2e36 42%, #3a4756 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.08);
}

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

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 247, 248, 0.72);
}

.hero-badge {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: rgba(244, 247, 248, 0.88);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hero h1 {
  margin: 0 0 12px;
  max-width: 760px;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.hero p {
  margin: 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(244, 247, 248, 0.82);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.panel-light,
.panel-dark {
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-light {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.55);
}

.panel-dark {
  background:
    linear-gradient(180deg, rgba(42,46,54,0.96), rgba(49,58,69,0.96));
  border: 1px solid rgba(255,255,255,0.06);
  color: white;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section-head-dark p {
  color: rgba(214, 229, 236, 0.72);
}

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

.field {
  display: flex;
  flex-direction: column;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.94);
  color: var(--text);
  font: inherit;
  border-radius: 16px;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8995a5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--c3);
  box-shadow: 0 0 0 4px rgba(159, 191, 212, 0.20);
  transform: translateY(-1px);
}

textarea {
  min-height: 170px;
  resize: vertical;
}

.upload-panel {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px dashed rgba(42,46,54,0.16);
  background:
    linear-gradient(135deg, rgba(214,229,236,0.42), rgba(244,247,248,0.95));
  border-radius: 22px;
  padding: 18px;
  overflow: hidden;
}

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--c5), #3a4552);
  color: white;
  font-size: 26px;
  font-weight: 500;
  box-shadow: 0 10px 24px rgba(42,46,54,0.20);
}

.upload-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-copy strong {
  font-size: 15px;
}

.upload-copy span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.upload-panel input[type="file"] {
  grid-column: 1 / -1;
  margin-top: 2px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.primary-button {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  min-width: 176px;
  background: linear-gradient(135deg, #1f232b, #363f4d);
  color: white;
  font: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(42,46,54,0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(42,46,54,0.26);
}

.assistant-stack {
  display: grid;
  gap: 14px;
}

.assistant-card {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.assistant-card.active {
  background: linear-gradient(135deg, rgba(159,191,212,0.26), rgba(214,229,236,0.14));
  border-color: rgba(159,191,212,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.assistant-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
  color: white;
}

.assistant-text {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(214, 229, 236, 0.78);
}

.response {
  margin-top: 24px;
}

.response-body {
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
}

.response-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

  .hero h1 {
    font-size: 36px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 18px 14px 36px;
  }

  .hero,
  .panel-light,
  .panel-dark {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 30px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .primary-button {
    width: 100%;
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }
}