  :root {
    --white123: #ffffff;
    --off-white: #f8f8f8;
    --light-gray: #f0f0f0;
    --border: #e4e4e4;
    --text: #1a1a1a;
    --muted: #777;
    --accent-css: #2563eb;
    --accent-html: #ea580c;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --radius: 10px;
  }

  .css-quiz { border: 1px solid var(--bs-border-color); border-radius: 10px; background-color: var(--white123); padding: 15px;}
  .section-wrap { margin: 0 auto; padding: 36px 0 0; }
  .section-wrap:last-of-type { padding-bottom: 0; }
  .section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
  .section-title { font-size: 1rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
  .section-rule { flex: 1; height: 1px; background: var(--border); }

  .quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }

  .quiz-card {
    border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px 20px 16px;
    cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    background: var(--white123);
  }
  .quiz-card:hover { border-color: #aaa; box-shadow: 0 4px 16px rgba(0,0,0,0.07); transform: translateY(-1px); }
  .quiz-card.active { border-color: var(--accent-css); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
  .quiz-card.html-card.active { border-color: var(--accent-html); box-shadow: 0 0 0 3px rgba(234,88,12,0.1); }

  .card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
  .card-badge { display: inline-block; font-family: 'DM Mono', monospace; font-size: 0.62rem; font-weight: 500; padding: 3px 8px; border-radius: 100px; letter-spacing: 0.04em; }
  .badge-beginner     { background: #dbeafe; color: #1d4ed8; }
  .badge-intermediate { background: #fef3c7; color: #92400e; }
  .badge-advanced     { background: #fce7f3; color: #9d174d; }
  .badge-expert       { background: #f3e8ff; color: #6b21a8; }
  .badge-html         { background: #ffedd5; color: #c2410c; }
  .badge-topic        { background: #f0fdf4; color: #15803d; }
  .badge-html-topic   { background: #fff7ed; color: #9a3412; }

  .card-title { font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 3px; color: var(--text);}
  .card-meta  { font-size: 0.78rem; color: var(--muted); }

  .card-result { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--muted); }
  .result-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .dot-green { background: var(--green); }
  .dot-amber { background: var(--amber); }
  .dot-red   { background: var(--red); }
  .result-pct { font-weight: 600; font-family: 'DM Mono', monospace; font-size: 0.72rem; }
  .pct-green { color: var(--green); }
  .pct-amber { color: var(--amber); }
  .pct-red   { color: var(--red); }

  .quiz-area { margin: 0 auto; padding: 32px 0 32px; scroll-margin-top: 100px;}

  .progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
  .progress-bar-track { flex: 1; height: 4px; background: var(--light-gray); border-radius: 4px; overflow: hidden; }
  .progress-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
  .progress-text { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

  .question-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 32px; margin-bottom: 16px; animation: fadeSlide 0.25s ease; }
  @keyframes fadeSlide { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
  .question-number { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--muted); margin-bottom: 10px; }
  .question-text   { font-size: 1.05rem; font-weight: 500; line-height: 1.5; margin-bottom: 24px; }

  .options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 560px) { .options-grid { grid-template-columns: 1fr; } }

  .option-btn {
    border: 1.5px solid var(--border); border-radius: 8px; padding: 13px 16px;
    background: var(--white123); font-family: 'DM Mono', monospace; font-size: 0.83rem;
    text-align: left; cursor: pointer; transition: border-color 0.12s, background 0.12s; line-height: 1.5;
  }
  .option-btn:hover:not(:disabled) { border-color: #999; background: var(--off-white); }
  .option-btn.correct  { border-color: var(--green); background: #f0fdf4; color: var(--green); }
  .option-btn.wrong    { border-color: var(--red);   background: #fff5f5; color: var(--red);   }
  .option-btn.selected { border-color: var(--accent-css); background: #eff6ff; color: #1d4ed8; font-weight: 600; }
  .option-btn:disabled { cursor: default; }

  .exam-hint { margin-top: 12px; font-size: 0.78rem; color: var(--muted); }

  .feedback { margin-top: 14px; padding: 12px 16px; border-radius: 8px; font-size: 0.88rem; line-height: 1.5; display: none; }
  .feedback.show { display: block; }
  .feedback.correct-fb { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
  .feedback.wrong-fb   { background: #fff5f5; color: #b91c1c; border: 1px solid #fecaca; }

  .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .btn1 { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer; border: none; transition: opacity 0.15s, transform 0.1s; }
  .btn1:hover { opacity: 0.88; transform: translateY(-1px); }
  .btn1-primary { background: var(--accent-css); color: #fff; }
  .btn1-html    { background: var(--accent-html); color: #fff; }
  .btn1-outline { background: var(--white123); color: var(--text); border: 1.5px solid var(--border); }
  .btn1:disabled { opacity: 0.35; cursor: default; transform: none; }

  .start-screen { border: 1.5px solid var(--border); border-radius: 12px; padding: 48px 40px; text-align: center; animation: fadeSlide 0.25s ease; }
  .start-icon { font-size: 3rem; margin-bottom: 16px; }
  .start-screen h2 { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
  .start-screen p { color: var(--muted); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.6; }
  .start-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
  .start-tag  { font-family: 'DM Mono', monospace; font-size: 0.72rem; padding: 4px 10px; border-radius: 100px; background: var(--light-gray); color: var(--muted); }

  .mode-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
  .mode-btn { white-space: nowrap; flex: 1; padding: 10px 22px; border: none; background: var(--white123); font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: background 0.15s, color 0.15s; color: var(--muted); display: flex; align-items: center; gap: 7px; justify-content: center; }
  .mode-btn.active { background: var(--text); color: var(--white123); font-weight: 600; }
  .mode-btn:first-child { border-right: 1.5px solid var(--border); }
  .mode-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 24px; min-height: 1.2em; }

  .score-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 48px 40px; text-align: center; animation: fadeSlide 0.3s ease; }
  .score-number { font-family: 'Syne', sans-serif; font-size: 5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 4px; }
  .score-denom  { font-size: 1.5rem; color: var(--muted); font-weight: 400; }
  .score-label  { font-size: 1.1rem; font-weight: 600; margin: 10px 0 6px; }
  .score-sub    { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
  .score-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
  .score-bar-wrap  { margin: 24px auto; max-width: 320px; }
  .score-bar-track { height: 8px; background: var(--light-gray); border-radius: 8px; overflow: hidden; }
  .score-bar-fill  { height: 100%; border-radius: 8px; transition: width 0.6s ease 0.2s; }

  .review-list    { margin-top: 32px; text-align: left; }
  .review-heading { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
  .review-item    { border: 1.5px solid var(--border); border-radius: 8px; padding: 16px 18px; margin-bottom: 10px; font-size: 0.88rem; line-height: 1.5; }
  .review-item.r-correct { border-color: #bbf7d0; background: #f0fdf4; }
  .review-item.r-wrong   { border-color: #fecaca; background: #fff5f5; }
  .review-q           { font-weight: 600; margin-bottom: 6px; color: var(--text); }
  .review-ok          { color: var(--green); font-weight: 600; }
  .review-your        { color: var(--red); }
  .review-correct-ans { color: var(--green); }

  .about-section {

    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 48px;
    margin-top: 28px;
  }
  @media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }
  .about-block h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
  }
  .about-block p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
  }
