/* ========================================
   CSS VARIABLES (Design Tokens)
======================================== */
:root {
  /* Background & Foreground */
  --background: 0 0% 4%;           /* #0a0a0a */
  --foreground: 0 0% 95%;          /* #f2f2f2 */
  
  /* Primary (muted rose) */
  --primary: 350 45% 50%;          /* #b34d60 */
  --primary-foreground: 0 0% 98%;
  
  /* Muted */
  --muted: 0 0% 15%;
  --muted-foreground: 0 0% 64%;
  
  /* Border */
  --border: 0 0% 25%;             /* Светлее для лучшей видимости */
  
  /* Card */
  --card: 0 0% 10%;               /* Светлее для контраста */
  --card-foreground: 0 0% 95%;
  
  /* Parasite specific */
  --parasite-dark: 0 0% 10%;       /* #141414 - для карточек */
  --parasite-darker: 0 0% 4%;      /* #0a0a0a - основной фон */
  
  /* Accent colors */
  --orange-400: 24 95% 53%;
  --yellow-400: 45 93% 47%;
  --pink-400: 340 82% 52%;
  --green-400: 142 71% 45%;
  --blue-400: 217 91% 60%;
  --purple-400: 270 76% 60%;
  --amber-400: 38 92% 50%;
  --violet-400: 258 90% 66%;
  --red-400: 0 84% 60%;
  
  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  line-height: 1.6;
}

/* Дополнительно можно добавить текстуру/виньетку */
body {
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  background: 
    radial-gradient(ellipse at center, transparent 0%, hsl(var(--background)) 70%),
    hsl(var(--background)) !important;
}

body > #mainContent {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Или с легким шумом/гритом */
body::before {
  content: '';
  position: fixed !important;
  inset: 0 !important;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: -1;
  display: block !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* ========================================
   LAYOUT
======================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  min-width: 0; /* Ensure flexbox/grid items can shrink below content size */
}

.main-content {
  padding: 3rem 1rem;
}

/* ========================================
   HEADER
======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsla(var(--background), 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: hsl(var(--foreground));
}

.header-title {
  font-size: 1.25rem;
  letter-spacing: 0.15em;
}

.header-spacer {
  width: 6rem;
}

/* ========================================
   ICONS
======================================== */
.icon {
  width: 20px;
  height: 20px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-xs {
  width: 12px;
  height: 12px;
}

.icon-orange { color: hsl(var(--orange-400)); }
.icon-yellow { color: hsl(var(--yellow-400)); }
.icon-primary { color: hsl(var(--primary)); }

/* ========================================
   HERO SECTION
======================================== */
.hero-section {
  text-align: center;
  margin-bottom: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: hsla(var(--primary), 0.1);
  border: 1px solid hsla(var(--primary), 0.3);
  margin-bottom: 1.5rem;
}

.badge span {
  font-size: 0.875rem;
  color: hsl(var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.badge svg {
  color: hsl(var(--primary));
}

.hero-title {
  font-size: 1.75rem;  /* Еще более тонкий размер шрифта */
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2rem;  /* Еще более тонкий размер шрифта */
  }
}

.text-gradient-rose {
  background: linear-gradient(135deg, hsl(350, 70%, 60%), hsl(340, 82%, 52%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ========================================
   INFO CARDS (Principles Section)
======================================== */
.info-cards .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;  /* Уменьшен отступ от описания */
}

@media (min-width: 768px) {
  .info-cards .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-parasite {
  position: relative;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    hsla(var(--card), 0.8),
    hsla(var(--card), 0.4)
  );
  border: 1px solid hsl(var(--border));  /* Контрастная обводка */
  transition: all 0.3s ease;
  overflow: hidden;
}

.card-parasite::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    hsla(var(--primary), 0.05),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-parasite:hover {
  border-color: hsl(var(--primary));  /* Полностью насыщенный цвет при наведении */
  transform: translateY(-2px);
}

.card-parasite:hover::before {
  opacity: 1;
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-text {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ========================================
   SECTION TITLE
======================================== */
.section-title {
  font-size: 1.875rem;
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
}

/* ========================================
   TEST CARDS GRID
======================================== */
.test-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  min-width: 0; /* Ensure flexbox/grid items can shrink below content size */
}

@media (min-width: 768px) {
  .test-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .test-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   TEST CARD
======================================== */
.test-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    hsla(var(--card), 0.8),
    hsla(var(--card), 0.4)
  );
  border: 1px solid hsl(var(--border));  /* Контрастная обводка */
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  min-width: 0; /* Ensure flexbox/grid items can shrink below content size */
}

.test-card:hover {
  border-color: hsl(var(--primary));  /* Полностью насыщенный цвет при наведении */
  transform: translateY(-2px);
}

/* Gradient overlay on hover */
.test-card-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.test-card:hover .test-card-gradient {
  opacity: 1;
}

/* Gradient variants */
.gradient-orange {
  background: linear-gradient(135deg, hsla(24, 95%, 53%, 0.2), hsla(0, 84%, 60%, 0.2));
}
.gradient-blue {
  background: linear-gradient(135deg, hsla(217, 91%, 60%, 0.2), hsla(234, 89%, 74%, 0.2));
}
.gradient-pink {
  background: linear-gradient(135deg, hsla(340, 82%, 52%, 0.2), hsla(350, 70%, 50%, 0.2));
}
.gradient-green {
  background: linear-gradient(135deg, hsla(142, 71%, 45%, 0.2), hsla(160, 84%, 39%, 0.2));
}
.gradient-purple {
  background: linear-gradient(135deg, hsla(270, 76%, 60%, 0.2), hsla(258, 90%, 66%, 0.2));
}
.gradient-amber {
  background: linear-gradient(135deg, hsla(38, 92%, 50%, 0.2), hsla(45, 93%, 47%, 0.2));
}
.gradient-violet {
  background: linear-gradient(135deg, hsla(258, 90%, 66%, 0.2), hsla(270, 76%, 60%, 0.2));
}

/* Card content */
.test-card-content {
  position: relative;
  z-index: 10;
}

.test-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.test-card-icon {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: hsla(var(--background), 0.5);
  color: hsl(var(--primary));
  transition: transform 0.3s ease;
}

.test-card-icon svg {
  width: 32px;
  height: 32px;
}

.test-card:hover .test-card-icon {
  transform: scale(1.1);
}

/* Difficulty badges */
.difficulty-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

.difficulty-basic {
  background-color: hsla(142, 71%, 45%, 0.2);
  color: hsl(142, 71%, 45%);
}

.difficulty-medium {
  background-color: hsla(45, 93%, 47%, 0.2);
  color: hsl(45, 93%, 47%);
}

.difficulty-advanced {
  background-color: hsla(0, 84%, 60%, 0.2);
  color: hsl(0, 84%, 60%);
}

/* Card title */
.test-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.test-card:hover .test-card-title {
  color: hsl(var(--primary));
}

/* Card description */
.test-card-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Card meta */
.test-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.meta-item.chevron {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s ease;
}

.test-card:hover .meta-item.chevron {
  opacity: 1;
  transform: translateX(0);
  color: hsl(var(--primary));
}

/* Featured card (Hybrid Test) */
.test-card.featured {
  border-color: hsla(var(--primary), 0.3);
}

/* ========================================
   GLITCH EFFECT
======================================== */
.glitch {
  position: relative;
  color: hsl(var(--foreground));
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch::before {
  animation: glitch-1 2s infinite linear alternate-reverse;
  color: hsl(var(--primary));
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  color: hsl(217, 91%, 60%);
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

@keyframes glitch-2 {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(2px); }
  40% { transform: translateX(-2px); }
  60% { transform: translateX(1px); }
  80% { transform: translateX(-1px); }
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* Footer styles */
footer {
  margin-top: auto !important; /* Прижимаем футер к низу */
}

/* === ТЕСТ: КОНТЕЙНЕР === */
.test-container {
  max-width: 48rem; /* 768px */
  margin: 0 auto;
  padding: 0 1rem;
  min-width: 0; /* Ensure flexbox/grid items can shrink below content size */
}

/* === ПРОГРЕСС === */
.test-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-bar {
  flex: 1;
  height: 0.5rem;
  background: hsl(0 0% 15%);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(350 89% 60%), hsl(350 89% 50%));
  border-radius: 9999px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: hsl(0 0% 60%);
  white-space: nowrap;
}

/* === КАРТОЧКА ВОПРОСА === */
.question-card {
  background: linear-gradient(135deg, hsl(0 0% 10%) 0%, hsl(0 0% 6%) 100%);
  border: 1px solid hsl(0 0% 15%);
  border-radius: 1rem;
  padding: 2rem;
}

.question-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  color: hsl(0 0% 95%);
  margin: 0 0 2rem 0;
}

/* === ВАРИАНТЫ ОТВЕТОВ === */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-button {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: hsl(0 0% 8%);
  border: 1px solid hsl(0 0% 18%);
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.option-button:hover {
  background: hsl(0 0% 12%);
  border-color: hsl(350 89% 60% / 0.5);
}

.option-button:hover .option-letter {
  background: hsl(350 89% 60% / 0.2);
  border-color: hsl(350 89% 60%);
  color: hsl(350 89% 60%);
}

/* Выбранный вариант */
.option-button.selected {
  background: hsl(350 89% 60% / 0.1);
  border-color: hsl(350 89% 60%);
}

.option-button.selected .option-letter {
  background: hsl(350 89% 60%);
  border-color: hsl(350 89% 60%);
  color: hsl(0 0% 100%);
}

/* Буква варианта */
.option-letter {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: hsl(0 0% 15%);
  border: 1px solid hsl(0 0% 25%);
  border-radius: 50%;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(0 0% 60%);
  transition: all 0.2s ease;
}

/* Текст варианта */
.option-text {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: hsl(0 0% 85%);
  padding-top: 0.25rem;
}

/* === FEEDBACK === */
.feedback-box {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: hsl(142 76% 36% / 0.1);
  border: 1px solid hsl(142 76% 36% / 0.3);
  border-radius: 0.75rem;
  animation: fadeInUp 0.3s ease;
}

.feedback-box.show {
  display: flex;
}

/* Позитивный feedback (для хороших ответов) */
.feedback-box.positive {
  background: hsl(142 76% 36% / 0.1);
  border: 1px solid hsl(142 76% 36% / 0.3);
}

.feedback-box.positive .feedback-icon {
  color: hsl(142 76% 36%);
}

/* Негативный feedback (для плохих ответов) */
.feedback-box.negative {
  background: hsl(0 84% 60% / 0.1);
  border: 1px solid hsl(0 84% 60% / 0.3);
}

.feedback-box.negative .feedback-icon {
  color: hsl(0 84% 60%);
}

/* Нейтральный feedback */
.feedback-box.neutral {
  background: hsl(45 93% 47% / 0.1);
  border: 1px solid hsl(45 93% 47% / 0.3);
}

.feedback-box.neutral .feedback-icon {
  color: hsl(45 93% 47%);
}

.feedback-icon {
  flex-shrink: 0;
  color: hsl(142 76% 36%);
}

.feedback-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: hsl(0 0% 80%);
  margin: 0;
}

/* === КНОПКА "ДАЛЕЕ" === */
.next-button {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, hsl(350 89% 60%) 0%, hsl(350 89% 50%) 100%);
  border: none;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(0 0% 100%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.next-button.show {
  display: flex;
}

.next-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px hsl(350 89% 60% / 0.3);
}

.next-button svg {
  transition: transform 0.2s ease;
}

.next-button:hover svg {
  transform: translateX(4px);
}

/* === КНОПКА "НАЗАД" === */
.prev-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: hsl(0 0% 15%);
  border: 1px solid hsl(0 0% 25%);
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(0 0% 80%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.prev-button:hover:not(:disabled) {
  background: hsl(0 0% 20%);
  border-color: hsl(0 0% 30%);
  color: hsl(0 0% 95%);
}

.prev-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prev-button svg {
  transition: transform 0.2s ease;
}

.prev-button:hover:not(:disabled) svg {
  transform: translateX(-4px);
}

/* === КНОПКИ НАВИГАЦИИ === */
.navigation-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
}

.navigation-buttons .prev-button,
.navigation-buttons .next-button {
  width: auto;
  flex: 1;
}

/* === АНИМАЦИЯ === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS FOR TEST STYLES
======================================== */

@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .main-content {
    padding: 1.5rem 0.75rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .test-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .main-content {
    padding: 1rem 0.5rem;
  }
  
  .section-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .test-card {
    padding: 1rem;
  }
  
  .test-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .test-card-title {
    font-size: 1.125rem;
  }
  
  .test-card-description {
    font-size: 0.8125rem;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 0.25rem;
  }
  
  .section-title {
    font-size: 1.125rem;
  }
  
  .test-card {
    padding: 0.75rem;
  }
  
  .test-card-title {
    font-size: 1rem;
  }
  
  .test-card-description {
    font-size: 0.75rem;
  }
  
  .meta-item {
    font-size: 0.65rem;
  }
}

@media (max-width: 320px) {
  .section-title {
    font-size: 1rem;
  }
  
  .test-card-title {
    font-size: 0.9375rem;
  }
  
  .test-card-description {
    font-size: 0.7rem;
  }
  
  /* Additional responsive styles for test content */
  .question-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .option-button {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .option-letter {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.875rem;
  }
  
  .option-text {
    font-size: 0.8125rem;
    padding-top: 0.125rem;
  }
}

@media (max-width: 300px) {
  .container {
    padding: 0 0.125rem;
  }
  
  .section-title {
    font-size: 0.9375rem;
  }
  
  .test-card {
    padding: 0.5rem;
  }
  
  .test-card-title {
    font-size: 0.875rem;
  }
  
  .test-card-description {
    font-size: 0.65rem;
  }
  
  .meta-item {
    font-size: 0.6rem;
  }
  
  .difficulty-badge {
    font-size: 0.6rem;
    padding: 0.125rem 0.25rem;
  }
  
  /* Extra small screen adjustments for test content */
  .question-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .option-button {
    padding: 0.5rem;
    gap: 0.25rem;
  }
  
  .option-letter {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }
  
  .option-text {
    font-size: 0.75rem;
    padding-top: 0;
  }
  
  .feedback-text {
    font-size: 0.75rem;
  }
  
  .next-button,
  .prev-button {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .progress-text {
    font-size: 0.75rem;
  }
  
  .test-progress {
    gap: 0.5rem;
  }
}

/* ========================================
   MODAL STYLES FOR TESTS
======================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  max-height: 90vh;
  overflow-y: auto;
  width: 95%;
  max-width: 600px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .modal-content {
    width: 80%;
    max-width: 700px;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  padding: 0.25rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}

.modal-body {
  padding: 1.5rem;
}

/* Responsive modal styles for very small screens */
@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    max-width: none;
    margin: 1rem;
  }
  
  .modal-header {
    padding: 1rem 1rem 0 1rem;
  }
  
  .modal-header h3 {
    font-size: 1.1rem;
  }
  
  .modal-close {
    font-size: 1.25rem;
    width: 1.75rem;
    height: 1.75rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
}

@media (max-width: 360px) {
  .modal-header h3 {
    font-size: 1rem;
  }
  
  .modal-close {
    font-size: 1.1rem;
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .modal-body {
    padding: 0.75rem;
  }
}

@media (max-width: 320px) {
  .modal-header h3 {
    font-size: 0.9rem;
  }
  
  .modal-close {
    font-size: 1rem;
    width: 1.375rem;
    height: 1.375rem;
  }
  
  .modal-body {
    padding: 0.5rem;
  }
}

@media (max-width: 300px) {
  .modal-content {
    margin: 0.5rem;
    width: calc(100% - 1rem);
  }
  
  .modal-header {
    padding: 0.75rem 0.75rem 0 0.75rem;
  }
  
  .modal-header h3 {
    font-size: 0.875rem;
  }
  
  .modal-close {
    font-size: 0.875rem;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0.125rem;
  }
  
  .modal-body {
    padding: 0.5rem;
  }
}
