:root {
  --bg: #0f1220;
  --card: #151a2e;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #7c3aed;
  --accent2: #22d3ee;
  --border: rgba(148, 163, 184, 0.2);
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --orange: #f97316;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(circle at top left, #1f2440, #0b0d18 65%);
  color: var(--text);
  min-height: 100vh;
  padding: 40px 24px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
}

header {
  margin-bottom: 32px;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 16px;
}

.back:hover {
  color: var(--accent2);
}

h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
}

.input-section {
  background: rgba(21, 26, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
  margin-top: 16px;
}

label:first-of-type {
  margin-top: 0;
}

input, textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.primary-btn {
  width: 100%;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

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

.results {
  margin-top: 32px;
}

.results.hidden {
  display: none;
}

.score-card {
  background: rgba(21, 26, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 3rem;
  font-weight: bold;
}

.score-circle small {
  font-size: 1rem;
  opacity: 0.7;
}

.score-label {
  color: var(--muted);
  font-size: 1.1rem;
}

.verdict-card {
  background: rgba(21, 26, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.verdict-card h3 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.verdict-card p {
  font-size: 1.1rem;
  line-height: 1.5;
}

.verdict-card.excellent { border-color: var(--green); }
.verdict-card.good { border-color: var(--accent2); }
.verdict-card.fair { border-color: var(--yellow); }
.verdict-card.poor { border-color: var(--red); }

.categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

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

.category {
  background: rgba(21, 26, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cat-icon {
  font-size: 1.2rem;
}

.cat-name {
  flex: 1;
  font-weight: 500;
}

.cat-score {
  font-weight: bold;
  color: var(--accent2);
}

.category ul {
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.category li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.category li::before {
  content: "•";
  position: absolute;
  left: 0;
}

.category li.good::before {
  content: "✓";
  color: var(--green);
}

.category li.bad::before {
  content: "✗";
  color: var(--red);
}

.category li.warn::before {
  content: "⚠";
  color: var(--yellow);
}

.suggestions-card {
  background: rgba(21, 26, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.suggestions-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.suggestions-card ul {
  list-style: none;
}

.suggestions-card li {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.suggestions-card li:last-child {
  margin-bottom: 0;
}

.attest-prediction {
  background: rgba(21, 26, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.attest-prediction h3 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.attest-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.attest-badge.valid {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
  border: 2px solid var(--green);
}

.attest-badge.unsure {
  background: rgba(234, 179, 8, 0.2);
  color: var(--yellow);
  border: 2px solid var(--yellow);
}

.attest-badge.invalid {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
  border: 2px solid var(--red);
}

.attest-prediction p {
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  margin-top: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--accent2);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
