:root {
    --bg-main: #0b0f19;
    --bg-card: #182234;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #2e3d52;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); color: var(--text); display: flex; flex-direction: column; min-height: 100vh; }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 2.5rem; background: #060911; border-bottom: 1px solid var(--border); }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.logo small { color: var(--accent); font-weight: 400; }
.navbar nav a { color: var(--text-muted); text-decoration: none; margin-left: 1.8rem; font-weight: 600; transition: color 0.2s; }
.navbar nav a.active, .navbar nav a:hover { color: var(--accent); }

.container { flex: 1; padding: 2rem; max-width: 1300px; margin: 0 auto; width: 100%; }

.simulator-layout { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; }
.sidebar { background: var(--bg-card); padding: 1.5rem; border-radius: 14px; border: 1px solid var(--border); height: fit-content; }
.sidebar h3 { font-size: 0.95rem; margin-bottom: 0.9rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.divider { border: 0; height: 1px; background: var(--border); margin: 1.4rem 0; }

.btn-subject { display: block; padding: 0.75rem 1rem; margin-bottom: 0.5rem; background: #0b0f19; color: var(--text); text-decoration: none; border-radius: 8px; border: 1px solid var(--border); font-size: 0.95rem; font-weight: 600; transition: all 0.2s; }
.btn-subject.active, .btn-subject:hover { border-color: var(--accent); background: #1e2d42; color: #fff; }

.toggle-btn { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; cursor: pointer; font-size: 0.9rem; }

.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.badge { background: rgba(245, 158, 11, 0.15); color: var(--accent); border: 1px solid var(--accent); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }

.photo-frame { position: relative; width: 100%; height: 450px; border-radius: 14px; overflow: hidden; border: 2px solid var(--border); user-select: none; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.svg-background { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; }
#overlay-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }

.real-subject-node {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    touch-action: none;
}
.real-subject-node:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.05); }

.subject-graphic { filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.75)); }

.target-label {
    margin-top: 6px;
    background: rgba(6, 9, 17, 0.92);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.score-display { font-size: 2.6rem; font-weight: 700; color: var(--accent); }
.progress-bar { height: 10px; background: #0b0f19; border-radius: 5px; overflow: hidden; margin: 0.5rem 0; }
#progress-fill { height: 100%; background: var(--accent); transition: width 0.15s ease-out; }

.info-box { background: var(--bg-card); padding: 1.5rem; border-radius: 14px; border: 1px solid var(--border); margin-top: 1.5rem; }
.info-box h3 { color: var(--accent); margin-bottom: 0.5rem; }
.info-box ul { margin-left: 1.2rem; margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.6; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.card { background: var(--bg-card); padding: 1.5rem; border-radius: 10px; border: 1px solid var(--border); }
.card h3 { color: var(--accent); margin-bottom: 0.5rem; }

.quiz-container { background: var(--bg-card); padding: 2rem; border-radius: 14px; border: 1px solid var(--border); }
.question-block { margin-bottom: 1.5rem; }
.btn-submit { background: var(--accent); color: #000; font-weight: 700; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: var(--accent-hover); }
.quiz-result { margin-top: 1.2rem; padding: 1.2rem; background: #0b0f19; border-radius: 8px; border: 1px solid var(--border); display: none; }

footer { text-align: center; padding: 1.5rem; background: #060911; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); }
