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

/* === TERMINAL THEME (SpaceX inspired) === */
html.terminal-theme {
  background: linear-gradient(120deg, #10141a 0%, #1a2231 100%);
  color: #eaf6ff;
  font-size: 16px;
  text-align: center;
}

/* === HEADER === */
html.terminal-theme header {
  position: relative;
  width: 100%;
  padding: 24px 0;
  background-color: rgba(19, 26, 34, 0.94);
  color: #66e0ff;
  font-size: 24px;
  border-bottom: 2px solid #ffffff;
  box-shadow: 0 2px 12px rgba(0, 255, 255, 0.08);
  font-weight: 600;
  z-index: 10;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* === ЗАГОЛОВКИ === */
html.terminal-theme h1,
html.terminal-theme h2,
html.terminal-theme h3 {
  color: #aeeaff;
  margin: 20px 0 10px;
  font-weight: 600;
  text-shadow: 0 2px 8px #00e6ff22;
}

/* === ССЫЛКИ === */
html.terminal-theme a {
  color: #46d6ff;
  text-decoration: none;
  transition: color 0.2s;
}
html.terminal-theme a:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* === КНОПКИ === */
html.terminal-theme button {
  background-color: #111a25;
  color: #5cf1ff;
  border: 2px solid #36e0ff;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
  box-shadow: 0 2px 10px #36e0ff18;
}
html.terminal-theme button:hover {
  background-color: #36e0ff;
  color: #111a25;
  border-color: #fff;
  transform: scale(1.03);
}

/* === ИНПУТЫ, ФОРМЫ === */
html.terminal-theme input,
html.terminal-theme textarea,
html.terminal-theme select {
  background-color: #191f2a;
  color: #eaf6ff;
  border: 1px solid #3dd8ff;
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  margin-top: 5px;
  box-sizing: border-box;
  font-size: 15px;
  transition: border 0.2s, box-shadow 0.2s;
}
html.terminal-theme input:focus,
html.terminal-theme textarea:focus,
html.terminal-theme select:focus {
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 2px #37cfff44;
  outline: none;
}

html.terminal-theme input::placeholder {
  color: #7ad2ef;
  opacity: 1;
}

html.terminal-theme form {
  background-color: #131922;
  padding: 24px;
  margin: 30px auto;
  border-radius: 10px;
  max-width: 600px;
  border: 1.5px solid #36e0ff;
  box-shadow: 0 4px 20px #30e0ff1a;
}

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

/* === ПАНЕЛИ ДЛЯ ТЕКСТА === */
html.terminal-theme .panel {
  background-color: #151c24;
  color: #eaf6ff;
  padding: 24px;
  margin: 30px auto;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 4px 22px #36e0ff0d;
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
  border: 1.5px solid #36e0ff;
}

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

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

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

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

/* === SCROLLBAR === */
html.terminal-theme ::-webkit-scrollbar {
  width: 8px;
}
html.terminal-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #232932 0%, #36e0ff 100%);
  border-radius: 4px;
}
html.terminal-theme ::-webkit-scrollbar-track {
  background: #181e27;
}

/* === ТАБЛИЦЫ === */
html.terminal-theme table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #171e27;
  color: #eaf6ff;
  box-shadow: 0 2px 10px #36e0ff12;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #fff;
}

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

html.terminal-theme th {
  background-color: #121b26;
  font-weight: 600;
  color: #36e0ff;
}

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

/* === ТАБЛИЦЫ ДЛЯ ТЕСТОВ === */
html.terminal-theme .test-table {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  border: 2px solid #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px #36e0ff11;
  background-color: #171e27;
  color: #eaf6ff;
}

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

html.terminal-theme .test-table th {
  background-color: #121b26;
  color: #36e0ff;
  font-weight: 600;
  font-size: 16px;
}

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

html.terminal-theme .test-table tr:hover {
  background-color: #111a23;
}

/* === ВОПРОС И ВАРИАНТЫ === */
html.terminal-theme .question-block {
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  background-color: #121b26;
  max-width: 800px;
  box-shadow: 0 2px 12px #36e0ff12;
}

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

/* === ОТВЕТЫ (РАДИО или ЧЕКБОКСЫ) === */
/* === Стилизация плашек в тёмной теме === */
html.terminal-theme .question-block label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  margin-bottom: 12px;
  background-color: #18222f;
  border: 1px solid #36e0ff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #eaf6ff;
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: all 0.3s ease;
  min-height: 56px;
}

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

/* === Стилизация выбранного варианта === */
html.terminal-theme .question-block label:has(input[type="radio"]:checked),
html.terminal-theme .question-block label:has(input[type="checkbox"]:checked) {
  background-color: #02f7ffb6;
  border-color: #00cfff;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(0, 208, 255, 0.2);
}


html.terminal-theme .question-block label:hover {
  background-color: #10141a;
  border-color: #fff;
  color: #36e0ff;
}

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

/* === КНОПКА ОТПРАВКИ === */
html.terminal-theme .submit-test {
  display: inline-block;
  margin-top: 20px;
  background-color: #36e0ff;
  color: #10141a;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s, color 0.2s, transform 0.18s;
}

html.terminal-theme .submit-test:hover {
  background-color: #fff;
  color: #36e0ff;
  transform: scale(1.02);
}

/* === БЛОК ВОПРОСА === */
html.terminal-theme .question-block {
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 24px;
  margin: 30px auto;
  background-color: #121b26;
  max-width: 1000px;
  box-shadow: 0 2px 16px #36e0ff13;
}

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

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

html.terminal-theme .question-block label:hover {
  background-color: #10141a;
  border-color: #fff;
  color: #36e0ff;
}

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

/* === КНОПКА ОТПРАВКИ === */
html.terminal-theme .submit-test {
  display: block;
  margin: 30px auto;
  background-color: #36e0ff;
  color: #111a25;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.2s, transform 0.18s;
  text-align: center;
  box-shadow: 0 2px 12px #36e0ff3d;
}

html.terminal-theme .submit-test:hover {
  background-color: #fff;
  color: #36e0ff;
  transform: scale(1.02);
}

/* === ТАБЛИЦА С РЕЗУЛЬТАТАМИ === */
html.terminal-theme .test-table {
  width: 95%;
  max-width: 1100px;
  margin: 40px auto;
  border: 2px solid #fff;
  border-radius: 12px;
  overflow: hidden;
  background-color: #171e27;
  box-shadow: 0 4px 18px #36e0ff18;
  font-size: 17px;
  font-weight: 500;
}

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

html.terminal-theme .test-table th {
  background-color: #121b26;
  color: #36e0ff;
  font-size: 18px;
  font-weight: 700;
}

html.terminal-theme .test-table tr:hover {
  background-color: #111a23;
}

html.terminal-theme .test-table td {
  color: #eaf6ff;
}

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

html.terminal-theme .card {
  background-color: #171e27;
  border: 1px solid #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px #36e0ff11;
  text-align: center;
  flex: 1 1 250px;
  min-width: 200px;
  max-width: 280px;
}

html.terminal-theme .card h2 {
  color: #36e0ff;
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 500;
}

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

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

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

html.terminal-theme .button {
  background-color: transparent;
  border: 2px solid #36e0ff;
  color: #36e0ff;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-block;
}

html.terminal-theme .button:hover {
  background-color: #36e0ff;
  color: #111a25;
  border-color: #fff;
  transform: scale(1.02);
}

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

html.terminal-theme .admin-link:hover {
  color: #fff;
  text-decoration: underline;
}

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

/* === DARK THEME: test-table === */
html.terminal-theme .test-table {
  width: 95%;
  max-width: 1100px;
  margin: 40px auto;
  border: 2px solid #36e0ff;
  border-radius: 12px;
  overflow: hidden;
  background-color: #0e151f;
  box-shadow: 0 4px 16px rgba(0, 255, 255, 0.08);
  font-size: 17px;
  font-weight: 500;
  color: #eaf6ff;
  table-layout: fixed;
}

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

html.terminal-theme .test-table th {
  background-color: #102532;
  color: #36e0ff;
  font-size: 18px;
  font-weight: 700;
}

html.terminal-theme .test-table tr:hover {
  background-color: #162c3e;
}

html.terminal-theme .test-table td {
  color: #dceeff;
}