:root {
  --bg-color: #ffffff;
  --surface-color: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-color: #0284c7; /* Sky blue */
  --accent-hover: #0369a1;
  --warning-bg: #fffbeb;
  --warning-text: #b45309;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.disclaimer-banner {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  text-align: center;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #fde68a;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.step {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

h2 { font-family: Georgia, serif; margin-bottom: 1rem; color: var(--text-primary); font-size: 1.8rem; }
p { margin-bottom: 1.5rem; color: var(--text-secondary); }

.calibration-area {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  min-height: 200px;
  align-items: center;
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
}

.card-box {
  width: 300px;
  height: calc(300px * (53.98 / 85.60)); /* Standard credit card ratio */
  background-color: var(--accent-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  letter-spacing: 2px;
  transition: width 0.1s linear, height 0.1s linear;
}

.slider-controls { margin-bottom: 2rem; }
.slider { width: 100%; cursor: ew-resize; }

.instruction-box {
  background: var(--bg-color);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2rem;
}

.instruction-box p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn:hover { background: var(--accent-hover); }

/* Snellen Chart */
.chart-instruction { text-align: center; }
.snellen-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 2rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.snellen-line {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: bold;
  cursor: pointer;
  padding: 0.5rem 2rem;
  border-radius: 4px;
  transition: background 0.2s;
  white-space: pre-wrap;
  letter-spacing: 0.2em;
  text-align: center;
}

.snellen-line:hover { background: var(--bg-color); }

.result-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.acuity-score { font-size: 3rem; font-weight: bold; color: var(--accent-color); margin-bottom: 0.5rem; }
.acuity-desc { font-size: 1.1rem; color: var(--text-secondary); margin: 0; }

.final-results { display: flex; gap: 2rem; margin-bottom: 2rem; }
.eye-result { flex: 1; background: var(--bg-color); padding: 1.5rem; border-radius: 8px; text-align: center; }
.eye-result h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.eye-result .score { font-size: 2rem; font-weight: bold; color: var(--accent-color); margin: 0; }

.medical-advice { font-size: 0.95rem; font-style: italic; text-align: center; }
.cta { display: block; width: 100%; margin-top: 1rem; }

@media (max-width: 600px) {
  .final-results { flex-direction: column; gap: 1rem; }
  .snellen-chart { padding: 1rem 0; }
  .snellen-line { padding: 0.25rem 0.5rem; }
}

/* --- CSS DE REFERÊNCIAS --- */
.references { margin-top: 2rem; padding: 1.5rem; background: rgba(15,23,42,0.05); border-radius: 8px; font-size: 0.9rem; text-align: left; }
.references h3 { margin-top: 0; font-size: 1rem; color: var(--text-primary, #17202a); margin-bottom: 0.5rem; }
.references p { margin-bottom: 1rem; color: var(--text-secondary, #475569); }
.references ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.references li { margin-bottom: 0.5rem; color: var(--text-secondary, #475569); }
.references a { color: #0ea5e9; text-decoration: none; font-weight: bold; }
.references .disclaimer { margin-top: 1rem; font-style: italic; color: #64748b; font-size: 0.85rem; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 0.8rem; }
