:root {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #f5f1e8;
  background:
    radial-gradient(circle at top, rgba(239, 186, 103, 0.22), transparent 34%),
    linear-gradient(160deg, #24180d 0%, #0f1720 48%, #142938 100%);
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#root {
  min-height: 100vh;
}

.app-shell {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.panel {
  display: grid;
  gap: 1.5rem;
}

.result-label,
.metric-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.result-card h2,
.summary-block h2 {
  margin: 0;
}

.search-form,
.result-card {
  background: rgba(10, 16, 24, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.search-form {
  padding: 1.5rem;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.field-row input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.field-row input::placeholder {
  color: rgba(245, 241, 232, 0.4);
}

.field-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.4rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffb75e, #ed8f03);
  color: #1c150d;
  font-weight: 700;
  min-width: 10rem;
}

.field-row button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(28, 21, 13, 0.25);
  border-top-color: #1c150d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.message,
.result-card p,
.summary-block ul {
  margin: 0;
}

.message {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
}

.message.error,
.error-state {
  color: #ffd4d4;
  background: rgba(106, 19, 19, 0.35);
}

.result-card {
  padding: 1.5rem 1.5rem 1rem;
}

.empty-state,
.result-card h2 + p {
  color: rgba(245, 241, 232, 0.8);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.summary-metric,
.summary-block {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.2rem;
}

.summary-block + .summary-block {
  margin-top: 1rem;
}

.summary-block p {
  margin-top: 0.65rem;
}

.summary-block ul {
  margin-top: 0.65rem;
  padding-left: 1.25rem;
}

.summary-block li + li {
  margin-top: 0.55rem;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f1e8;
  text-decoration: none;
  font-weight: 600;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.tool-link:hover,
.tool-link:focus-visible {
  background: rgba(255, 183, 94, 0.14);
  border-color: rgba(255, 183, 94, 0.38);
  transform: translateY(-1px);
}

.result-footer {
  margin-top: 0.75rem;
  padding-top: 0.9rem;
  color: rgba(245, 241, 232, 0.72);
  font-size: 0.95rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 700px) {
  .app-shell {
    padding-top: 2rem;
  }

  .field-row,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
