/* === ОБНУЛЕНИЕ ОСНОВНЫХ ОТСТУПОВ === */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
}

/* === LIGHT THEME (светлая и чистая) === */
html.light-theme {
  background: url("/image/asd.png") no-repeat center center fixed;
  background-size: cover;
  color: #111111;
  font-size: 16px;
  text-align: center;
}

/* === HEADER === */
html.light-theme header {
  position: relative;
  width: 100%;
  padding: 24px 0;
  background-color: #ffffffcc;
  color: #003366;
  font-size: 24px;
  border-bottom: 2px solid #007dd3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: 600;
  z-index: 10;
}

/* === ЗАГОЛОВКИ === */
html.light-theme h1,
html.light-theme h2,
html.light-theme h3 {
  color: #002244;
  margin: 20px 0 10px;
  font-weight: 600;
  text-shadow: none;
}

/* === ССЫЛКИ === */
html.light-theme a {
  color: #007acc;
  text-decoration: none;
  transition: color 0.2s;
}
html.light-theme a:hover {
  text-decoration: underline;
  color: #005fa3;
}

/* === КНОПКИ === */
html.light-theme button {
  background-color: #007dd3;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s;
}
html.light-theme button:hover {
  background-color: #005fa3;
}

/* === ИНПУТЫ, ФОРМЫ === */
html.light-theme input,
html.light-theme textarea,
html.light-theme select {
  background-color: #ffffff;
  color: #111111;
  border: 1px solid #ccddee;
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  margin-top: 5px;
  box-sizing: border-box;
  font-size: 15px;
}

html.light-theme input::placeholder {
  color: #999999;
  opacity: 1;
}

html.light-theme form {
  background-color: #f2f6fa;
  padding: 24px;
  margin: 30px auto;
  border-radius: 10px;
  max-width: 600px;
  border: 1px solid #d9e2ee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === ФОРМЕННЫЕ МЕТКИ === */
html.light-theme form label {
  display: block;
  margin-top: 15px;
  color: #002244;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

/* === ПАНЕЛИ ДЛЯ ТЕКСТА === */
html.light-theme .panel {
  background-color: #ffffff;
  color: #111111;
  padding: 24px;
  margin: 30px auto;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
}

/* === ПОДЗАГОЛОВОК ПАНЕЛИ === */
html.light-theme .panel h2 {
  color: #003366;
  font-size: 22px;
  margin-bottom: 16px;
}

/* === БЛОК ЧТЕНИЯ ТЕКСТА === */
html.light-theme .readonly-text,
html.light-theme .text-area {
  background-color: #f8f9fa;
  color: #222222;
  border: 1px solid #ccddee;
  border-radius: 6px;
  padding: 14px;
  margin-top: 10px;
  width: 100%;
  font-size: 15px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* === ASCII ART === */
html.light-theme .ascii-art {
  font-family: monospace;
  white-space: pre;
  font-size: 4px;
  line-height: 1.2;
  color: #555555;
  margin: 20px auto;
}

/* === НИЖНИЙ ТЕКСТ === */
html.light-theme .back,
html.light-theme .developer,
html.light-theme .ascii-info {
  margin-top: 20px;
  color: #444444;
  font-size: 14px;
}

/* === SCROLLBAR === */
html.light-theme ::-webkit-scrollbar {
  width: 8px;
}
html.light-theme ::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 4px;
}
html.light-theme ::-webkit-scrollbar-track {
  background: #f0f0f0;
}

/* === ТАБЛИЦЫ === */
html.light-theme table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #ffffff;
  color: #111111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

html.light-theme th, html.light-theme td {
  padding: 12px 16px;
  border: 1px solid #e1e5eb;
  text-align: left;
}

html.light-theme th {
  background-color: #f1f4f8;
  font-weight: 600;
  color: #002244;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 600px) {
  html.light-theme form,
  html.light-theme .panel {
    padding: 16px;
    margin: 16px;
  }

  html.light-theme button {
    width: 100%;
    margin-top: 10px;
  }
}



/* === ТАБЛИЦЫ ДЛЯ ТЕСТОВ === */
/* === ТАБЛИЦЫ ДЛЯ ТЕСТОВ === */
/* === ТАБЛИЦЫ ДЛЯ ТЕСТОВ === */
/* === ТАБЛИЦЫ ДЛЯ ТЕСТОВ === */
/* === ТАБЛИЦЫ ДЛЯ ТЕСТОВ === */
html.light-theme .test-table {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  border: 2px solid #007dd3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  color: #111111;
}

html.light-theme .test-table th,
html.light-theme .test-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #d4e6f6;
  text-align: left;
}

html.light-theme .test-table th {
  background-color: #eaf4fc;
  color: #003366;
  font-weight: 600;
  font-size: 16px;
}

html.light-theme .test-table tr:last-child td {
  border-bottom: none;
}

html.light-theme .test-table tr:hover {
  background-color: #f6fbff;
}

/* === ВОПРОС И ВАРИАНТЫ === */
html.light-theme .question-block {
  border: 2px solid #007dd3;
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  background-color: #fefeff;
  max-width: 800px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

html.light-theme .question-block h3 {
  color: #003366;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

/* === ОТВЕТЫ (РАДИО или ЧЕКБОКСЫ) === */
/* === Общий стиль плашек === */
html.light-theme .question-block label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  margin-bottom: 12px;
  background-color: #f1f9ff;
  border: 1px solid #cce6f8;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  color: #002244;
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: all 0.3s ease;
  min-height: 56px;
}

/* Скрываем input */
html.light-theme .question-block label input[type="radio"],
html.light-theme .question-block label input[type="checkbox"] {
  display: none;
}

/* === Стилизация выбранного варианта === */
html.light-theme .question-block label:has(input[type="radio"]:checked),
html.light-theme .question-block label:has(input[type="checkbox"]:checked) {
  background-color: #19e1fc;
  border-color: #007dd3;
  color: #003366;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(0, 125, 211, 0.15);
}


html.light-theme .question-block label:hover {
  background-color: #e2f1ff;
  border-color: #007dd3;
}

html.light-theme .question-block input[type="radio"],
html.light-theme .question-block input[type="checkbox"] {
  margin-right: 10px;
}

/* === КНОПКА ОТПРАВКИ === */
html.light-theme .submit-test {
  display: inline-block;
  margin-top: 20px;
  background-color: #007dd3;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

html.light-theme .submit-test:hover {
  background-color: #005fa3;
}


/* === БЛОК ВОПРОСА === */
html.light-theme .question-block {
  border: 2px solid #007dd3;
  border-radius: 12px;
  padding: 24px;
  margin: 30px auto;
  background-color: #fefeff;
  max-width: 1000px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

html.light-theme .question-block h3 {
  color: #003366;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: left;
}

/* === ВАРИАНТЫ ОТВЕТА === */
html.light-theme .question-block label {
  display: block;
  padding: 14px 18px;
  margin-bottom: 12px;
  background-color: #f1f9ff;
  border: 1px solid #b4dbf3;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  color: #002244;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  text-align: left;
}

html.light-theme .question-block label:hover {
  background-color: #e1f0ff;
  border-color: #007dd3;
}

html.light-theme .question-block input[type="radio"],
html.light-theme .question-block input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.2);
}

/* === КНОПКА ОТПРАВКИ === */
html.light-theme .submit-test {
  display: block;
  margin: 30px auto;
  background-color: #007dd3;
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

html.light-theme .submit-test:hover {
  background-color: #005fa3;
  transform: scale(1.02);
}

/* === ТАБЛИЦА С РЕЗУЛЬТАТАМИ === */
html.light-theme .test-table {
  width: 95%;
  max-width: 1100px;
  margin: 40px auto;
  border: 2px solid #007dd3;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 17px;
  font-weight: 500;
}

html.light-theme .test-table th,
html.light-theme .test-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #d6e4f0;
  text-align: left;
}

html.light-theme .test-table th {
  background-color: #eaf4fc;
  color: #003366;
  font-size: 18px;
  font-weight: 700;
}

html.light-theme .test-table tr:hover {
  background-color: #f4fbff;
}

html.light-theme .test-table td {
  color: #222;
}


/* === LIGHT THEME: test-category === */
/* === UPDATED LIGHT THEME: test-category === */
html.light-theme .dashboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px auto;
  max-width: 900px;
}


html.light-theme .card {
  background-color: #ffffff;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  flex: 1 1 250px;
  min-width: 200px;
  max-width: 280px;
}





html.light-theme .card h2 {
  color: #003366;
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 500; /* Синхронизировано с dark theme */
}

html.light-theme .card .value {
  font-size: 28px;
  font-weight: 700;
  color: #111111;
}

html.light-theme .center-note {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: #222;
  margin: 30px 0 20px;
}

html.light-theme .button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

html.light-theme .button {
  background-color: transparent; /* как в dark теме */
  border: 2px solid #007dd3;
  color: #007dd3;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-block;
}

html.light-theme .button:hover {
  background-color: #005fa3;
  color: #ffffff;
  border-color: #005fa3;
  transform: scale(1.02);
}

html.light-theme .admin-link {
  display: block;
  text-align: center;
  margin: 16px auto;
  font-size: 16px;
  color: #007acc;
  text-decoration: none;
  font-weight: 500;
}

html.light-theme .admin-link:hover {
  color: #005fa3;
  text-decoration: underline;
}

html.light-theme .developer {
  text-align: center;
  margin: 40px auto 20px;
  font-size: 14px;
  color: #666666;
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 768px) {
  html.light-theme {
    font-size: 15px;
    padding: 0 12px;
  }

  html.light-theme header {
    font-size: 20px;
    padding: 16px 0;
  }

  html.light-theme .panel,
  html.light-theme form,
  html.light-theme .question-block,
  html.light-theme .test-table,
  html.light-theme .dashboard {
    width: 100%;
    max-width: 100%;
    margin: 16px 0;
    padding: 16px;
    box-sizing: border-box;
  }

  html.light-theme .submit-test,
  html.light-theme button,
  html.light-theme .button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    box-sizing: border-box;
  }

  html.light-theme .question-block label {
    font-size: 16px;
    padding: 14px;
    text-align: center;
    justify-content: center;
  }

  html.light-theme .dashboard {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  html.light-theme .card {
    max-width: 100%;
    width: 100%;
  }

  html.light-theme .button-container {
    flex-direction: column;
    gap: 12px;
  }
}