/* ===== Переменные темы ===== */
:root {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #5a6c7d;
  --accent: #3498db;
  --accent-hover: #2980b9;
  --accent-light: #ebf5ff;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --border: #e1e8ed;
  --shadow: rgba(0, 0, 0, 0.08);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* ===== Сброс и базовые стили ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Навигационная панель ===== */
.top-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-light);
}

/* ===== Шапка сайта ===== */
.main-header {
  background: linear-gradient(135deg, var(--accent) 0%, #2c3e50 100%);
  color: white;
  text-align: center;
  padding: 60px 20px 40px;
  margin-bottom: 40px;
}

.logo-container {
  margin-bottom: 20px;
}

.server-logo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  background: var(--bg-secondary);
}

.main-header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 25px;
}

.header-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* ===== Основной контент ===== */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ===== Карточки ===== */
.card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid var(--border);
}

.card h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--text-primary);
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
}

/* ===== Статус сервера ===== */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
}

.status-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-icon.online {
  background: #d5f4e6;
}

.status-icon.online::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
}

.status-icon.offline {
  background: #fadbd8;
}

.status-icon.offline::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--danger);
  border-radius: 50%;
}

.status-info {
  flex: 1;
}

.status-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.status-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-value.online {
  color: var(--success);
}

.status-value.offline {
  color: var(--danger);
}

/* ===== IP блок ===== */
.server-ip-block {
  background: var(--accent-light);
  padding: 25px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 2px solid var(--accent);
}

.ip-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.ip-address {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 15px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

.copy-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.copy-btn:active {
  transform: translateY(0);
}

/* ===== О сервере ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.feature-item {
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent);
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Статистика ===== */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.stats-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.stat-box {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.chart-placeholder {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--border-radius);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.chart-placeholder canvas {
  width: 100%;
  max-height: 250px;
}

/* ===== Как подключиться ===== */
.steps-list {
  list-style: none;
  counter-reset: step-counter;
}

.steps-list li {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  position: relative;
}

.steps-list li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 45px;
  top: 70px;
  width: 2px;
  height: calc(100% - 10px);
  background: var(--border);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-content p {
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-content strong {
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

/* ===== Футер ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 50px 20px 30px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.disclaimer {
  font-size: 0.85rem;
  font-style: italic;
  margin: 15px 0;
}

.copyright {
  margin-top: 15px;
  font-weight: 500;
}

/* ===== Анимации ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.5s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .main-header h1 {
    font-size: 2rem;
  }
  
  .server-logo {
    width: 140px;
    height: 140px;
  }
  
  .card {
    padding: 20px;
  }
  
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .ip-address {
    font-size: 1.2rem;
  }
  
  .nav-container {
    justify-content: center;
  }
  
  .nav-link {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .header-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .badge {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }
  
  .steps-list li {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .steps-list li:not(:last-child)::after {
    display: none;
  }
  
  .step-number {
    margin-bottom: 10px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ===== Утилиты ===== */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}