/* Reset & base */
* { margin:0; padding:0; box-sizing:border-box; }
body { overflow:hidden; background:#0a0a0a; font-family:'Segoe UI',system-ui,sans-serif; color:#e0e0e0; }

/* Start screen */
#start-screen {
  position:fixed; inset:0; z-index:1000;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#0d1b2a 0%,#1b263b 40%,#415a77 100%);
}
.start-content {
  text-align:center; padding:60px;
  background:rgba(255,255,255,0.05); border-radius:24px;
  backdrop-filter:blur(20px); border:1px solid rgba(255,255,255,0.1);
}
.start-content h1 {
  font-size:3.5em; letter-spacing:12px; color:#00d4ff;
  text-shadow:0 0 30px rgba(0,212,255,0.5); margin-bottom:8px;
}
.start-content h2 {
  font-size:1.5em; color:#7ec8e3; font-weight:300; margin-bottom:30px;
  letter-spacing:4px;
}
.start-content p { color:#a0b4c8; margin:10px 0; font-size:1.05em; max-width:420px; }
#start-btn {
  margin-top:30px; padding:16px 48px; font-size:1.2em; letter-spacing:3px;
  background:linear-gradient(135deg,#00d4ff,#0099cc); color:#fff;
  border:none; border-radius:12px; cursor:pointer; font-weight:600;
  transition:all .3s;
}
#start-btn:hover { transform:scale(1.05); box-shadow:0 0 30px rgba(0,212,255,0.4); }

/* 3D container */
#scene-container { position:fixed; inset:0; }

/* HUD */
#hud { position:fixed; inset:0; pointer-events:none; z-index:10; }
#hud > * { pointer-events:auto; }

/* Top bar */
#top-bar {
  position:absolute; top:0; left:0; right:0; height:50px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 20px;
  background:rgba(0,0,0,0.7); backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(0,212,255,0.2);
}
#patient-name { font-size:1.1em; color:#00d4ff; font-weight:600; }
#timer { font-family:monospace; font-size:1.2em; color:#ff6b6b; }
#score-display { color:#ffd93d; font-weight:600; }

/* Panels */
.panel {
  position:absolute; background:rgba(10,20,40,0.92);
  border:1px solid rgba(0,212,255,0.2); border-radius:12px;
  padding:16px; backdrop-filter:blur(12px);
  max-height:70vh; overflow-y:auto;
}
.panel h3 { color:#00d4ff; font-size:1em; margin-bottom:10px; letter-spacing:1px; }

/* Vitals panel */
#vitals-panel {
  left:16px; top:70px; width:220px;
}
.vital-row {
  display:flex; justify-content:space-between; padding:6px 0;
  border-bottom:1px solid rgba(255,255,255,0.05); font-size:0.9em;
}
.vital-row span:first-child { color:#8899aa; }
.vital-row span:last-child { color:#fff; font-family:monospace; font-weight:600; }

/* Dialogue panel */
#dialogue-panel {
  bottom:80px; left:50%; transform:translateX(-50%);
  width:min(600px,90vw);
  display:flex; flex-direction:column; max-height:45vh;
}
#dialogue-text {
  padding:12px; margin-bottom:10px; background:rgba(0,0,0,0.3);
  border-radius:8px; min-height:80px; line-height:1.5; font-size:0.9em;
  overflow-y:auto; flex:1;
  max-height:calc(45vh - 80px);
}
#dialogue-choices {
  display:flex; flex-direction:column; gap:6px;
}
.choice-btn {
  padding:10px 16px; background:rgba(0,212,255,0.1);
  border:1px solid rgba(0,212,255,0.3); border-radius:8px;
  color:#c0e8f8; cursor:pointer; text-align:left; font-size:0.9em;
  transition:all .2s;
}
.choice-btn:hover {
  background:rgba(0,212,255,0.25); border-color:#00d4ff;
  transform:translateX(4px);
}

/* Free chat input */
#free-chat {
  display:flex; gap:6px; margin-top:10px; padding-top:10px;
  border-top:1px solid rgba(0,212,255,0.1);
}
#chat-input {
  flex:1; padding:10px 12px; background:rgba(0,0,0,0.3);
  border:1px solid rgba(0,212,255,0.2); border-radius:8px;
  color:#e0e0e0; font-size:0.9em;
}
#chat-input:focus { outline:none; border-color:#00d4ff; }
#chat-send {
  padding:10px 16px; background:linear-gradient(135deg,#00d4ff,#0099cc);
  color:#fff; border:none; border-radius:8px; cursor:pointer;
  font-weight:600; font-size:0.85em;
}

/* Observation panel */
#observation-panel {
  right:16px; top:70px; width:280px;
}
#observation-text {
  width:100%; height:100px; background:rgba(0,0,0,0.3);
  border:1px solid rgba(0,212,255,0.2); border-radius:8px;
  color:#e0e0e0; padding:10px; resize:vertical; font-size:0.85em;
  margin-bottom:10px;
}
.ccmu-options { display:flex; gap:4px; margin:8px 0; }
.ccmu-btn {
  flex:1; padding:8px 4px; font-size:0.8em;
  background:rgba(0,212,255,0.08); border:1px solid rgba(0,212,255,0.2);
  color:#a0c8e0; border-radius:6px; cursor:pointer; transition:all .2s;
}
.ccmu-btn:hover, .ccmu-btn.selected {
  background:rgba(0,212,255,0.3); border-color:#00d4ff; color:#fff;
}
#ccmu-desc { font-size:0.8em; color:#8899aa; margin:4px 0 12px; min-height:30px; }
#orientation-select {
  width:100%; padding:10px; margin:8px 0; background:rgba(0,0,0,0.3);
  border:1px solid rgba(0,212,255,0.2); color:#e0e0e0;
  border-radius:8px; font-size:0.85em;
}
#submit-obs {
  width:100%; padding:10px; margin-top:8px;
  background:linear-gradient(135deg,#00d4ff,#0099cc); color:#fff;
  border:none; border-radius:8px; cursor:pointer; font-weight:600;
  font-size:0.9em;
}

/* Actions panel */
#actions-panel {
  position:absolute; bottom:16px; right:16px;
  display:flex; gap:8px;
}
.action-btn {
  padding:12px 20px; font-size:0.9em;
  background:rgba(0,212,255,0.15); border:1px solid rgba(0,212,255,0.3);
  color:#c0e8f8; border-radius:10px; cursor:pointer;
  transition:all .2s; font-weight:500;
}
.action-btn:hover {
  background:rgba(0,212,255,0.35); border-color:#00d4ff; transform:translateY(-2px);
}

/* Tooltip */
#tooltip {
  position:fixed; padding:8px 14px; background:rgba(0,0,0,0.85);
  border:1px solid rgba(0,212,255,0.4); border-radius:8px;
  color:#00d4ff; font-size:0.85em; pointer-events:none;
  display:none; z-index:20;
}

/* Result screen */
#result-screen {
  position:fixed; inset:0; z-index:1000;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,0.85); backdrop-filter:blur(10px);
}
.result-content {
  text-align:center; padding:40px; max-width:500px;
  background:rgba(10,20,40,0.95); border-radius:16px;
  border:1px solid rgba(0,212,255,0.2);
}
.result-content h2 { color:#00d4ff; margin-bottom:20px; }
.result-content button {
  margin:10px; padding:12px 28px;
  background:linear-gradient(135deg,#00d4ff,#0099cc); color:#fff;
  border:none; border-radius:8px; cursor:pointer; font-weight:600;
}