@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

  :root {
    --bg-light: linear-gradient(135deg, #6f86d6, #48c6ef);
    --bg-dark: linear-gradient(135deg, #232526, #1c1c1c);
    --text-light: #222;
    --text-dark: #ddd;
    --card-bg-light: #fff;
    --card-bg-dark: #121212;
    --primary-color: #6f86d6;
    --primary-color-dark: #8aa6f8;
    --shadow-light: rgba(0,0,0,0.12);
    --shadow-dark: rgba(255,255,255,0.1);
  }

  body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-light);
    margin: 0; padding: 40px 20px;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    transition: background 0.4s ease, color 0.4s ease;
  }

  body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
  }

  .container {
    background: var(--card-bg-light);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    padding: 30px 40px;
    box-shadow: 0 16px 32px var(--shadow-light);
    transition: background 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
  }

  body.dark-mode .container {
    background: var(--card-bg-dark);
    box-shadow: 0 16px 32px var(--shadow-dark);
  }

  h1 {
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: var(--primary-color);
    transition: color 0.4s ease;
  }

  body.dark-mode h1 {
    color: var(--primary-color-dark);
  }

  .toggle-container {
    text-align: center;
    margin-bottom: 24px;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  .switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
  }

  .slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
  }

  input:checked + .slider {
    background-color: var(--primary-color);
  }

  input:checked + .slider:before {
    transform: translateX(24px);
  }

  .question {
    margin-bottom: 24px;
  }

  .question-text {
    font-weight: 600;
    margin-bottom: 12px;
  }

  .options label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 1rem;
  }

  input[type="radio"] {
    margin-right: 10px;
  }

  button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: background-color 0.3s ease;
  }

  button:disabled {
    background: #b0b7d9;
    cursor: not-allowed;
  }

  .feedback {
    margin-top: 8px;
    font-weight: 600;
  }

  .correct {
    color: green;
  }

  .incorrect {
    color: red;
  }

  .score {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 24px;
    text-align: center;
  }

  a.back-link {
    display: block;
    margin-top: 30px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
  }

  a.back-link:hover {
    text-decoration: underline;
  }

  body.dark-mode button {
    background: var(--primary-color-dark);
  }

  body.dark-mode a.back-link {
    color: var(--primary-color-dark);
  }