/* Основные стили */
:root {
  /* Основная цветовая палитра */
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary-color: #475569;
  --secondary-dark: #334155;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  /* Нейтральные цвета */
  --text-color: #1e293b;
  --text-light: #64748b;
  --text-xlight: #94a3b8;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-tertiary: #f1f5f9;
  
  /* Градиент фона */
  --gradient-start: #f0f9ff;
  --gradient-mid: #f0fdfa;
  --gradient-end: #faf5ff;
  
  /* Тени и эффекты */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Радиусы */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Переходы */
  --transition-all: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-opacity: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Иконки */
  --icon-size-small: 1.5rem;
  --icon-size-medium: 2.5rem;
  --icon-size-large: 3.5rem;
  --icon-stroke: 2px;
}

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

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
  background-attachment: fixed;
  background-size: cover;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Основные контейнеры */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Основной хедер */
header {
  background-color: var(--background-primary);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: var(--transition-all);
}

header.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-lg);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 2.5rem;
  width: auto;
  margin-right: 0.75rem;
  transition: var(--transition-transform);
}

.logo span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.025em;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.logo:hover img {
  transform: scale(1.05);
}

.user-info {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: var(--transition-colors);
}

.user-info.non-clickable {
  cursor: default;
}

.user-info.non-clickable:hover {
  background-color: transparent;
}

.user-info:hover {
  background-color: var(--background-tertiary);
}

.highlight {
  background-color: var(--primary-color);
  color: white;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  margin-right: 0.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.highlight::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  border-radius: var(--radius-full);
}

.user-name {
  font-weight: 500;
  font-size: 0.9375rem;
  margin-right: 0.5rem;
  color: var(--text-color);
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: var(--text-light);
  transition: var(--transition-transform);
}

.user-info:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Основной контент */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  animation: fadeIn 0.5s ease-out;
}

/* Карточки и контейнеры */
.card {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-all);
  border: 1px solid rgba(79, 70, 229, 0.1);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

/* Кнопка возврата */
.back-link {
  margin-bottom: 1.5rem;
  display: inline-block;
}

.back-link a {
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background-color: rgba(59, 130, 246, 0.1);
  transition: var(--transition-all);
}

.back-link a:hover {
  background-color: rgba(59, 130, 246, 0.15);
  transform: translateX(-4px);
}

.back-link a svg {
  margin-right: 0.5rem;
  transition: var(--transition-transform);
}

.back-link a:hover svg {
  transform: translateX(-2px);
}

/* Заголовок курса */
.course-title {
  margin-bottom: 2rem;
}

.course-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.025em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.course-title h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4rem;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
}

/* Структура контента */
.content-wrapper {
  display: flex;
  gap: 2rem;
  flex-direction: column;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (min-width: 1024px) {
  .content-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }
}

.sidebar {
  width: 100%;
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(79, 70, 229, 0.1);
  transition: var(--transition-all);
  animation: slideUp 0.5s ease-out;
  height: fit-content;
}

@media (min-width: 1024px) {
  .sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 1.5rem;
  }
}

.sidebar:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.stats-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.stats-icon img {
  width: 2.5rem;
  height: 2.5rem;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07));
  transition: var(--transition-transform);
}

.sidebar:hover .stats-icon img {
  transform: scale(1.05);
}

.stats-info h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

/* Современный цветной дизайн статистики в билетах */
.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border: none;
}

.stats-row .stats-value,
.stats-value,
.correct-count,
.incorrect-count,
.skipped-count {
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 0.75rem;
  border: 2px solid #e5e7eb;
  background: #f3f4f6 !important;
  color: #22223b !important;
  box-shadow: none;
  margin-left: 0.5rem;
}

.stats-row:nth-child(1) .stats-value,
.stats-row:nth-child(2) .stats-value,
.stats-row:nth-child(3) .stats-value,
.stats-row:nth-child(4) .stats-value {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #22223b !important;
}

.stats-row .stats-label {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
}

@media (max-width: 600px) {
  .stats-row .stats-value {
    min-width: 2rem;
    min-height: 2rem;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
  }
  .stats-row {
    margin-bottom: 0.5rem;
  }
}

.good-value {
  color: var(--success-color);
  font-weight: 600;
}

.bad-value {
  color: var(--danger-color);
  font-weight: 600;
}

.time-value {
  font-family: monospace;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

/* Тестовый контент */
.test-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slideUp 0.5s ease-out;
}

.test-section {
  display: flex;
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid rgba(79, 70, 229, 0.1);
  transition: var(--transition-all);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.test-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
  opacity: 0;
  transition: var(--transition-opacity);
}

.test-section:hover {
  transform: scale(1.01);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.test-section:hover::before {
  opacity: 0.6;
}

.test-section.active::before,
.test-section:active::before {
  opacity: 1;
}

.test-icon {
  margin-right: 1.25rem;
  flex-shrink: 0;
}

.test-icon img {
  width: 3rem;
  height: 3rem;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07));
  transition: var(--transition-transform);
}

.test-section:hover .test-icon img {
  transform: scale(1.05);
}

.test-info {
  flex-grow: 1;
}

.test-info h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.step-info {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.action-button {
  display: flex;
  align-items: center;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 1.25rem;
  transition: var(--transition-all);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  border-radius: var(--radius-full);
}

.button:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: scale(0.95);
}

/* Прогресс бар */
.progress-container {
  margin-top: 1.25rem;
}

.progress-points {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.point {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-light);
  position: relative;
  font-weight: 500;
  
  /* Стили для button */
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer !important;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  width: 2.5rem;
  height: 2.5rem;
}

.point.active {
  color: var(--primary-color);
  font-weight: 600;
}

.point::after {
  content: "";
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--text-xlight);
  transition: var(--transition-all);
  z-index: 10;
}

.point.active::after {
  background-color: var(--primary-color);
  transform: translateX(-50%) scale(1.2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.progress-bar {
  height: 0.5rem;
  background-color: var(--background-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.75rem;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 25%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0) 75%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 1rem 1rem;
  animation: progressAnimation 1s linear infinite;
  border-radius: var(--radius-full);
}

@keyframes progressAnimation {
  0% { background-position: 0 0; }
  100% { background-position: 1rem 0; }
}

/* Опции тестирования */
.tickets-selection {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ticket-option {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: var(--bg-light);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticket-option.active {
  background: var(--primary-color);
  color: white;
}

.ticket-option:hover {
  background: var(--primary-hover);
  color: white;
}

/* Стили для страницы статистики */
.stats-container {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  animation: fadeIn 0.5s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.stats-header .stats-icon {
  margin-bottom: 0;
  margin-right: 1rem;
}

.stats-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stats-block {
  flex: 1;
  min-width: 200px;
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-all);
}

.stats-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stats-number {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1;
  letter-spacing: -0.025em;
}

.highlight-good {
  color: var(--success-color);
}

.highlight-bad {
  color: var(--danger-color);
}

.stats-details {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-all);
}

.stats-details:hover {
  box-shadow: var(--shadow-md);
}

.courses-list {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-all);
}

.courses-list:hover {
  box-shadow: var(--shadow-md);
}

.courses-list h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  letter-spacing: -0.025em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.courses-list h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
}

.course-card {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-all);
  border: 1px solid rgba(79, 70, 229, 0.1);
  position: relative;
  overflow: hidden;
}

.course-card::before {
  display: none;
}

.course-card:hover {
  transform: scale(1.01);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.3);
}

.course-card.active {
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
  border-color: rgba(79, 70, 229, 0.4);
}

.course-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.course-progress {
  margin-bottom: 1.5rem;
}

.progress-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-weight: 500;
}

.course-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-all);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.course-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
}

.course-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.course-button:active {
  transform: translateY(1px);
}

/* Страница авторизации */
.auth-message {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease-out;
}

.auth-message h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.auth-message p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.auth-icon {
  margin-bottom: 2rem;
}

.auth-icon svg {
  width: 5rem;
  height: 5rem;
  color: var(--primary-color);
}

/* Классы для прогресс-бара */
.progress-0 { width: 0%; }
.progress-1 { width: 1%; }
.progress-2 { width: 2%; }
.progress-3 { width: 3%; }
.progress-4 { width: 4%; }
.progress-5 { width: 5%; }
.progress-10 { width: 10%; }
.progress-15 { width: 15%; }
.progress-20 { width: 20%; }
.progress-25 { width: 25%; }
.progress-30 { width: 30%; }
.progress-35 { width: 35%; }
.progress-40 { width: 40%; }
.progress-45 { width: 45%; }
.progress-50 { width: 50%; }
.progress-55 { width: 55%; }
.progress-60 { width: 60%; }
.progress-65 { width: 65%; }
.progress-70 { width: 70%; }
.progress-75 { width: 75%; }
.progress-80 { width: 80%; }
.progress-85 { width: 85%; }
.progress-90 { width: 90%; }
.progress-95 { width: 95%; }
.progress-100 { width: 100%; }

/* Адаптивность */
@media (max-width: 768px) {
  .stats-summary {
    flex-direction: column;
  }
  
  .test-section {
    flex-direction: column;
  }
  
  .test-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .action-button {
    margin-top: 1rem;
    justify-content: flex-end;
  }
}

/* Стили для иконок */
.icon-wrapper svg, 
.test-icon svg, 
.stats-icon svg, 
.auth-icon svg {
  width: var(--icon-size-large);
  height: var(--icon-size-large);
  filter: drop-shadow(0 4px 6px rgba(79, 70, 229, 0.2));
  transition: var(--transition-transform);
}

.test-icon svg, 
.stats-icon svg, 
.auth-icon svg {
  color: var(--primary-color);
}

.icon-wrapper:hover svg, 
.test-section:hover .test-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 6px 8px rgba(79, 70, 229, 0.3));
}

/* Стили для градиентных иконок */
.gradient-icon svg {
  color: transparent;
  fill: url(#icon-gradient);
}

/* Стили для блоков на главной странице */
.test-section, .module-card {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-all);
  border: 1px solid rgba(79, 70, 229, 0.1);
  position: relative;
  overflow: hidden;
}

.test-section:hover, .module-card:hover {
  transform: scale(1.01);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.3);
}

.test-section.active, .module-card.active {
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
  border-color: rgba(79, 70, 229, 0.4);
}

/* Стили для карточек на главной странице */
.main-card {
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-all);
  border: 1px solid rgba(79, 70, 229, 0.1);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.main-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.3);
}

.main-card .card-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.25rem;
  flex-shrink: 0;
}

.main-card .card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.main-card .card-content {
  flex: 1;
}

.main-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.main-card .card-subtitle {
  font-size: 0.875rem;
  color: var(--text-light);
}

.main-card .card-action {
  margin-left: auto;
}

.main-card .action-button {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition-all);
}

.main-card .action-button:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
}

.main-card .progress-bar {
  height: 0.25rem;
  background-color: var(--background-tertiary);
  border-radius: var(--radius-full);
  margin-top: 1rem;
  overflow: hidden;
}

.main-card .progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-full);
}

.main-card .progress-points {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 1rem;
}

.progress-point {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--background-primary);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0.75rem;
  cursor: pointer !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--primary-light);
  z-index: 1;
  user-select: none;
  
  /* Добавляем стили для button */
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
}

.progress-point:before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background-color: rgba(79, 70, 229, 0.1);
  z-index: -1;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.progress-point:hover {
  color: white;
  background-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(79, 70, 229, 0.3);
}

.progress-point:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
  transition: all 0.1s ease;
}

.progress-point.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.main-card.active {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

/* Стили для страницы вопросов */
.questions-list {
  display: flex !important;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  will-change: opacity, transform;
}

.questions-list.loading {
  opacity: 0 !important;
  transform: translateY(10px) !important;
}

.question-card {
  display: block !important;
  background-color: var(--background-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  padding: 1.5rem;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
  margin-bottom: 1.5rem;
  cursor: pointer;
  overflow: hidden;
  word-wrap: break-word;
  box-sizing: border-box;
}

.question-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.question-card.expanded {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.question-number {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.question-content {
  display: block;
  margin-bottom: 20px;
  overflow: hidden;
  word-wrap: break-word;
  box-sizing: border-box;
}

.question-main-text {
  font-size: 16px;
  line-height: 1.6;
  color: #374151;
  margin: 0;
}

.question-answers {
  display: none;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.question-answers.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.option-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    margin-right: 16px;
    background: #f3f4f6;
    border-radius: 6px;
    font-weight: 700;
    color: #4b5563;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.answer-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.answer-option.correct {
    border-color: #34d399;
    background: #ecfdf5;
}

.answer-option.incorrect {
    border-color: #f87171;
    background: #fef2f2;
}

.answer-option.selected.correct {
    border-color: #34d399;
    background: #ecfdf5;
}

.answer-option.selected.incorrect {
    border-color: #f87171;
    background: #fef2f2;
}

.multiple-choice-hint {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 500;
}

.answer-letter {
  min-width: 24px;
  margin-right: 12px;
  font-weight: 600;
  color: #4b5563;
}

.answer-text {
  flex: 1;
  color: #1f2937;
}

.question-explanation {
  display: none;
  margin-top: 20px;
  padding: 15px;
  background: #f3f4f6;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: hidden;
  word-wrap: break-word;
  box-sizing: border-box;
}

.question-explanation.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.question-explanation h4 {
  display: flex;
  align-items: center;
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #4b5563;
}

.question-explanation svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: #6b7280;
}

.question-explanation p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  white-space: pre-line;
}

.toggle-answers-button {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s ease;
  z-index: 2;
}

.toggle-answers-button:hover {
  color: #4b5563;
}

.toggle-answers-button svg {
  width: 24px;
  height: 24px;
}

/* Стили для пустого состояния */
.empty-questions {
  text-align: center;
  padding: 40px 20px;
  background: #f9fafb;
  border-radius: 8px;
  margin-top: 20px;
}

.empty-icon {
  margin-bottom: 20px;
}

.empty-questions h3 {
  font-size: 20px;
  color: #1f2937;
  margin: 0 0 10px 0;
}

.empty-questions p {
  color: #6b7280;
  margin: 0;
}

/* Стили для тестов */
.test-question-card {
  display: none;
}

.test-question-card.active {
  display: block;
}

.test-question-text {
  font-size: 18px;
  line-height: 1.6;
  color: #1f2937;
  margin-bottom: 24px;
}

.test-options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.test-option-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.test-option-item:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.test-option-item.selected {
  background: #ede9fe;
  border-color: #4f46e5;
}

.test-option-marker {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  margin-right: 12px;
  font-weight: 500;
}

.test-option-text {
  flex: 1;
  font-size: 16px;
  line-height: 1.5;
  color: #374151;
}

.test-answer-button {
  width: 100%;
  padding: 12px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 16px;
}

.test-answer-button:hover {
  background: #4338ca;
}

.test-answer-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Стили для страницы персональной ссылки */
.personal-link-card {
  max-width: 700px;
  margin: 2rem auto;
  text-align: center;
  padding: 2.5rem;
  background-color: rgba(255, 255, 255, 0.9);
}

.card-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 4rem;
  height: 4rem;
  filter: drop-shadow(0 4px 6px rgba(79, 70, 229, 0.2));
}

.personal-link-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.link-instruction {
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 1.05rem;
}

.link-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#personal-link {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 70, 229, 0.2);
  background-color: white;
  font-size: 0.9375rem;
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: var(--transition-all);
  box-shadow: var(--shadow-sm);
}

.copy-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.copy-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.copy-button:active {
  transform: translateY(1px);
}

.copy-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  padding: 0.625rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-bottom: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-expiration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

.link-expiration svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-light);
}

/* Кнопка для личной ссылки */
.personal-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  background-color: rgba(79, 70, 229, 0.1);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--transition-all);
  margin-left: auto;
}

.personal-link-button svg {
  width: 1.125rem;
  height: 1.125rem;
}

.personal-link-button:hover {
  background-color: rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}

.stats-icon svg {
  width: 2.25rem;
  height: 2.25rem;
  filter: drop-shadow(0 4px 3px rgba(79, 70, 229, 0.1));
}

/* Стили для секции управления вопросами */
.admin-controls {
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.admin-section {
  margin-bottom: 1.5rem;
}

.admin-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(79, 70, 229, 0.1);
  overflow: hidden;
  transition: var(--transition-all);
}

.admin-card:hover {
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.admin-card-header {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background-color: rgba(249, 250, 251, 0.8);
}

.admin-icon {
  margin-right: 1rem;
  flex-shrink: 0;
}

.admin-icon svg {
  width: 2rem;
  height: 2rem;
  filter: drop-shadow(0 4px 3px rgba(79, 70, 229, 0.1));
}

.admin-card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.admin-card-content {
  padding: 1.5rem;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.action-block {
  padding: 1.25rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-all);
}

.action-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(79, 70, 229, 0.1);
}

.action-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.action-block p {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-upload-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-upload-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--background-tertiary);
  color: var(--text-color);
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-all);
}

.file-upload-label:hover {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.file-upload-label svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-color);
}

#file-name {
  color: var(--text-light);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.admin-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-all);
  text-decoration: none;
  border: none;
  width: fit-content;
}

.admin-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.primary-button, .nav-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.primary-button {
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.15);
}

.primary-button:hover {
    background: linear-gradient(135deg, #4338ca, #6366f1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.2);
}

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.nav-button {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.nav-button:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.secondary-button {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.secondary-button:hover {
  background-color: rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}

.danger-block {
  border-color: rgba(239, 68, 68, 0.1);
}

.danger-block:hover {
  border-color: rgba(239, 68, 68, 0.2);
}

.danger-button {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.danger-button:hover {
  background-color: var(--danger-color);
  color: white;
  transform: translateY(-1px);
}

.danger-button svg {
  color: var(--danger-color);
}

.danger-button:hover svg {
  color: white;
}

/* Стили для навигации по вопросам */
.questions-navigation {
    margin: 20px 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}

.question-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-cell:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.question-cell.current {
    background: #3b82f6;
    border-color: #2563eb;
    color: white;
}

.question-cell.answered {
    background: #9ca3af;
    border-color: #6b7280;
    color: white;
}

.question-cell.completed {
    background: #34d399;
    border-color: #10b981;
    color: white;
}

.question-cell.incorrect {
    background: #f87171;
    border-color: #ef4444;
    color: white;
}

/* === Стили для страницы выбора билетов === */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.ticket-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    box-shadow: 5px 5px 15px #d9d9d9, -5px -5px 15px #ffffff;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ticket-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 25px #c7c7c7, -10px -10px 25px #ffffff;
}

.ticket-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ticket-status {
    font-size: 0.875rem;
    color: var(--text-light);
}

.ticket-status.success {
    color: var(--success-color);
    font-weight: 600;
}

.ticket-status.failed {
    color: var(--danger-color);
    font-weight: 600;
}

/* === Стили для страницы прохождения теста (билета) === */

.ticket-page-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.test-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.timer-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.timer-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

.timer-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
}

#question-navigation {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.question-nav-item {
    width: 100%;
    height: 40px;
    border: 2px solid var(--background-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    background-color: var(--background-secondary);
}

.question-nav-item:hover {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary-color);
}

.question-nav-item.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    transform: scale(1.05);
}

.question-nav-item.answered {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.question-nav-item.correct {
    background-color: var(--success-color);
    color: white;
    border-color: #059669;
}

.question-nav-item.incorrect {
    background-color: var(--danger-color);
    color: white;
    border-color: #b91c1c;
}

.finish-test-btn {
    width: 100%;
    margin-top: 1.5rem;
}

/* === Основной контент теста === */
.test-content-area {
    flex-grow: 1;
}

#question-container, #results-container {
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--background-tertiary);
}

#question-progress {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    background-color: var(--background-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--background-tertiary);
    background-color: var(--background-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    width: 100%;
}

.answer-button:hover:not(:disabled) {
    border-color: var(--primary-color);
    background-color: #f5f3ff;
}

.answer-button.selected {
    border-color: var(--primary-dark);
    background-color: #eef2ff;
}

.answer-button.correct {
    border-color: var(--success-color);
    background-color: #f0fdf4;
    color: #065f46;
}

.answer-button.incorrect {
    border-color: var(--danger-color);
    background-color: #fef2f2;
    color: #991b1b;
}

.answer-button:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.answer-marker {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background-color: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.answer-button.correct .answer-marker {
    background-color: var(--success-color);
    color: white;
}

.answer-button.incorrect .answer-marker {
    background-color: var(--danger-color);
    color: white;
}


#explanation-container {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color: #78350f;
    line-height: 1.6;
}

#explanation-container.show {
    display: block;
    animation: fadeIn 0.3s;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* === Стили для результатов теста === */
#results-container {
    text-align: center;
}

#results-container h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    background-color: var(--background-secondary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

#correct-percentage {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#correct-percentage.good { color: var(--success-color); }
#correct-percentage.medium { color: var(--warning-color); }
#correct-percentage.bad { color: var(--danger-color); }

@media (max-width: 992px) {
    .ticket-page-container {
        flex-direction: column;
    }
    .test-sidebar {
        position: static;
        width: 100%;
    }
}

/* Стили для двухколоночного макета тестирования */
.testing-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.testing-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.timer-block {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.timer-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4f46e5;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    margin: 0.5rem 0;
}

.timer-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.questions-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.question-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-item:hover {
    background: #e5e7eb;
    border-color: #4f46e5;
    color: #4f46e5;
}

.question-item.current {
    background: #4f46e5;
    border-color: #4338ca;
    color: white;
}

.question-item.answered {
    background: #10b981;
    border-color: #059669;
    color: white;
}

.question-item.incorrect {
    background: #ef4444;
    border-color: #dc2626;
    color: white;
}

.testing-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.finish-test {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.finish-test:hover {
    background: #4338ca;
}

@media (max-width: 1024px) {
    .testing-layout {
        grid-template-columns: 1fr;
    }
    
    .testing-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .questions-list {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .testing-layout {
        padding: 1rem;
    }
}

/* Стили для страницы билета */
.ticket-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

/* Стили для бокового меню */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timer-section {
    text-align: center;
}

.timer-display {
    margin-bottom: 24px;
}

.timer-value {
    font-size: 48px;
    font-weight: 700;
    color: #4f46e5;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
    margin: 0;
    line-height: 1;
}

.timer-label {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 8px;
}

/* Навигация по вопросам */
.questions-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.question-nav-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-nav-item:hover {
    border-color: #4f46e5;
    background: #ede9fe;
    transform: translateY(-1px);
}

.question-nav-item.current {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4338ca;
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.question-nav-item.answered {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
}

.question-nav-item.incorrect {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
}

/* Основной контент */
.questions-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 32px;
}

.question-card {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.question-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.question-header {
    margin-bottom: 24px;
}

.question-number {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.question-text {
    font-size: 18px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 32px;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #f3f4f6;
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.option-item.selected {
    background: #ede9fe;
    border-color: #4f46e5;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.option-marker {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-right: 16px;
    font-weight: 600;
    color: #4b5563;
    transition: all 0.2s ease;
}

.option-item.selected .option-marker {
    background: #4f46e5;
    border-color: #4338ca;
    color: #ffffff;
}

.option-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
    color: #1f2937;
}

.answer-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.answer-button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.answer-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.finish-test-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.finish-test-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .ticket-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 24px;
    }

    .questions-nav {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 640px) {
    .ticket-container {
        padding: 16px;
    }
    
    .questions-section {
        padding: 20px;
    }
    
    .questions-nav {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .timer-value {
        font-size: 36px;
    }
    
    .option-item {
        padding: 12px;
    }
    
    .option-marker {
        width: 28px;
        height: 28px;
        margin-right: 12px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.timer-value.warning {
    color: #ef4444;
    animation: pulse 1s infinite;
}

/* Стили для правильных и неправильных ответов */
.option-item.correct {
    background: #f0fdf4;
    border-color: #10b981;
}

.option-item.correct .option-marker {
    background: #10b981;
    border-color: #059669;
    color: #ffffff;
}

.option-item.incorrect {
    background: #fef2f2;
    border-color: #ef4444;
}

.option-item.incorrect .option-marker {
    background: #ef4444;
    border-color: #dc2626;
    color: #ffffff;
}

/* Анимация для правильных и неправильных ответов */
@keyframes correctAnswer {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes incorrectAnswer {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-8px);
    }
    75% {
        transform: translateX(8px);
    }
    100% {
        transform: translateX(0);
    }
}

.option-item.correct {
    animation: correctAnswer 0.5s ease-in-out;
}

.option-item.incorrect {
    animation: incorrectAnswer 0.5s ease-in-out;
}

/* Стили для уведомлений об ошибках */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid #ef4444;
    max-width: 400px;
}

.error-notification.show {
    transform: translateX(0);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 20px;
    color: #ef4444;
}

.error-message {
    color: #1f2937;
    font-size: 14px;
    margin-right: 16px;
    line-height: 1.5;
}

.error-close {
    background: #f3f4f6;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.error-close:hover {
    background: #e5e7eb;
}

/* Стили для изображений в пояснениях */
.explanation-image-container {
    margin: 15px 0;
    text-align: center;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
    padding: 0;
    display: block;
}

.explanation-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}

.explanation-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.image-error {
    display: none;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    margin: 10px 0;
}

.image-error span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Улучшение стилей для темы */
.question-explanation .explanation-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 250px;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.training-process .explanation-image {
    background: white;
    border: 1px solid #dee2e6;
}

/* Дополнительные стили для предотвращения переполнения */
.question-explanation {
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
}

.question-explanation .explanation-image-container {
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    margin: 10px 0;
    padding: 0;
    box-sizing: border-box;
}

/* Стили для модального окна изображений */
.image-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
    transform: scale(1.1);
}

.image-modal-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Анимации для модального окна */
@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Добавляем плавный переход для анимации загрузки изображений */
.explanation-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.explanation-image.loaded {
    opacity: 1;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .explanation-image {
        max-width: 100%;
        border-radius: 6px;
        max-height: 250px;
    }
    
    .explanation-image-container {
        margin: 10px 0;
    }
    
    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .image-modal-close {
        top: -40px;
        right: -40px;
        font-size: 20px;
        width: 35px;
        height: 35px;
    }
    
    .image-modal-overlay {
        padding: 10px;
    }
}

/* Стили для изображений в вариантах ответов */
.answer-image-container {
    margin: 10px 0;
    text-align: center;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
    box-sizing: border-box;
    padding: 0;
    display: block;
}

.answer-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}

.answer-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Стили для изображений в вариантах ответов в разных контекстах */
.answer-option .answer-image-container {
    margin: 8px 0;
    max-width: 100%;
}

.answer-option .answer-image {
    max-height: 150px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.option-item .answer-image-container {
    margin: 8px 0;
    max-width: 100%;
}

.option-item .answer-image {
    max-height: 150px;
    background: white;
    border: 1px solid #dee2e6;
}

.training-process .answer-image {
    background: white;
    border: 1px solid #dee2e6;
}

/* Адаптивность для изображений в вариантах ответов */
@media (max-width: 768px) {
    .answer-image {
        max-height: 120px;
        border-radius: 4px;
    }
    
    .answer-image-container {
        margin: 6px 0;
    }
}
