﻿:root {
  --bg-1: #0b1024;
  --bg-2: #14213d;
  --accent: #f7b733;
  --accent-strong: #f27059;
  --accent-cool: #2ec4b6;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(255, 255, 255, 0.98);
  --ink: #0b0f1a;
  --muted: #5d6774;
  --line: rgba(15, 23, 42, 0.14);
  --shadow: 0 24px 60px rgba(10, 14, 30, 0.22);
  --shadow-soft: 0 12px 30px rgba(10, 14, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top, #1c2a4a 0%, #0b1024 55%, #070a18 100%);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  opacity: 0.7;
  z-index: 0;
}

.orb-a {
  background: radial-gradient(circle, rgba(247, 183, 51, 0.7), rgba(247, 183, 51, 0.05));
  top: -90px;
  right: -80px;
}

.orb-b {
  background: radial-gradient(circle, rgba(46, 196, 182, 0.55), rgba(46, 196, 182, 0.05));
  bottom: -140px;
  left: -90px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  color: #f8f6f0;
  animation: fadeUp 0.8s ease forwards;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248, 246, 240, 0.24);
  background: rgba(248, 246, 240, 0.12);
  color: #ffffff;
  font-weight: 700;
}

.logo-img {
  width: 30px;
  height: 30px;
  display: inline-flex;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(247, 183, 51, 0.28);
}

.logo-text {
  letter-spacing: 0.02em;
  font-size: 15px;
}

.tagline {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 11px;
  color: rgba(248, 246, 240, 0.65);
}

.hero h1 {
  font-family: "Source Serif 4", serif;
  font-size: clamp(32px, 5vw, 54px);
  margin: 0 0 12px;
  max-width: 700px;
  text-shadow: 0 12px 30px rgba(7, 10, 24, 0.45);
}

.lead {
  margin: 0;
  font-size: 18px;
  max-width: 640px;
  color: rgba(248, 246, 240, 0.78);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.badge {
  background: rgba(248, 246, 240, 0.12);
  border: 1px solid rgba(248, 246, 240, 0.24);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.panel,
.results {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
  min-width: 0;
}

.panel {
  animation-delay: 0.05s;
}

.results {
  background: var(--surface-2);
  animation-delay: 0.12s;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  resize: vertical;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(12, 19, 43, 0.08);
  overflow-wrap: anywhere;
}

.file-field input {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  border: 1px dashed var(--line);
  padding: 10px;
  background: #ffffff;
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 12px;
  background: rgba(46, 196, 182, 0.16);
  color: #0b1024;
  font-weight: 600;
  cursor: pointer;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  cursor: pointer;
  color: #1c1c1c;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(242, 112, 89, 0.3);
}

button.secondary {
  background: rgba(11, 15, 26, 0.08);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

button.secondary:hover {
  box-shadow: 0 10px 22px rgba(11, 15, 26, 0.12);
}

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

.status {
  font-size: 14px;
  color: var(--muted);
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.results-title h2 {
  margin: 0;
  font-size: 22px;
}

.results-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.results-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.select-group {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  background: #ffffff;
  color: var(--ink);
}

.results-grid {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  overflow: hidden;
}

.result-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.result-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.result-card details {
  margin-top: 10px;
  background: #f4f6fa;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  max-width: 100%;
  overflow: hidden;
}

.result-card summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.result-card summary::-webkit-details-marker {
  display: none;
}

.result-card summary::before {
  content: "▸";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.result-card details[open] summary::before {
  transform: rotate(90deg);
}

.result-card pre {
  margin: 8px 0 0;
  font-size: 12px;
  color: #1b1c28;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 10px;
}

.error {
  color: #a1342c;
  font-weight: 600;
}

.footer {
  color: rgba(248, 246, 240, 0.7);
  font-size: 13px;
  text-align: center;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .page {
    padding: 32px 18px 56px;
  }

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

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

  .results-actions {
    width: 100%;
    align-items: flex-start;
  }

  select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
