:root {
  /* Цветовая палитра */
  --primary: #7c4dff;
  --primary-dark: #5e35b1;
  --primary-light: #b388ff;
  --secondary: #ff4081;
  --accent: #ff9100;
  --dark: #121212;
  --darker: #0a0a0a;
  --light: #ffffff;
  --gray: #b0bec5;
  --success: #00c853;
  --warning: #ff7043;
  --error: #ff5252;
  
  /* Размеры и отступы */
  --sidebar-width: 280px;
  --border-radius: 12px;
  --section-spacing: 40px;
  
  /* Эффекты */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
  --glass-bg: rgba(18, 18, 18, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Основная структура */
html, body {
  height: 100%;
}

body {
  background-color: var(--darker);
  color: var(--light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

/* Сайдбар */
.sidebar {
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 25px 0;
  z-index: 1000;
  overflow-y: auto;
  transition: var(--transition);
  border-right: 1px solid var(--glass-border);
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 0 25px 30px;
  margin-bottom: 15px;
}

.logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  margin-right: 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.logo:hover {
  transform: rotate(15deg);
}

.sidebar-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menu-category {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 25px 12px;
  margin-top: 15px;
  font-weight: 600;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 25px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  margin: 6px 15px;
  border-radius: 8px;
  position: relative;
}

.menu-item:hover {
  background: rgba(124, 77, 255, 0.1);
  color: white;
  transform: translateX(5px);
}

.menu-item.active {
  background: rgba(124, 77, 255, 0.2);
  color: white;
  font-weight: 500;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.menu-item i {
  font-size: 1.2rem;
  width: 26px;
  margin-right: 15px;
  color: var(--primary-light);
}

/* Основной контент */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--section-spacing);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

/* Герой секция */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--border-radius);
  padding: 60px;
  margin-bottom: var(--section-spacing);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: gradientShift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  z-index: 0;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  background: linear-gradient(to right, white, #e0e0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 700px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--light);
  color: var(--primary-dark);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.btn-group {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

/* Статистика */
.stats-container {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 35px;
  margin-bottom: var(--section-spacing);
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: white;
  font-weight: 700;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 70px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

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

.stat-value {
  font-size: 3.2rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  line-height: 1;
}

.stat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Карточки особенностей */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: var(--section-spacing);
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 35px;
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(124, 77, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  color: var(--primary);
  font-size: 1.6rem;
  border: 1px solid rgba(124, 77, 255, 0.3);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  transform: rotate(10deg) scale(1.1);
  background: rgba(124, 77, 255, 0.2);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: white;
  font-weight: 700;
}

.feature-card p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 25px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.feature-card .price {
  color: var(--primary);
  font-weight: 700;
  margin: 25px 0;
  font-size: 1.4rem;
}

/* Футер */
.footer {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 25px 35px;
  margin-top: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  border-top: 1px solid var(--glass-border);
  width: 100%;
  box-sizing: border-box;
}

.footer p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.footer-copyright {
  margin-top: 20px;
  opacity: 0.8;
  font-size: 0.9rem;
}

@media (min-width: 993px) {
  .footer {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
  }
}

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

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Адаптивность */
@media (max-width: 1200px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1000;
    transition: var(--transition);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 30px;
  }
  
  .hero {
    padding: 50px 35px;
  }
  
  .menu-toggle {
    display: flex;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .feature-card {
    padding: 30px;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 40px 25px;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .main-content {
    padding: 25px 20px;
  }
  
  .stats-container,
  .feature-card {
    padding: 18px;
  }
  
  .footer {
    padding: 20px 15px;
  }
}

/* Кнопка меню для мобильных */
.menu-toggle {
  position: fixed;
  top: 25px;
  right: 25px;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: none;
  outline: none;
}

.menu-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.menu-toggle i {
  font-size: 1.4rem;
}

/* Сообщение об ошибке */
.error-message {
  background: rgba(255, 82, 82, 0.1);
  border-left: 4px solid var(--error);
  padding: 18px 25px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  margin: 25px 0;
}

.error-message i {
  color: var(--error);
  margin-right: 15px;
  font-size: 1.6rem;
}

.error-message p {
  color: var(--error);
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

/* Дополнительные эффекты */
a, button {
  transition: var(--transition);
}

/* Плавный скролл */
html {
  scroll-behavior: smooth;
}

/* Подсветка активного элемента */
:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* Стили для секции скриншотов */
.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* стили для карточек серверов */
.server-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8), rgba(20, 20, 30, 0.9));
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
}

.server-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: -1;
}

.server-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: all 0.3s ease;
}

.server-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(124, 77, 255, 0.3);
}

.server-card:hover::before {
    opacity: 1;
    transform: rotate(180deg);
}

.server-card:hover::after {
    opacity: 1;
}

.server-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.server-info {
    background: rgba(10, 10, 20, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.server-card:hover .server-info {
    background: rgba(15, 15, 25, 0.6);
    border-left-color: var(--accent);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.server-info p {
    margin: 12px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.6;
}

.server-info p strong {
    color: white;
    font-weight: 600;
}

.server-status {
    padding: 6px 14px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.status-online {
    background: linear-gradient(135deg, var(--success), #2e7d32);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-offline {
    background: linear-gradient(135deg, var(--error), #c62828);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.players-count {
    color: var(--success);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.server-version {
    background: linear-gradient(135deg, var(--accent), #ff6d00);
    color: var(--darker);
    padding: 4px 12px;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.server-card .btn-group {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.server-card .btn {
    padding: 14px 24px;
    font-size: 1rem;
    flex: 1;
    min-width: 140px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-rules {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-rules:hover {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.2), rgba(124, 77, 255, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(124, 77, 255, 0.3);
}

.btn-rules i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.15), rgba(124, 77, 255, 0.05));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--primary-light);
    font-size: 1.8rem;
    border: 1px solid rgba(124, 77, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.1);
    position: relative;
    z-index: 2;
}

.server-card:hover .feature-icon {
    transform: rotate(8deg) scale(1.1);
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.25), rgba(124, 77, 255, 0.15));
    color: var(--primary);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.2);
}

/* Анимация градиента для карточек */
@keyframes cardGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Модальное окно стиль */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #121218, #0a0a12);
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    color: #e0e0e0;
    position: relative;
    border-left: 4px solid var(--primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(90deg, rgba(18, 18, 24, 0.9), rgba(10, 10, 18, 0.9));
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(124, 77, 255, 0.2);
}

.modal-title {
    margin: 0;
    font-size: 2rem;
    color: white;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-light), white);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
    padding: 8px 18px;
    line-height: 1;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.close-modal:hover {
    color: white;
    background: rgba(255, 82, 82, 0.3);
    transform: scale(1.1);
}

.rules-content {
    padding: 40px;
    line-height: 1.8;
    white-space: pre-line;
    font-size: 1.15rem;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(10, 10, 20, 0.4);
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rules-content p {
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.85);
}

.rules-content strong {
    color: white;
    font-weight: 600;
}

.rules-footer {
    padding: 25px;
    background: linear-gradient(90deg, rgba(18, 18, 24, 0.9), rgba(10, 10, 18, 0.9));
    text-align: center;
    font-size: 0.95rem;
    color: var(--gray);
    position: sticky;
    bottom: 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(124, 77, 255, 0.2);
}

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

.modal.show {
    animation: fadeIn 0.4s ease-out;
}

/* Сообщения о загрузке и ошибках */
.server-loading, .server-error {
    text-align: center;
    padding: 40px;
    font-size: 1.3rem;
    color: var(--gray);
    grid-column: 1 / -1;
    background: rgba(20, 20, 30, 0.6);
    border-radius: 16px;
    margin: 20px 0;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.server-error {
    color: var(--error);
    background: rgba(30, 20, 20, 0.6);
    border: 1px dashed rgba(255, 82, 82, 0.2);
}

.server-loading i {
    margin-right: 15px;
    font-size: 1.5rem;
    animation: spin 1.5s linear infinite;
    color: var(--primary-light);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Пульсация для онлайн серверов */
.pulse-online {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 200, 83, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}

/* --- NEW: prettier IP badges and status pills (compatible with JS-generated markup) --- */

/* Version badges (Java/Bedrock) */
.version-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), inset 0 -1px 0 rgba(255,255,255,0.02);
}

.version-info i {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin: 0;
}

.version-info i.online {
  color: var(--success);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  border-radius: 50%;
  padding: 1px 2px;
  box-shadow: 0 0 0 6px rgba(0,200,83,0.06);
  animation: statusPulse 2.6s infinite ease-in-out;
}

.version-info i.offline {
  color: var(--error);
  opacity: 0.95;
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(0,200,83,0.12); transform: scale(1); }
  60% { box-shadow: 0 0 0 8px rgba(0,200,83,0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(0,200,83,0); transform: scale(1); }
}

/* IP/address badges */
.server-address p small {
  display: inline-block;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  padding: 8px 14px;
  border-radius: 999px;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  color: #0b0b0b;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45), inset 0 -1px 0 rgba(255,255,255,0.02);
  font-weight: 800;
  margin: 6px 6px 0 0;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* Make IP look distinct from label (Java:/Bedrock:) by slightly dimming the label part */


/* Players small badges */
.players-info p small {
  display: inline-block;
  background: rgba(255,255,255,0.02);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.03);
  color: #ffffff;
  font-weight: 700;
}

/* Slight layout tweak so address and buttons align nicely */
.server-address { margin-top: 10px; display:flex; gap:12px; flex-wrap:wrap; align-items:center; }

/* Hover lift for the entire server card keeps focus on badges */
.feature-card:hover .version-info,
.server-card:hover .version-info {
  transform: translateY(-2px);
}

/* Ensure badges remain readable on small screens */
@media (max-width: 576px) {
  .version-info { padding: 6px 10px; font-size: 0.9rem; }
  .server-address p small { padding: 6px 10px; font-size: 0.95rem; }
}

/* End of server IP/status styling */

/* Улучшения для отображения серверов (совместимо с JS) */

#servers-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Поддержка карточек, создаваемых JS (они используют .feature-card) */
#servers-container .feature-card {
  padding: 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18,18,24,0.6), rgba(10,10,18,0.65));
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

#servers-container .feature-card .feature-icon { width: 56px; height: 56px; font-size: 1.4rem; }

#servers-container .feature-card h3 { display:flex; align-items:center; justify-content:space-between; gap:12px; }

/* Version block (icons with .online/.offline added by JS) */
.version-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.03);
}

.version-info i {
  font-size: 1.05rem;
}

/* classes added by JS: .online / .offline on the icon */
.version-info i.online { color: var(--success); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.version-info i.offline { color: var(--error); opacity: 0.9; }

.players-info {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.players-info p small { color: rgba(255,255,255,0.8); font-weight:600; }

/* Кнопки в карточках серверов */
.server-buttons { display:flex; gap:12px; margin-top:12px; flex-wrap:wrap; }

.server-buttons .btn { flex: 1 1 140px; }

.btn-secondary {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color: var(--light);
  border: 1px solid rgba(255,255,255,0.06);
}

.btn-disabled {
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.03);
  cursor: default;
  opacity: 0.85;
}

.server-address p small { color: rgba(255,255,255,0.6); font-weight:500; }

/* Make sure generated lists don't overflow */
#servers-container .feature-card .server-info,
#servers-container .feature-card .players-info,
#servers-container .feature-card .server-buttons,
#servers-container .feature-card .server-address {
  z-index: 2;
}

/* Small screens: single column */
@media (max-width: 576px) {
  #servers-container { grid-template-columns: 1fr; }
  #servers-container .feature-card { padding: 14px; }
}

/* Mobile improvements: make server buttons larger, full-width and clearer on phones */
@media (max-width: 480px) {
  .server-buttons { flex-direction: column; gap: 12px; }
  .server-buttons .btn { flex: none; width: 100%; padding: 14px 18px; font-size: 1.05rem; border-radius: 12px; }
  .server-address p small { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 0.95rem; }
  .feature-card { padding: 18px; }
  .version-info { width: 100%; justify-content: flex-start; }
  .players-info { width: 100%; justify-content: flex-start; }
  .btn { padding: 12px 16px; }
}

/* Extra-tight mobile layout for small phones to save vertical space */
@media (max-width: 420px) {
  #servers-container { gap: 12px; }
  #servers-container .feature-card { padding: 10px; gap: 8px; }
  #servers-container .feature-card .feature-icon { width: 48px; height: 48px; font-size: 1.1rem; margin-bottom: 12px; }
  .feature-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
  .server-info { padding: 10px; margin: 10px 0; border-radius: 10px; }
  .server-info p { margin: 8px 0; font-size: 0.95rem; line-height: 1.4; }
  .server-address { margin-top: 8px; gap: 8px; }
  .server-address p small { padding: 6px 10px; font-size: 0.9rem; white-space: normal; }
  .players-info p small { padding: 6px 8px; font-size: 0.9rem; }
  .server-buttons { gap: 8px; margin-top: 8px; }
  .server-buttons .btn { padding: 10px 12px; font-size: 0.98rem; border-radius: 10px; }
  .btn i { margin-right: 8px; }
  .version-info { padding: 6px 8px; font-size: 0.9rem; }
}

/* Extra fixes: ensure buttons never overflow viewport on very small devices */
@media (max-width: 600px) {
  .btn, .server-buttons .btn, .btn-primary {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100% !important;
  }

  /* Small inner padding so button fits inside feature-card without causing horizontal scroll */
  .feature-card { overflow: hidden; }
  .server-buttons { padding: 0; }
}