/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f7fbf7 0%, #eef6ef 100%);
    color: #23312b;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    box-shadow: 0 10px 24px rgba(46, 125, 50, 0.2);
}

.btn-secondary {
    background: #fff;
    color: #2f3e35;
    border: 1px solid #dce8dd;
}

.btn-danger {
    background: linear-gradient(135deg, #c62828, #e53935);
    color: #fff;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(22, 30, 24, 0.95);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 20000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   НАВИГАЦИЯ
   ============================================ */
.main-nav {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2eadf;
    box-shadow: 0 12px 30px rgba(46, 125, 50, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.main-nav a {
    color: #4f6257;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    transition: 0.25s ease;
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
    background: linear-gradient(135deg, #e8f5e9, #dcedc8);
    color: #2e7d32;
}

/* ============================================
   ЗАГОЛОВОК
   ============================================ */
.network-name {
    font-size: 2.5rem;
    color: #2e7d32;
    margin-bottom: 8px;
    text-shadow: none;
}

.network-subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* ============================================
   СТАТИСТИКА
   ============================================ */
.stats-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-item {
    background: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid #e1e5eb;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2e7d32;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================
   ПОИСК
   ============================================ */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input,
.status-filter {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e1e5eb;
    border-radius: 10px;
    color: #333;
    font-size: 1rem;
}

.search-input:focus,
.status-filter:focus {
    outline: none;
    border-color: #2e7d32;
}

/* ============================================
   КАРТОЧКИ СЕРВЕРОВ
   ============================================ */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.server-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e1e5eb;
    transition: 0.3s;
    animation: fadeUp 0.4s ease forwards;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.server-card:hover {
    border-color: #2e7d32;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.15);
}

/* ============================================
   ЗАГРУЗКА И СКЕЛЕТОНЫ
   ============================================ */
.loading-status {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #2e7d32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

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

/* ============================================
   СКЕЛЕТОНЫ ЗАГРУЗКИ
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   ФУТЕР
   ============================================ */
.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    border-top: 1px solid #e1e5eb;
    margin-top: 40px;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.social-link {
    color: #666;
    text-decoration: none;
    transition: 0.3s;
}

.social-link:hover {
    color: #2e7d32;
    background: #e8f5e9;
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.25s ease;
}

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

.modal-content h3 {
    color: #2e7d32;
    margin: 0 0 20px 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 680px) {
    .network-name {
        font-size: 1.8rem;
    }

    .stats-container {
        flex-direction: column;
        align-items: center;
    }

    .search-container {
        flex-direction: column;
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }
}
