:root {
  --bg: #0e1420;
  --panel: #111a29;
  --border: #1c2940;
  --accent: #4fd1c5;
  --accent-2: #7ae0ff;
  --text: #e7ecf5;
  --muted: #9fb3c8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font: "Montserrat", "Segoe UI", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(circle at 20% 20%, rgba(79, 209, 197, 0.08), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(122, 224, 255, 0.08), transparent 28%),
    var(--bg);
  color: var(--text);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 22px 64px;
}

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

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.lang-btn {
  padding: 8px 12px;
  border-radius: 8px;
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.16), rgba(122, 224, 255, 0.16));
  border: 1px solid var(--accent);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 6px;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.03em;
}

.lede {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 700px;
}

.hero-badge {
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.14), rgba(122, 224, 255, 0.14));
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--accent-2);
  box-shadow: var(--shadow);
  text-align: right;
}

.hero-badge span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
}

.hero-badge strong {
  font-size: 18px;
  letter-spacing: 0.05em;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.dropzone {
  position: relative;
  border: 1.5px dashed rgba(79, 209, 197, 0.5);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: rgba(79, 209, 197, 0.05);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.drop-content {
  position: relative;
  z-index: 1;
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-icon {
  font-size: 28px;
}

.drop-title {
  margin: 8px 0 4px;
  font-weight: 600;
}

.preview {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.preview img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.hint {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.field {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inline-field {
  gap: 4px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  display: none;
}

.toggle-slider {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: #1f2a3d;
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.4), rgba(122, 224, 255, 0.4));
  border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::after {
  transform: translateX(22px);
  background: #0c1829;
}

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

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b1320;
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(122, 224, 255, 0.18);
}

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

.primary {
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f18;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(122, 224, 255, 0.26);
}

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

.status {
  min-height: 18px;
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}

.progress {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: none;
}

.progress-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.progress-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 20px rgba(122, 224, 255, 0.2);
  transition: width 0.2s ease;
}

.analysis-progress {
  display: none;
  margin-top: 8px;
}

.analysis-progress .pending-row {
  background: #0f1726;
  border-style: solid;
}

.pending-status.done {
  color: #9ef0c0;
}

.pending-status.stopped {
  color: #ff9e9e;
}

.results-card h2 {
  margin: 0;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(122, 224, 255, 0.12);
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analysis-step {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #0f1726;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analysis-step.pending {
  opacity: 0.8;
}

.pending-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.pending-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pending-status {
  color: var(--accent-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.step-title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.step-hint {
  margin: 0;
  color: var(--muted);
}

.observations {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #0f1726;
}

.locations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.observations-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.observations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.observation-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.observation-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.observation-value {
  color: var(--text);
  line-height: 1.4;
}

.observation-placeholder {
  color: var(--muted);
}

.location {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #0f1726;
}

.location header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.confidence {
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0a0f18;
}

.confidence.high {
  background: #9ef0c0;
}

.confidence.medium {
  background: #ffd166;
}

.confidence.low {
  background: #ff7b7b;
}

.coordinates {
  color: var(--muted);
  font-size: 13px;
}

.location-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.ghost-button:hover {
  border-color: var(--accent-2);
  color: #fff;
  transform: translateY(-1px);
}

.explanation {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.5;
}

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

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

  .page {
    padding: 24px 16px 48px;
  }
}
