/* JEE-style NEET mock exam interface */

body.neet-exam-mode{
  overflow:hidden;
  height:100vh;
  height:100dvh;
}
body.neet-exam-mode .neet-shell{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
body.neet-exam-mode .neet-foot{ display:none; }
body.neet-exam-mode .neet-topbar{
  padding:8px 14px;
  flex-shrink:0;
}
body.neet-exam-mode .neet-nav{ display:none; }
body.neet-exam-mode .neet-main{
  flex:1;
  min-height:0;
  overflow:hidden;
  padding:8px 10px 10px;
  max-width:none;
  display:flex;
  flex-direction:column;
}

.jee-exam{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  height:100%;
  overflow:hidden;
  gap:0;
}

.jee-top{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  flex-shrink:0;
  padding:10px 16px; border-radius:12px 12px 0 0;
  background:linear-gradient(90deg,rgba(107,44,174,.35),rgba(16,8,38,.95));
  border:1px solid rgba(245,180,0,.25); border-bottom:none;
}
.jee-top-brand{ font-weight:900; font-size:.85rem; color:var(--gold,#f5b400); }
.jee-subject-tabs{ display:flex; gap:6px; flex-wrap:wrap; }
.jee-subj-tab{
  padding:8px 16px; border-radius:8px; border:1px solid rgba(255,255,255,.15);
  background:rgba(0,0,0,.2); color:#fff; font-weight:800; font-size:.82rem; cursor:pointer;
  transition:background .15s, border-color .15s;
}
.jee-subj-tab.active{
  border-color:var(--gold,#f5b400); background:rgba(245,180,0,.18); color:var(--gold,#f5b400);
}
.jee-timer{
  font-weight:900; font-size:1.1rem; color:#fff;
  padding:6px 14px; border-radius:8px; background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.12); font-variant-numeric:tabular-nums;
}

.jee-body{
  display:grid;
  grid-template-columns:1fr 280px;
  flex:1;
  min-height:0;
  overflow:hidden;
  align-items:stretch;
}
@media(max-width:900px){
  body.neet-exam-mode{ overflow:auto; height:auto; }
  body.neet-exam-mode .neet-shell{ height:auto; overflow:visible; }
  body.neet-exam-mode .neet-main{ overflow:visible; flex:none; }
  .jee-exam{ height:auto; overflow:visible; flex:none; }
  .jee-body{ grid-template-columns:1fr; overflow:visible; flex:none; }
}

.jee-question-panel{
  padding:18px 20px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(16,8,38,.65);
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
}
.jee-q-meta{
  display:flex; flex-wrap:wrap; gap:12px; font-size:.82rem; color:rgba(255,255,255,.6);
  margin-bottom:14px; padding-bottom:12px; border-bottom:1px solid rgba(255,255,255,.08);
}
.jee-q-meta strong{ color:var(--gold,#f5b400); }
.jee-q-stem{ font-size:1.02rem; line-height:1.55; margin:0 0 18px; font-weight:600; }
.jee-options{ display:flex; flex-direction:column; gap:10px; }
.jee-opt{
  display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border-radius:12px;
  border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.03);
  cursor:pointer; transition:border-color .15s, background .15s;
}
.jee-opt:hover{ border-color:rgba(245,180,0,.35); background:rgba(245,180,0,.06); }
.jee-opt.selected{ border-color:var(--gold,#f5b400); background:rgba(245,180,0,.12); }
.jee-opt input{ margin-top:3px; accent-color:var(--gold,#f5b400); }

.jee-actions{
  display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
}
.jee-btn{
  padding:10px 16px; border-radius:10px; border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.06); color:#fff; font-weight:800; font-size:.82rem; cursor:pointer;
}
.jee-btn-primary{
  background:linear-gradient(135deg,#f5b400,#e0a010); color:#1a0a2e; border-color:rgba(255,255,255,.2);
}
.jee-btn-mark{ border-color:rgba(167,139,250,.5); color:#c4b5fd; }
.jee-btn-danger{ border-color:rgba(248,113,113,.4); color:#fca5a5; }

/* Sidebar: fixed height, only .jee-palette-scroll scrolls */
.jee-palette-panel{
  padding:0;
  border:1px solid rgba(255,255,255,.1);
  border-left:none;
  background:rgba(10,6,24,.9);
  display:flex;
  flex-direction:column;
  min-height:0;
  height:100%;
  max-height:100%;
  overflow:hidden;
}
@media(max-width:900px){
  .jee-palette-panel{
    border-left:1px solid rgba(255,255,255,.1);
    height:auto;
    max-height:360px;
  }
}

.jee-palette-legend{
  flex-shrink:0;
  padding:12px 14px 8px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.jee-palette-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:8px 14px;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.jee-palette-scroll::-webkit-scrollbar{ width:6px; }
.jee-palette-scroll::-webkit-scrollbar-track{
  background:rgba(255,255,255,.04);
  border-radius:6px;
}
.jee-palette-scroll::-webkit-scrollbar-thumb{
  background:rgba(245,180,0,.45);
  border-radius:6px;
}
.jee-palette-footer{
  flex-shrink:0;
  padding:10px 14px 14px;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(10,6,24,.95);
}

.jee-legend{ margin-bottom:0; }
.jee-legend-title{ font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.5); margin-bottom:8px; }
.jee-legend-row{ display:flex; flex-wrap:wrap; gap:8px 12px; font-size:.68rem; color:rgba(255,255,255,.65); }
.jee-legend-dot{ width:12px; height:12px; border-radius:3px; display:inline-block; vertical-align:middle; margin-right:4px; }

.jee-palette-section{ margin-bottom:14px; }
.jee-palette-section h4{
  margin:0 0 8px; font-size:.72rem; font-weight:800; text-transform:uppercase;
  letter-spacing:.06em; color:var(--gold,#f5b400);
}
.jee-palette-grid{ display:flex; flex-wrap:wrap; gap:6px; }
.jee-pal-btn{
  width:34px; height:34px; border-radius:8px; border:2px solid transparent;
  font-weight:900; font-size:.78rem; cursor:pointer; color:#fff;
  transition:transform .1s, box-shadow .1s;
}
.jee-pal-btn:hover{ transform:scale(1.08); }
.jee-pal-btn.current{ box-shadow:0 0 0 2px #fff, 0 0 12px rgba(245,180,0,.6); }
.jee-pal-btn.st-answered{ background:#16a34a; border-color:#22c55e; }
.jee-pal-btn.st-marked_answered{ background:#7c3aed; border-color:#a78bfa; }
.jee-pal-btn.st-marked{ background:#6d28d9; border-color:#8b5cf6; }
.jee-pal-btn.st-not_answered{ background:#dc2626; border-color:#f87171; }
.jee-pal-btn.st-not_visited{ background:#475569; border-color:#64748b; color:rgba(255,255,255,.7); }

.jee-summary{
  font-size:.75rem; line-height:1.6; color:rgba(255,255,255,.55);
  margin-bottom:10px;
}
.jee-submit-wrap{ margin-top:0; }
.jee-submit-wrap .jee-btn-primary{ width:100%; padding:12px; font-size:.9rem; }

/* Overlays & submit confirm modal */
.jee-overlay{
  position:fixed; inset:0; z-index:10000;
  display:flex; align-items:center; justify-content:center;
  background:rgba(8,4,22,.78); backdrop-filter:blur(8px);
  padding:20px;
}
.jee-overlay[hidden]{ display:none !important; }

.jee-overlay-card{
  padding:32px 40px; border-radius:20px; text-align:center; max-width:90vw;
  border:1px solid rgba(245,180,0,.38);
  background:linear-gradient(165deg,rgba(44,28,82,.96),rgba(16,10,34,.98));
  box-shadow:0 24px 60px rgba(0,0,0,.55);
}
.jee-overlay-spinner{
  width:40px; height:40px; margin:0 auto 16px; border-radius:50%;
  border:3px solid rgba(255,255,255,.15); border-top-color:#f5b400;
  animation:jee-spin .75s linear infinite;
}
@keyframes jee-spin{ to{ transform:rotate(360deg); } }
.jee-overlay-msg{ margin:0; font-weight:800; font-size:1.05rem; color:#f5d78a; }

.jee-modal-card{
  width:min(420px,100%); padding:28px 26px; border-radius:18px; text-align:center;
  border:1px solid rgba(245,180,0,.42);
  background:linear-gradient(165deg,rgba(44,28,82,.98),rgba(16,10,34,.98));
  box-shadow:0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.jee-modal-card h3{
  margin:0 0 10px; font-size:1.2rem; font-weight:900; color:var(--gold,#f5b400);
}
.jee-modal-card p{
  margin:0 0 22px; font-size:.92rem; line-height:1.5; color:rgba(255,255,255,.75);
}
.jee-modal-warn{
  display:inline-block; margin-bottom:14px; padding:8px 14px; border-radius:10px;
  font-size:.78rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
  color:#fecaca; background:rgba(220,38,38,.15); border:1px solid rgba(248,113,113,.35);
}
.jee-modal-actions{
  display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
}
.jee-modal-actions .jee-btn{ min-width:130px; }
