
    @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
    body { font-family: 'Poppins', sans-serif; }

    /* ===== DARK MODE (default) ===== */
    :root {
      --bg-main: #020617;
      --bg-card: rgba(30, 41, 59, 0.7);
      --bg-header: rgba(15, 23, 42, 0.85);
      --border-col: rgba(51, 65, 85, 0.8);
      --text-main: #f8fafc;
      --text-muted: #94a3b8;
      --input-bg: rgba(2, 6, 23, 0.6);
      --input-border: #1e293b;
      --footer-bg: #020617;
    }

    /* ===== LIGHT MODE ===== */
    html.light {
      --bg-main: #f1f5f9;
      --bg-card: rgba(255, 255, 255, 0.92);
      --bg-header: rgba(255, 255, 255, 0.98);
      --border-col: rgba(148, 163, 184, 0.8);
      --text-main: #0f172a;
      --text-muted: #475569;
      --input-bg: rgba(255, 255, 255, 0.8);
      --input-border: #94a3b8;
      --footer-bg: #e2e8f0;
    }

    html.light body {
      background-color: var(--bg-main) !important;
      color: var(--text-main) !important;
    }
    html.light #loginScreen {
      background: linear-gradient(135deg, #e2e8f0 0%, #c7d2fe 100%) !important;
    }
    #loginScreen{
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      align-items: flex-start !important;
    }
    #loginScreen .login-card{ margin: auto 0; }
    html.lg-locked, html.lg-locked body{ overflow: hidden !important; height: 100% !important; }
    html.light .login-card {
      background: rgba(255,255,255,0.92) !important;
      border-color: rgba(199,210,254,0.6) !important;
      box-shadow: 0 25px 50px rgba(99,102,241,0.15) !important;
    }
    html.light header {
      background: var(--bg-header) !important;
      border-color: var(--border-col) !important;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    }
    /* Header title — dark text instead of pale gradient */
    html.light header span.bg-clip-text {
      background: none !important;
      -webkit-background-clip: unset !important;
      -webkit-text-fill-color: #1e293b !important;
      color: #1e293b !important;
    }
    html.light .content-card {
      background: rgba(255,255,255,0.85) !important;
      border-color: var(--border-col) !important;
    }
    html.light .text-slate-300 { color: #1e293b !important; }
    html.light .text-slate-400 { color: #334155 !important; }
    html.light .text-slate-500 { color: #475569 !important; }
    html.light .text-slate-600 { color: #475569 !important; }
    html.light .text-slate-200 { color: #0f172a !important; }
    html.light .text-slate-100 { color: #0f172a !important; }
    /* Cards */
    html.light .bg-slate-900\/40,
    html.light .bg-slate-900\/20 {
      background: rgba(255,255,255,0.9) !important;
      border-color: #94a3b8 !important;
    }
    html.light .bg-slate-900\/60 { background: rgba(255,255,255,0.95) !important; }
    html.light .border-slate-900,
    html.light .border-slate-900\/60 { border-color: #94a3b8 !important; }
    html.light .border-slate-800 { border-color: #94a3b8 !important; }
    html.light .bg-slate-900 { background: #ffffff !important; }
    html.light .bg-slate-950 { background: #f1f5f9 !important; }
    html.light .bg-slate-950\/40 { background: rgba(241,245,249,0.8) !important; }
    html.light footer { background: var(--footer-bg) !important; border-color: var(--border-col) !important; }
    /* Header buttons */
    html.light header button {
      background: #ffffff !important;
      border-color: #94a3b8 !important;
      color: #334155 !important;
    }
    html.light header button:hover { background: #f1f5f9 !important; }

    .field-label {
      color: #818cf8;
      font-weight: 700;
      letter-spacing: 0.07em;
    }
    html.light .field-label { color: #4338ca !important; }
    html:not(.light) #wordExportModal input,
    html:not(.light) #wordExportModal textarea {
      background: rgba(51, 65, 85, 0.35) !important;
    }
    html.light #wordExportModal input,
    html.light #wordExportModal textarea {
      background: rgba(255, 255, 255, 0.9) !important;
      color: #0f172a !important;
      border-color: #94a3b8 !important;
    }
    html.light #wordExportModal input::placeholder,
    html.light #wordExportModal textarea::placeholder {
      color: #64748b !important;
    }
    /* ===== LIGHT MODE — सबै Modal Card हरू (Word Export, API Key, आदि) ===== */
    html.light .modal-overlay > div {
      background: rgba(255, 255, 255, 0.97) !important;
      border-color: rgba(148, 163, 184, 0.6) !important;
      box-shadow: 0 25px 50px rgba(99, 102, 241, 0.12) !important;
    }
    html.light .bg-slate-950\/50 { background: rgba(241, 245, 249, 0.9) !important; }
    html.light .bg-slate-900\/90 { background: rgba(255, 255, 255, 0.97) !important; }

    /* ===== SECTION HEADINGS — स्पष्ट र मिलेको देखिनको लागि ===== */
    .panel-heading {
      position: relative;
      letter-spacing: 0.06em;
      padding-left: 0.7rem;
      border-left: 3px solid #6366f1;
      line-height: 1.3;
    }
    html.light .panel-heading {
      color: #1e293b !important;
      border-left-color: #4f46e5;
    }

    /* ===== LIGHT MODE — थप स्पष्टता (status badges, links, muted text) ===== */
    html.light .text-slate-700 { color: #334155 !important; }
    html.light .text-indigo-300 { color: #4338ca !important; }
    html.light #statusIndicator { background: rgba(99,102,241,0.08) !important; border-color: rgba(99,102,241,0.25) !important; }
    html.light .placeholder-slate-600::placeholder { color: #64748b !important; }
    html.light .bg-slate-800 { background: #e2e8f0 !important; }
    html.light .bg-slate-800\/80 { background: rgba(226,232,240,0.9) !important; }
    html.light body, html.light .content-card, html.light #appScreen { -webkit-font-smoothing: antialiased; }

    /* Modal overlay */
    .modal-overlay {
      display: none;
      position: fixed; inset: 0; z-index: 100;
      background: rgba(2, 6, 23, 0.75);
      backdrop-filter: blur(4px);
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }
    .modal-overlay.active { display: flex; }

    /* Security shake animation */
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-6px); }
      40%, 80% { transform: translateX(6px); }
    }
    .shake { animation: shake 0.4s ease; }

    /* Session warning pulse */
    @keyframes pulse-border {
      0%, 100% { border-color: rgba(239,68,68,0.3); }
      50% { border-color: rgba(239,68,68,0.8); }
    }

    /* ===== TOAST NOTIFICATION ===== */
    #toastContainer {
      position: fixed;
      bottom: 1.5rem;
      right: 1.5rem;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      pointer-events: none;
    }
    .toast {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.65rem 1rem;
      border-radius: 0.75rem;
      font-size: 0.8rem;
      font-weight: 500;
      backdrop-filter: blur(8px);
      border: 1px solid;
      box-shadow: 0 8px 24px rgba(0,0,0,0.3);
      pointer-events: auto;
      animation: toastIn 0.3s ease forwards;
      max-width: 320px;
    }
    .toast.success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #6ee7b7; }
    .toast.error   { background: rgba(239,68,68,0.15);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
    .toast.info    { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); color: #a5b4fc; }
    .toast.warning { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
    .toast.out { animation: toastOut 0.3s ease forwards; }
    @keyframes toastIn  { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }
    @keyframes toastOut { from { opacity:1; transform: translateY(0); } to { opacity:0; transform: translateY(12px); } }

    html.light .toast.success { background: rgba(16,185,129,0.12); color: #059669; }
    html.light .toast.info    { background: rgba(99,102,241,0.12);  color: #4f46e5; }
    html.light .toast.warning { background: rgba(245,158,11,0.12);  color: #d97706; }
    html.light .toast.error   { background: rgba(239,68,68,0.12);   color: #dc2626; }

    /* ===== TRANSCRIPT SEARCH HIGHLIGHT ===== */
    mark.search-hl {
      background: rgba(234,179,8,0.35);
      color: inherit;
      border-radius: 2px;
      padding: 0 1px;
    }
    mark.search-hl.current {
      background: rgba(234,179,8,0.7);
      outline: 1px solid #eab308;
    }

    /* ===== EDITABLE TRANSCRIPT ===== */
    .transcript-editable {
      outline: none;
      cursor: text;
    }
    .transcript-editable:focus {
      box-shadow: 0 0 0 2px rgba(99,102,241,0.4);
      border-radius: 0.75rem;
    }
    .unclear-marker { color: #ef4444; font-weight: 700; font-family: 'Kalimati', serif; }
    /* ===== AUDIO-TRANSCRIPT SYNC (play गर्दा शब्द-शब्द highlight) ===== */
    .sync-word {
      transition: background-color 0.15s ease, box-shadow 0.15s ease;
      border-radius: 3px;
      padding: 0 1px;
    }
    .sync-word.sync-active {
      background: rgba(16, 185, 129, 0.45) !important;
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.55) !important;
      color: #ecfdf5 !important;
    }
    html.light .sync-word.sync-active {
      background: rgba(5, 150, 105, 0.35) !important;
      box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.5) !important;
      color: #022c22 !important;
    }
    #syncToggleBtn.active {
      background: rgba(99,102,241,0.25) !important;
      color: #a5b4fc !important;
      border-color: rgba(99,102,241,0.5) !important;
    }
    .flash-highlight {
      background: rgba(239,68,68,0.35) !important;
      border-radius: 4px;
      box-shadow: 0 0 0 3px rgba(239,68,68,0.25);
      transition: background 0.4s ease, box-shadow 0.4s ease;
    }
    #unclearPopover {
      position: absolute;
      z-index: 100;
      background: #1e293b;
      border: 1px solid #334155;
      border-radius: 0.75rem;
      padding: 0.75rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
      flex-wrap: wrap;
    }
  