.video-container {
    position: relative;
}

.video-container video {
    position: absolute;
    object-fit: cover;
}

.video-container .caption {
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}
.header h1 {
    font-size: 48px; /* Уменьшено до золотой середины */
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}


.server-card {
    background: #3a3a3a;
    border-radius: 14px;
    padding: 24px; /* Сбалансированный padding */
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--main-color);
    border-radius: 14px 14px 0 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    background: #404040;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.server-name {
    font-size: 22px; /* Оптимальный размер */
    font-weight: 600;
    color: var(--main-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-indicator.online {
    color: #4caf50;
}

.status-indicator.offline {
    color: #f44336;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.online .status-dot {
    background: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
}

.status-indicator.offline .status-dot {
    background: #f44336;
    animation: none;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.server-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
}

.info-row:first-child {
    padding-top: 0;
}

.info-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.info-value.copyable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.info-value.copyable:hover {
    color: var(--main-color);
}

.players-bar {
    background: rgba(0, 0, 0, 0.3);
    height: 12px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 6px;
}

.players-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--main-color-dark), var(--main-color));
}

.server-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%; /* Добавляем явную ширину */
    box-sizing: border-box; /* Учитываем padding в общей ширине */
}

.btn {
    flex: 1;
    padding: 14px 12px; /* Немного уменьшил горизонтальный padding */
    border: none;
    border-radius: 10px;
    font-size: 14px; /* Чуть уменьшил размер шрифта */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px; /* Немного уменьшил межбуквенное расстояние */
    box-sizing: border-box; /* Важно: учитываем padding в ширине */
    min-width: 0; /* Позволяем кнопкам сжиматься */
}


.btn-primary {
    background: var(--main-color);
    color: white;
}

.btn-primary:hover {
    background: var(--main-color-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(182, 102, 210, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.icon {
    width: 16px;
    height: 16px;
}
/* Можно добавить еще один брейкпоинт для очень больших экранов */
@media (min-width: 1600px) {
    .servers-grid {
        grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); /* Еще шире */
        gap: 28px;
    }

    .server-card {
        padding: 32px;
    }
}

/* Добавляем медиа-запрос для больших экранов */
@media (min-width: 1378px) {
    .servers-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); /* Увеличиваем минимальную ширину */
        gap: 24px; /* Чуть увеличиваем отступы */
    }

    .server-card {
        padding: 28px; /* Увеличиваем padding для более просторного вида */
    }

    .server-name {
        font-size: 24px; /* Увеличиваем размер названия */
    }

    .info-value {
        font-size: 17px; /* Чуть увеличиваем размер текста информации */
    }

    .btn {
        padding: 16px 20px; /* Увеличиваем кнопки */
        font-size: 16px;
    }
    .container {
        max-width: 1400px; /* Или другое значение в зависимости от вашего layout */
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 36px; /* Адаптивный размер */
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }

    .server-card {
        padding: 20px; /* Чуть меньше на мобильных */
    }

    .server-actions {
        gap: 10px; /* Уменьшаем gap на мобильных */
    }

    .btn {
        padding: 12px 10px; /* Еще компактнее на мобильных */
        font-size: 13px;
        letter-spacing: 0.3px;
    }
}

.gradient-edrenbaton {
    background: linear-gradient(90deg, #FF004C, #FF0017);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

/* Модальное окно */
.modal-content {
    background: #121212 !important;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 0 solid #2a2a2a !important;
    background: #1a1a1a !important;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.modal-footer {
    border-top: 1px solid #2a2a2a !important;
    background: #1a1a1a !important;
    padding: 16px 24px;
    border-radius: 0 0 16px 16px;
}

.modal-body {
    padding: 0 !important;
}

/* Стили для QuickGrid внутри модального окна */
.modal-body .quickgrid {
    height: 100%;
    width: 100%;
}

.modal-body .quickgrid table {
    width: 100%;
    height: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-body .quickgrid th {
    background: #1a1a1a;
    font-weight: 600;
    color: #ffffff;
    font-size: 17px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.modal-body .quickgrid td {
    font-size: 17px;
}

.modal-body .quickgrid tr:last-child td {
    border-bottom: none;
}

/* Пустое состояние */
.modal-body span {
    display: block;
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 15px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

table {
    border-radius: 0 !important;
}

/* Кнопка закрытия */
.btn-close {
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    filter: invert(1);
}

.btn-close:hover {
    opacity: 1;
}

/* Кнопка в футере */
.modal-footer .btn-primary {
    background-color: #bb86fc !important;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(187, 134, 252, 0.3);
}

.modal-footer .btn-primary:hover {
    background-color: #9a67ea !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(187, 134, 252, 0.4);
}

.modal-footer .btn-primary:active {
    transform: translateY(0);
}