/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #fff;
    /* Твой градиент */
    background: linear-gradient(90.00deg, rgba(157, 0, 214, 1) 0%, rgba(4, 138, 241, 1) 100%);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* Контейнер */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== НАВИГАЦИЯ (как на основном сайте) ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.nav-logo-img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-link i {
    font-size: 0.9rem;
}

/* Заголовок */
header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
    padding-top: 20px;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Общие стили карточек (Glassmorphism) */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Фото */
.card-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

/* Текстовая информация */
.card-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.role {
    font-size: 0.9rem;
    color: #a5d8ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.details {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 50px;
}

.email-btn {
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    border: 1px solid transparent;
}

.email-btn:hover {
    background: #fff;
    color: #4a00e0;
}

/* Бейджики (Наставник, Капитан) */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    color: #4a00e0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Стили для Наставника (Особые) */
.mentor-section {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    animation: fadeIn 1.2s ease-out;
}

.mentor-card {
    width: 100%;
    max-width: 400px;
    border: 2px solid #ffd700; /* Золотая рамка */
    background: rgba(255, 255, 255, 0.15);
}

.mentor-card .card-badge {
    background: #ffd700;
    color: #000;
}

/* Стили для Капитана (Особые) */
.captain-card {
    grid-column: span 1; /* Занимает 1 колонку по умолчанию */
    border: 2px solid #ff4d4d; /* Красная рамка */
    transform: scale(1.05); /* Чуть больше остальных */
    z-index: 2;
}

.captain-card:hover {
    transform: scale(1.08);
}

.captain-card .card-badge {
    background: #ff4d4d;
    color: #fff;
}

/* Сетка (Grid) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeInUp 1.5s ease-out;
    padding-bottom: 50px;
}

/* Адаптивность для больших экранов, чтобы капитан был виден */
@media (min-width: 1000px) {
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Анимации появления */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    header h1 { font-size: 2.5rem; }
    .captain-card { transform: none; }
    .captain-card:hover { transform: translateY(-10px); }
    
    .nav-logo-img {
        height: 40px;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
    
    .nav-link span {
        display: none; /* Скрываем текст на очень маленьких экранах */
    }
    
    .nav-link i {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 10px;
    }
    
    .nav-link {
        padding: 8px 12px;
    }
}

/* ========== ИСПРАВЛЕНИЕ ХЕДЕРА СТРАНИЦЫ КОМАНДЫ ========== */

/* 1. Хедер становится такого же размера, как на главной */
.navbar {
    padding: 10px 0 !important; /* Уменьшаем высоту хедера */
}

.nav-container {
    padding: 0 15px; /* Возвращаем отступы */
}

/* 2. Логотип делаем такого же размера */
.nav-logo-img {
    height: 35px; /* Размер на десктопе */
    filter: brightness(0) invert(1); /* Делаем белым */
}

/* 3. Кнопка "На главную" стилизуется как кнопка "Войти" */
.auth-btn {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #fff !important;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none !important; /* Убираем подчеркивание */
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Удаляем старые стили для кнопки возврата, если они были */
.back-link {
    display: none !important; 
}

/* ========== АДАПТИВ ДЛЯ ХЕДЕРА КОМАНДЫ (КАК НА ГЛАВНОЙ) ========== */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0 !important;
    }
    
    .nav-logo-img {
        height: 26px; /* Размер логотипа как на главной в мобилках */
    }

    /* Кнопка становится компактной */
    .auth-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nav-logo-img {
        height: 22px; /* Размер логотипа как на главной в мобилках */
    }
}

/* ========== СКРОЛЛБАР ДЛЯ МОДАЛЬНОГО ОКНА ВЫДАЧИ РОЛИ ========== */
.grant-role-modal-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.grant-role-modal-content::-webkit-scrollbar-track {
    background: rgba(157, 0, 214, 0.05);
    border-radius: 10px;
}

.grant-role-modal-content::-webkit-scrollbar-thumb {
    background: rgba(157, 0, 214, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.grant-role-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 0, 214, 0.5);
}

.grant-role-modal-content::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Для Firefox */
.grant-role-modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(157, 0, 214, 0.3) rgba(157, 0, 214, 0.05);
}

/* ========== СКРОЛЛБАР ДЛЯ ВСЕХ МОДАЛЬНЫХ ОКОН ========== */
.modal-content::-webkit-scrollbar,
.view-modal-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-content::-webkit-scrollbar-track,
.view-modal-content::-webkit-scrollbar-track {
    background: rgba(157, 0, 214, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb,
.view-modal-content::-webkit-scrollbar-thumb {
    background: rgba(157, 0, 214, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.view-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 0, 214, 0.5);
}

.modal-content::-webkit-scrollbar-button,
.view-modal-content::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Для Firefox */
.modal-content,
.view-modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(157, 0, 214, 0.3) rgba(157, 0, 214, 0.05);
}

/* ========== СКРОЛЛБАР ДЛЯ ВСЕХ ЭЛЕМЕНТОВ С ПРОКРУТКОЙ ========== */
/* Универсальный класс для любых элементов со скроллом */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(157, 0, 214, 0.05);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(157, 0, 214, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 0, 214, 0.5);
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}