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

body {
  background-color: #0b141a;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(32, 44, 51, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(32, 44, 51, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(32, 44, 51, 0.2) 0%, transparent 50%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-position: 0% 0%, 100% 100%, 50% 50%;
  background-repeat: no-repeat;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  padding: 20px 15px;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.02) 2px,
      rgba(255, 255, 255, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.02) 2px,
      rgba(255, 255, 255, 0.02) 4px
    );
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 карточки в ряд */
  gap: 15px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* На планшетах и десктопе - 2 в ряд */
    gap: 20px;
  }
}

.card {
  background: rgba(32, 44, 51, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.card img {
  width: 100%;
  border-radius: 16px;
  height: 200px;
  object-fit: cover;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.card h3 {
  font-size: 18px;
  color: #ffffff;
  margin: 8px 0 4px;
  font-weight: 600;
}

.card .role {
  font-size: 12px;
  color: #8696a0;
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card p {
  font-size: 13px;
  color: #aebac1;
  line-height: 1.4;
  margin: 8px 0 12px;
  min-height: 36px;
}

.card button {
  background: linear-gradient(135deg, #00a884 0%, #25d366 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 168, 132, 0.3);
}

.card button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 168, 132, 0.5);
}

.card button:active {
  transform: scale(0.98);
}

.card button:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Для мужских персонажей - другой акцент */
.card.male::before {
  background: linear-gradient(90deg, #0088cc, #3399ff);
}

.card.male .role {
  color: #0088cc;
}

.card.male button {
  background: linear-gradient(135deg, #0088cc 0%, #3399ff 100%);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.card.male button:hover {
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.5);
}

/* Загрузка */
.loading {
  text-align: center;
  color: #aebac1;
  font-size: 18px;
  padding: 40px;
}

/* Ошибка */
.error {
  text-align: center;
  color: #ff6b6b;
  background: rgba(32, 44, 51, 0.95);
  border: 1px solid rgba(255, 107, 107, 0.3);
  padding: 20px;
  border-radius: 12px;
  margin: 20px auto;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

/* Адаптив - убрал переключение на 1 колонку, всегда показываем 2! */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* Оставляем 2 колонки даже на мобилке */
    gap: 12px;
  }
  
  .card img {
    height: 180px; /* Немного меньше высота на мобилке */
  }
  
  .card h3 {
    font-size: 16px; /* Немного меньше шрифт */
  }
  
  .card p {
    font-size: 12px;
  }
}
