/* === ContrastScan Base Styles === */

:root {
  --bg:         #09090b;
  --bg-card:    rgba(24,24,27,0.5);
  --bg-hover:   rgba(39,39,42,0.4);
  --border:     #27272a;
  --border-dim: #1c1c1f;
  --text:       #fafafa;
  --text-muted: #a1a1aa;
  --text-dim:   #71717a;
  --primary:    #3b82f6;
  --primary-hover: #2563eb;
  --focus:      #60a5fa;
  --green:      #22c55e;
  --red:        #ef4444;
  --yellow:     #eab308;
  --orange:     #f97316;
  --purple:     #8b5cf6;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
}

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

/* Typography & Body */
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 0.875rem;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 3rem 3rem;
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

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

.nav-links a:hover { color: var(--text); }
.nav-links a:focus-visible { color: var(--text); outline: 2px solid var(--focus); outline-offset: 2px; }

/* Back / secondary button */
.back {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.back:hover {
  color: var(--text);
  border-color: #3f3f46;
  background: rgba(39,39,42,0.4);
}

.back:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  color: var(--text);
}

/* Content container */
.content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* Card base */
.card {
  background: rgba(24,24,27,0.5);
  border: 1px solid var(--border-dim);
  border-radius: 0.75rem;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border); }

/* Headings */
h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.subtitle {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Section heading (uppercase label) */
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-top: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

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

/* Primary button */
.btn {
  padding: 0.85rem 1.75rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.btn:hover { background: var(--primary-hover); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Footer */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  border-top: 1px solid var(--border-dim);
  max-width: 1100px;
  margin: 2rem auto 0;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--text-muted); }

/* Dot indicator */
.dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot.green  { background: #22c55e; box-shadow: 0 0 0.5rem rgba(34,197,94,0.3); }
.dot.red    { background: #ef4444; box-shadow: 0 0 0.5rem rgba(239,68,68,0.3); }
.dot.yellow { background: #eab308; box-shadow: 0 0 0.5rem rgba(234,179,8,0.3); }

/* Tag / badge */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.tag.pass     { background: rgba(34,197,94,0.1);  color: #22c55e; }
.tag.fail     { background: rgba(239,68,68,0.1);  color: #ef4444; }
.tag.info     { background: rgba(59,130,246,0.1);  color: #60a5fa; }
.tag.critical { background: rgba(239,68,68,0.15); color: #ef4444; }
.tag.high     { background: rgba(249,115,22,0.15); color: #f97316; }
.tag.medium   { background: rgba(234,179,8,0.15); color: #eab308; }
.tag.low      { background: rgba(59,130,246,0.1);  color: #60a5fa; }

/* Progress bar */
.bar-bg {
  height: 0.25rem;
  background: var(--border);
  border-radius: 0.125rem;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 0.125rem;
  transition: width 0.8s ease;
}

/* Detail row */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(28,28,31,0.8);
  font-size: 0.8rem;
}

.detail-row:last-child { border-bottom: none; }

/* Code block */
pre {
  background: rgba(24,24,27,0.5);
  border: 1px solid var(--border-dim);
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

code {
  background: var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: inherit;
}

/* Syntax highlighting */
.key  { color: #60a5fa; }
.str  { color: #34d399; }
.num  { color: #f59e0b; }
.bool { color: #c084fc; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 0.125rem solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

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

/* Responsive */
@media (max-width: 640px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1rem; }
  .content { padding: 1.5rem 1.25rem; }
  footer { padding: 1.5rem 1.25rem; }
}
