:root {
    --ink: #17202a;
    --paper: #ffffff;
    --navy: #1e3a8a;
    --cyan: #06b6d4;
    --border: #e2e8f0;
    --text-muted: #64748b;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    margin: 0;
    line-height: 1.6;
    padding-bottom: 3rem;
}

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

header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    text-align: center;
}

h1 { margin: 0 0 0.25rem 0; color: var(--navy); font-size: 1.5rem; }
.subtitle { margin: 0; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; }

.controls {
    background: #ffffff;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

select, input[type="range"] {
    width: 100%;
    padding: 0.5rem;
}

.hidden { display: none !important; }

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(30,58,138,0.05);
    padding: 0.5rem;
    border-radius: 4px;
}

.simulator-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.view-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.panel-header {
    background: var(--navy);
    color: #fff;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: bold;
}

.scene {
    height: 300px;
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #e0f6ff 50%, #8FBC8F 50%, #2E8B57 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.distance-target {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #111;
    margin-top: 10%;
    background: rgba(255,255,255,0.7);
    padding: 0.5rem;
    border-radius: 4px;
}

.near-target {
    text-align: center;
    font-size: 1rem;
    color: #fff;
    background: #111;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 5%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.anatomy-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.anatomy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.floating-eye {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
    z-index: 10;
    position: relative;
}

.floating-eye img {
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.explanation-box {
    background: #ffffff;
    border-left: 4px solid var(--cyan);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    height: 100%;
}

.explanation-box h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--navy);
}

/* --- 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; }
