/* ===== Page spacing + max width ===== */
body.steno-exam-page .steno-main{
  padding: 6px 6px !important;  /* side gap कम */
}

body.steno-exam-page .steno-card{
  max-width: 100% !important;   /* full width so panel right edge tak ja sake */
  margin: 0 !important;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ===== Layout proportions =====
   - typing area expands more
   - right panel stays on extreme right
*/

body.steno-exam-page .steno-layout{
  display: grid !important;
  width: 120% !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);

  /* Right panel ke liye fix column */
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 4px;
  align-items: start; /* Grid ke liye 'start' sahi hai */
}

/* Steno typing box height increase */
#steno-text{
  min-height: 78vh;   /* height increase (change 78 to 85 if you want more) */
}
/* Control panel ko thoda upar shift */
#exam-panel{
  margin-top: -87px;   /* -8px, -12px, -16px try */
}

body.steno-exam-page .steno-editor-col{ 
  min-width: 0; 
}

/* panel ko extreme right push + fixed width */
body.steno-exam-page .exam-panel{ 
  justify-self: end !important;
  width: 300px !important;
}

/* ===========================
   BOX 1: TOP STRIP (dark gradient + noise)
   =========================== */
body.steno-exam-page .exam-topstrip{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.10);

  background: linear-gradient(135deg, #101827 0%, #111b2e 50%, #0c1220 100%);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body.steno-exam-page .exam-topstrip::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(540px 190px at 15% 0%, rgba(56,189,248,0.22), transparent 60%),
    radial-gradient(600px 240px at 88% 70%, rgba(99,102,241,0.16), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 7px);
  opacity: 0.85;
  filter: blur(0.2px);
}

body.steno-exam-page .exam-topstrip,
body.steno-exam-page .exam-topstrip *{
  color: #eaf2ff;
  position: relative;
  z-index: 1;
}

body.steno-exam-page #exam-font-display{
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

body.steno-exam-page .meta-row{
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(234,242,255,0.80);
}

body.steno-exam-page .timer-wrap{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

body.steno-exam-page .timer-label{
  font-size: 12px;
  font-weight: 700;
  color: rgba(234,242,255,0.82);
}

body.steno-exam-page .timer-value{
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

body.steno-exam-page .timer-status{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  font-weight: 800;
  color: rgba(234,242,255,0.92);
}

/* ===========================
   Typing Notepad (bigger size)
   =========================== */
body.steno-exam-page .notepad-wrap{
  position: relative;
  margin-top: 12px;
}

body.steno-exam-page textarea.notepad{
  width: 100%;

  /* FIX: Height per window (vh) so white box feels full height) */
  min-height: calc(100vh - 240px);

  resize: vertical;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 16px;

  padding: 28px 28px;
  outline: none;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

body.steno-exam-page textarea.notepad:focus{
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.14);
}

/* lock overlay */
body.steno-exam-page .editor-lock{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.72);
  border-radius: 16px;
  z-index: 5;
  backdrop-filter: blur(2px);
}

body.steno-exam-page .lock-card{
  width: min(560px, 92%);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  padding: 16px 16px;
}

/* ===========================
   Left buttons
   =========================== */
body.steno-exam-page .exam-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

body.steno-exam-page .btn-exam{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

body.steno-exam-page .btn-exam.primary{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

body.steno-exam-page .btn-exam.ghost{
  background: rgba(255,255,255,0.9);
}

body.steno-exam-page .btn-exam:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

/* Better rendering */
body.steno-exam-page textarea.notepad{
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Hindi on-screen zoom only (visual) */
body.steno-exam-page textarea.notepad.hindi-zoom{
  --zoom: 1.25; /* 1.10–1.50 tak apni pasand set karo */
  transform: scale(var(--zoom));
  transform-origin: top left;

  /* Scale ke baad bhi box container me fit rahe */
  width: calc(100% / var(--zoom));
  min-height: calc(var(--noteH, 760px) / var(--zoom));
}

/* Print/Export: zoom hata do, paper size same rahe */
@media print{
  body.steno-exam-page textarea.notepad.hindi-zoom{
    transform: none !important;
    width: 100% !important;
    min-height: var(--noteH, 760px) !important;
  }
}



/* ===========================
   BOX 2: RIGHT PANEL (dark gradient + noise)
   height is synced by JS to match left block height
   =========================== */
body.steno-exam-page .exam-panel{
  position: sticky;
  top: 88px;

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;

  background: linear-gradient(135deg, #101827 0%, #111b2e 50%, #0c1220 100%);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  height: var(--panelH, 980px);
  display: flex;
  flex-direction: column;
}

body.steno-exam-page .exam-panel::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(520px 200px at 20% 10%, rgba(56,189,248,0.18), transparent 60%),
    radial-gradient(560px 240px at 90% 60%, rgba(99,102,241,0.12), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 7px);
  opacity: 0.85;
  filter: blur(0.2px);
}

body.steno-exam-page .exam-panel,
body.steno-exam-page .exam-panel *{
  color: #eaf2ff;
  position: relative;
  z-index: 1;
}

body.steno-exam-page .panel-body{
  padding: 14px;
  overflow: auto;
  flex: 1;
}

body.steno-exam-page .panel-footer{
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

body.steno-exam-page .panel-footnote{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(234,242,255,0.72);
}

body.steno-exam-page .steno-panel-title{
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

body.steno-exam-page .steno-panel-sub{
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(234,242,255,0.80);
}

body.steno-exam-page .control-group{
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

body.steno-exam-page .control-group label{
  font-size: 13px;
  font-weight: 800;
}

body.steno-exam-page .test-select,
body.steno-exam-page .test-input{
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: #eaf2ff;
  outline: none;
}

body.steno-exam-page .test-select option{
  color: #0f172a; /* dropdown readable */
}

body.steno-exam-page .hint{
  font-size: 12px;
  color: rgba(234,242,255,0.72);
}

body.steno-exam-page .rules-box{
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(234,242,255,0.88);
}

/* ===========================
   BOX 3: RESULT (full width + bigger)
   =========================== */
body.steno-exam-page .result-section{
  margin-top: 16px;
  padding: 18px;                 /* bigger */
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;

  background: linear-gradient(135deg, #101827 0%, #111b2e 50%, #0c1220 100%);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  position: relative;
}

body.steno-exam-page .result-section::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(620px 240px at 25% 0%, rgba(56,189,248,0.16), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 7px);
  opacity: 0.85;
  filter: blur(0.2px);
}

body.steno-exam-page .result-section,
body.steno-exam-page .result-section *{
  color: #eaf2ff;
  position: relative;
  z-index: 1;
}

body.steno-exam-page .result-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}

body.steno-exam-page .result-title{
  margin: 0;
  font-weight: 900;
  font-size: 18px;
}

body.steno-exam-page .diff-title{
  margin-top: 14px;
  font-weight: 900;
  font-size: 14px;
}

body.steno-exam-page .diff-output{
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  line-height: 1.9;
  word-break: break-word;
  font-size: 16px; /* bigger result text */
}

/* Highlight for dark bg */
body.steno-exam-page .w-wrong{ color: #fb7185; font-weight: 900; }
body.steno-exam-page .w-missing{ color: #fb7185; text-decoration: underline; text-decoration-thickness: 2px; }
body.steno-exam-page .w-extra{ color: #fb7185; text-decoration: line-through; text-decoration-thickness: 2px; }
body.steno-exam-page .w-suggest{ color: #60a5fa; margin-left: 6px; font-weight: 800; }

/* Feedback - high contrast, always visible */
body.steno-exam-page .feedback-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #111827;
  color: #ffffff;
  font-weight: 900;
}
/* ===== FIX: Ghost buttons readable (Reset etc.) ===== */
body.steno-exam-page .btn-exam.ghost{
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  color: #111827 !important;              /* ✅ text dark */
  font-weight: 900 !important;
}

body.steno-exam-page .btn-exam.ghost:hover{
  background: rgba(255,255,255,0.98) !important;
}

/* Extra: specifically ensure Reset always visible */
body.steno-exam-page #btn-reset{
  color: #111827 !important;
}
/* Result box under typing (left column) */
body.steno-exam-page #left-col #result-section{
  width: 100%;
  margin-top: 14px;
}
/* ===== Hindi typing visible size increase (screen only) ===== */
body.steno-exam-page textarea.notepad.hindi-view{
  font-size: var(--hindiViewSize, 30pt) !important; /* 18pt recommended */
  line-height: 1.6 !important;
}
/* ===== Fix: Typing Locked overlay text visible on white card ===== */
body.steno-exam-page .editor-lock .lock-card,
body.steno-exam-page .editor-lock .lock-card *{
  color: #111827 !important;   /* dark text */
}

body.steno-exam-page .editor-lock .lock-title{
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 6px;
}

body.steno-exam-page .editor-lock .lock-subtitle{
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(17,24,39,0.85) !important;
}
/* ==== Multiple / Random lesson checkbox grid ==== */
body.steno-exam-page #lesson-checkbox-group {
  margin-top: 6px;
}

body.steno-exam-page #lesson-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
}

body.steno-exam-page .lesson-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(15,23,42,0.6);
}

body.steno-exam-page .lesson-checkbox-item input[type="checkbox"] {
  accent-color: #2563eb;
}

body.steno-exam-page .lesson-checkbox-item span {
  flex: 1;
  line-height: 1.3;
}