      :root {
        --bg: #0d0d14;
        --surface: #16161f;
        --s2: #1e1e2a;
        --brd: #2a2a3a;
        --acc: #6c63ff;
        --acc2: #ff6584;
        --grn: #22c55e;
        --red: #ef4444;
        --txt: #e8e8f0;
        --mut: #7878a0;
        --card: #1a1a26;
        --hov: #22223a;
      }
      .lm {
        --bg: #f4f4fb;
        --surface: #fff;
        --s2: #eeeef8;
        --brd: #d0d0e8;
        --acc: #5b52e8;
        --acc2: #e8506d;
        --grn: #16a34a;
        --red: #dc2626;
        --txt: #1a1a2e;
        --mut: #6060a0;
        --card: #fff;
        --hov: #ebebf8;
      }
      *,
      *::before,
      *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
      body {
        font-family: "DM Sans", sans-serif;
        background: var(--bg);
        color: var(--txt);
        min-height: 100vh;
        transition:
          background 0.3s,
          color 0.3s;
      }
      button {
        cursor: pointer;
        font-family: "DM Sans", sans-serif;
      }

      /* NAV */
      .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1.25rem;
        background: var(--surface);
        border-bottom: 1px solid var(--brd);
      }
      .nav-brand {
        font-family: "Unbounded", sans-serif;
        font-weight: 800;
        font-size: 0.95rem;
        background: linear-gradient(135deg, var(--acc), var(--acc2));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }
      .nav-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
      }

      /* Orqaga tugma */
      .back-btn {
        width: 36px;
        height: 36px;
        border: 1px solid var(--brd);
        border-radius: 9px;
        background: var(--s2);
        color: var(--txt);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        flex-shrink: 0;
      }
      .back-btn:hover {
        background: var(--hov);
        border-color: var(--acc);
        color: var(--acc);
      }
      #back-btn[style*="none"] {
        display: none !important;
      }

      .nav-tabs {
        display: flex;
        gap: 3px;
        background: var(--s2);
        border-radius: 11px;
        padding: 3px;
      }
      .nt {
        padding: 6px 18px;
        border: none;
        border-radius: 8px;
        font-size: 0.82rem;
        font-weight: 600;
        background: transparent;
        color: var(--mut);
        transition: all 0.2s;
      }
      .nt.on {
        background: var(--acc);
        color: #fff;
        box-shadow: 0 2px 10px rgba(108, 99, 255, 0.4);
      }
      .nt:not(.on):hover {
        background: var(--hov);
        color: var(--txt);
      }
      .tbtn {
        width: 36px;
        height: 36px;
        border: 1px solid var(--brd);
        border-radius: 9px;
        background: var(--s2);
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        color: var(--txt);
      }
      .tbtn:hover {
        background: var(--hov);
      }

      /* PAGES */
      .main {
        padding-top: 56px;
      }
      .pg {
        display: none;
      }
      .pg.on {
        display: block;
      }

      /* WRAPPER */
      .wrap {
        max-width: 860px;
        margin: 0 auto;
        padding: 2.5rem 1.5rem;
      }
      .wrap-q {
        max-width: 700px;
        margin: 0 auto;
        padding: 1.5rem;
      }

      /* HEADER */
      .hdr {
        text-align: center;
        margin-bottom: 2.5rem;
        animation: fadeUp 0.4s ease;
      }
      .hdr h1 {
        font-family: "Unbounded", sans-serif;
        font-size: clamp(1.3rem, 3.5vw, 1.9rem);
        font-weight: 800;
        margin-bottom: 0.55rem;
        line-height: 1.2;
      }
      .hdr p {
        color: var(--mut);
        font-size: 0.88rem;
      }

      /* SUBJECT GRID */
      .sgrid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
        gap: 0.9rem;
        margin-bottom: 1.6rem;
      }
      .scard {
        background: var(--card);
        border: 1.5px solid var(--brd);
        border-radius: 15px;
        padding: 1.3rem;
        text-align: left;
        transition: all 0.25s;
        position: relative;
        overflow: hidden;
      }
      .scard::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--acc), var(--acc2));
        opacity: 0;
        transition: opacity 0.25s;
      }
      .scard:hover {
        border-color: var(--acc);
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(108, 99, 255, 0.14);
      }
      .scard:hover::before,
      .scard.sel::before {
        opacity: 1;
      }
      .scard.sel {
        border-color: var(--acc);
        background: var(--hov);
      }
      .si {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
      }
      .sn {
        font-weight: 600;
        font-size: 0.86rem;
        margin-bottom: 0.25rem;
      }
      .sc {
        color: var(--mut);
        font-size: 0.76rem;
      }

      /* SHUFFLE */
      .shuf-row {
        display: flex;
        justify-content: center;
        margin-bottom: 1.4rem;
      }
      .shuf {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        padding: 6px 16px;
        border: 1.5px solid var(--brd);
        border-radius: 30px;
        background: var(--s2);
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--mut);
        transition: all 0.2s;
      }
      .shuf.on {
        border-color: var(--acc);
        color: var(--acc);
        background: rgba(108, 99, 255, 0.1);
      }
      .shuf:hover {
        border-color: var(--acc);
        color: var(--acc);
      }

      /* PROGRESS */
      .qtop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.1rem;
        gap: 0.5rem;
      }
      .stag {
        font-size: 0.71rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        padding: 3px 11px;
        border-radius: 20px;
        background: var(--s2);
        color: var(--acc);
        border: 1px solid var(--brd);
      }
      .ptxt {
        color: var(--mut);
        font-size: 0.8rem;
        font-weight: 500;
      }
      .pbar {
        height: 5px;
        background: var(--s2);
        border-radius: 3px;
        margin-bottom: 1.4rem;
        overflow: hidden;
      }
      .pbar-f {
        height: 100%;
        border-radius: 3px;
        background: linear-gradient(90deg, var(--acc), var(--acc2));
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      }

      /* QUESTION */
      .qcard {
        background: var(--card);
        border: 1px solid var(--brd);
        border-radius: 16px;
        padding: 1.6rem;
        margin-bottom: 1rem;
        animation: fadeUp 0.3s ease;
      }
      .qnum {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--acc);
        margin-bottom: 0.55rem;
      }
      .qtxt {
        font-size: 0.97rem;
        font-weight: 500;
        line-height: 1.65;
        color: var(--txt);
      }

      /* OPTIONS */
      .opts {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
      }
      .opt {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
        border: 1.5px solid var(--brd);
        border-radius: 12px;
        background: var(--s2);
        text-align: left;
        font-size: 0.88rem;
        color: var(--txt);
        line-height: 1.5;
        transition: all 0.18s;
        width: 100%;
      }
      .opt:hover:not(.done) {
        border-color: var(--acc);
        background: var(--hov);
      }
      .olet {
        min-width: 25px;
        height: 25px;
        border-radius: 6px;
        background: var(--brd);
        color: var(--mut);
        font-size: 0.74rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 1px;
        transition:
          background 0.35s ease,
          color 0.35s ease;
      }
      .opt:hover:not(.done) .olet {
        background: var(--acc);
        color: #fff;
      }
      .opt.cor {
        border-color: var(--grn);
        background: rgba(34, 197, 94, 0.1);
        animation: flashGreen 0.5s ease forwards;
      }
      .opt.cor .olet {
        background: var(--grn);
        color: #fff;
        transition: background 0.4s ease 0.1s;
      }
      .opt.wrn {
        border-color: var(--red);
        background: rgba(239, 68, 68, 0.08);
        animation: flashRed 0.5s ease forwards;
      }
      .opt.wrn .olet {
        background: var(--red);
        color: #fff;
        transition: background 0.4s ease 0.1s;
      }
      @keyframes flashGreen {
        0% {
          border-color: var(--brd);
          background: var(--s2);
        }
        60% {
          border-color: var(--grn);
          background: rgba(34, 197, 94, 0.18);
        }
        100% {
          border-color: var(--grn);
          background: rgba(34, 197, 94, 0.1);
        }
      }
      @keyframes flashRed {
        0% {
          border-color: var(--brd);
          background: var(--s2);
        }
        60% {
          border-color: var(--red);
          background: rgba(239, 68, 68, 0.15);
        }
        100% {
          border-color: var(--red);
          background: rgba(239, 68, 68, 0.08);
        }
      }
      .opt.done {
        cursor: default;
      }

      /* FEEDBACK */
      .fb {
        display: none;
        padding: 0.75rem 1rem;
        border-radius: 10px;
        font-size: 0.85rem;
        font-weight: 500;
        align-items: center;
        gap: 0.45rem;
        margin-top: 0.8rem;
        animation: fadeUp 0.3s ease;
      }
      .fb.show {
        display: flex;
      }
      .fb.cfb {
        background: rgba(34, 197, 94, 0.12);
        border: 1px solid rgba(34, 197, 94, 0.3);
        color: var(--grn);
      }
      .fb.wfb {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.25);
        color: var(--red);
      }

      /* NAV BUTTONS (pastda) */
      .nav-btns-bot {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin-top: 1.1rem;
      }
      .nbtn {
        padding: 9px 22px;
        border: 1.5px solid var(--brd);
        border-radius: 10px;
        background: var(--s2);
        color: var(--txt);
        font-size: 0.85rem;
        font-weight: 600;
        transition: all 0.2s;
      }
      .nbtn:hover:not(:disabled) {
        background: var(--hov);
        border-color: var(--acc);
        color: var(--acc);
      }
      .nbtn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
      }
      .nbtn.primary {
        background: linear-gradient(135deg, var(--acc), #8b83ff);
        color: #fff;
        border-color: transparent;
        box-shadow: 0 3px 14px rgba(108, 99, 255, 0.3);
      }
      .nbtn.primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 5px 20px rgba(108, 99, 255, 0.4);
      }

      /* BUTTONS */
      .btn1 {
        padding: 11px 28px;
        border: none;
        border-radius: 11px;
        background: linear-gradient(135deg, var(--acc), #8b83ff);
        color: #fff;
        font-size: 0.91rem;
        font-weight: 600;
        transition: all 0.2s;
        box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
      }
      .btn1:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(108, 99, 255, 0.4);
      }
      .btn2 {
        padding: 11px 24px;
        border: 1.5px solid var(--brd);
        border-radius: 11px;
        background: var(--s2);
        color: var(--txt);
        font-size: 0.91rem;
        font-weight: 600;
        transition: all 0.2s;
      }
      .btn2:hover {
        border-color: var(--acc);
        color: var(--acc);
      }
      .btnrow {
        display: flex;
        gap: 0.65rem;
        flex-wrap: wrap;
        justify-content: center;
      }

      /* SCORE */
      .sscreen {
        max-width: 460px;
        margin: 0 auto;
        padding: 2.5rem 1.5rem;
        text-align: center;
        animation: fadeUp 0.5s ease;
      }
      .scirc {
        width: 145px;
        height: 145px;
        border-radius: 50%;
        background: conic-gradient(var(--acc) var(--pct, 0%), var(--s2) 0);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1.75rem;
        box-shadow: 0 0 36px rgba(108, 99, 255, 0.22);
      }
      .sci {
        width: 118px;
        height: 118px;
        border-radius: 50%;
        background: var(--bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
      }
      .snum {
        font-family: "Unbounded", sans-serif;
        font-size: 1.75rem;
        font-weight: 800;
      }
      .slbl {
        font-size: 0.68rem;
        color: var(--mut);
        margin-top: 2px;
      }
      .stitle {
        font-family: "Unbounded", sans-serif;
        font-size: 1.25rem;
        font-weight: 800;
        margin-bottom: 0.45rem;
      }
      .ssub {
        color: var(--mut);
        margin-bottom: 1.6rem;
        font-size: 0.9rem;
      }
      .chips {
        display: flex;
        gap: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 1.6rem;
      }
      .chip {
        padding: 6px 14px;
        border-radius: 30px;
        font-size: 0.8rem;
        font-weight: 600;
        border: 1px solid var(--brd);
        background: var(--s2);
      }
      .chip.cg {
        border-color: rgba(34, 197, 94, 0.4);
        color: var(--grn);
        background: rgba(34, 197, 94, 0.1);
      }
      .chip.cr {
        border-color: rgba(239, 68, 68, 0.4);
        color: var(--red);
        background: rgba(239, 68, 68, 0.1);
      }

      /* TEST HOME */
      .thome {
        text-align: center;
        padding: 3rem 1.5rem;
        max-width: 560px;
        margin: 0 auto;
        animation: fadeUp 0.5s ease;
      }
      .ticon {
        font-size: 3rem;
        margin-bottom: 0.9rem;
      }
      .thome h2 {
        font-family: "Unbounded", sans-serif;
        font-size: 1.4rem;
        font-weight: 800;
        margin-bottom: 0.7rem;
      }
      .thome p {
        color: var(--mut);
        margin-bottom: 2rem;
        line-height: 1.7;
        font-size: 0.9rem;
      }
      .ticards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.9rem;
        margin-bottom: 2.25rem;
      }
      .tic {
        background: var(--card);
        border: 1px solid var(--brd);
        border-radius: 13px;
        padding: 1.1rem 1rem;
        text-align: center;
      }
      .ticn {
        font-family: "Unbounded", sans-serif;
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--acc);
        margin-bottom: 0.2rem;
      }
      .ticl {
        font-size: 0.73rem;
        color: var(--mut);
      }

      /* TEST HEADER */
      .thead {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.6rem;
        background: var(--card);
        border: 1px solid var(--brd);
        border-radius: 13px;
        padding: 0.85rem 1.25rem;
        margin-bottom: 1rem;
      }
      .timer {
        font-family: "Unbounded", sans-serif;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--txt);
      }
      .timer.warn {
        color: var(--red);
        animation: pulse 1s infinite;
      }
      .tlive {
        font-weight: 700;
        font-size: 0.84rem;
        padding: 5px 12px;
        border-radius: 20px;
        background: var(--s2);
        color: var(--acc);
        border: 1px solid var(--brd);
      }

      /* ANIM */
      @keyframes fadeUp {
        from {
          opacity: 0;
          transform: translateY(12px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
        }
        50% {
          opacity: 0.5;
        }
      }

      /* RESPONSIVE */
      @media (max-width: 600px) {
        .nav {
          padding: 0 1rem;
        }
        .nav-brand {
          font-size: 0.82rem;
        }
        .nt {
          padding: 5px 12px;
          font-size: 0.77rem;
        }
        .wrap,
        .wrap-q {
          padding: 1.25rem 0.9rem;
        }
        .sgrid {
          grid-template-columns: 1fr 1fr;
        }
        .qcard {
          padding: 1.1rem;
        }
        .thead {
          padding: 0.7rem 0.9rem;
        }
      }
      @media (max-width: 360px) {
        .sgrid {
          grid-template-columns: 1fr;
        }
      }
