:root {
  --bg-dark: #090d16;
  --card-bg: #111827;
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --brand-green: #22c55e;
  --brand-green-glow: rgba(34, 197, 94, 0.25);
  --brand-cyan: #0ea5e9;
  --brand-purple: #a855f7;
  --warning-amber: #f59e0b;
  --danger-red: #ef4444;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 85% 15%, rgba(168, 85, 247, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(34, 197, 94, 0.05) 0%, transparent 45%);
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 32px;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.logo-title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links .nav-cta {
  background: rgba(34, 197, 94, 0.12);
  color: var(--brand-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
}

.nav-links .nav-cta:hover {
  background: var(--brand-green);
  color: #000;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand-purple);
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--brand-purple);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brand-purple);
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Upload Section */
.upload-section {
  margin-bottom: 36px;
}

.drop-zone {
  background: var(--card-bg);
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--brand-purple);
  background: rgba(168, 85, 247, 0.05);
  transform: translateY(-2px);
}

.drop-icon {
  margin-bottom: 14px;
}

.drop-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.file-label {
  color: var(--brand-purple);
  text-decoration: underline;
  cursor: pointer;
}

.drop-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.drop-hint code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.hidden-input {
  display: none;
}

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-sample {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sample:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Results Hidden / Shown */
.hidden {
  display: none;
}

.analysis-results {
  animation: fadeIn 0.4s ease-in-out;
}

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

.score-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 24px;
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.status-pill.good { background: rgba(34, 197, 94, 0.15); color: var(--brand-green); }
.status-pill.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger-red); }

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.badge.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger-red); }
.badge.good { background: rgba(34, 197, 94, 0.2); color: var(--brand-green); }

.bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar {
  height: 100%;
  transition: width 0.6s ease;
}

.progress-bar.danger { background: var(--danger-red); }
.progress-bar.warning { background: var(--warning-amber); }
.progress-bar.info { background: var(--brand-cyan); }

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.metric-label { color: var(--text-secondary); }
.metric-value { font-weight: 600; color: var(--text-primary); }

.metric-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 6px;
}

/* Fix Card & CTA */
.cta-fix-card {
  background: var(--card-bg);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  padding: 24px 32px;
}

.fix-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

.fix-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.fix-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.fix-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--brand-green);
  font-weight: bold;
}

.cta-fix-box, .cta-banner {
  display: none !important;
}

.cta-fix-box p {
  color: var(--text-primary);
  font-size: 0.92rem;
}

.btn-cta {
  background: #22c55e;
  color: #000000;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
  transition: all 0.2s ease;
}

.btn-cta:hover {
  background: #16a34a;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--card-border);
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links { margin-top: 8px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--brand-purple); }

@media (max-width: 768px) {
  .details-grid { grid-template-columns: 1fr; }
  .cta-fix-box { flex-direction: column; text-align: center; }
  .hero-title { font-size: 1.7rem; }
}
