@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Roboto:wght@400;500&display=swap');

:root {
    --val-red: #ff4655;
    --val-dark: #0f1923;
    --val-light: #ece8e1;
    --val-gray: #1f2326;
    --val-text-muted: #8b978f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* Старый обычный фон */
/*body { 
    background-color: var(--val-dark);
    color: var(--val-light);
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    position: relative;
    background-image: radial-gradient(circle at 50% 0%, #1f2e3d 0%, var(--val-dark) 60%);
} */

body {
    background-color: var(--val-dark);
    color: var(--val-light);
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    position: relative;
    
    /* НОВЫЙ ФОН: Затемняющий градиент + Картинка */
    background-image: linear-gradient(rgba(15, 25, 35, 0.8), rgba(15, 25, 35, 0.85)), url('images/valorant-background.jpg');
    background-size: cover;          /* Картинка растягивается на весь экран */
    background-position: center top; /* Фокусируемся на центре/верхе картинки */
    background-attachment: fixed;    /* Эффект параллакса: картинка стоит на месте при скролле */
    background-repeat: no-repeat;    /* Картинка не повторяется */
}

.container {
    max-width: 1600px; /* БЫЛО 1200px, ТЕПЕРЬ САЙТ ШИРОКИЙ! */
    margin: 0 auto;
    padding: 2rem 3%; /* Отступы по краям, чтобы сайт не прилипал к монитору */
    width: 100%;
}

/* Шапка с логотипом и кнопками аккаунтов */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Изменили с center на flex-start, чтобы выровнять по верху */
    border-bottom: 2px solid var(--val-gray);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    width: 100%; /* Шапка должна быть на всю ширину контейнера */
}

/* Контейнер для логотипа */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Запрещаем блоку сжиматься */
}

/* Стили для нашего нового единого логотипа */
.main-logo-img {
    height: 75px; /* Высота логотипа. Можете менять её (например, 50px или 65px), чтобы подобрать идеальный размер */
    width: auto;  /* Ширина подстроится автоматически, чтобы сохранить пропорции */
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.5)); /* Красивая мягкая тень */
}

/* Чтобы кнопки вкладок тоже не ломались */
.tabs {
    display: flex;
    gap: 1rem;
    flex-shrink: 0; 
}

/* Контейнер для кнопок аккаунтов и текста времени */
.tabs-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Прижимаем кнопки и текст к правому краю шапки */
    gap: 8px; /* Расстояние между кнопками и текстом */
}

/* Текст времени обновления */
.last-updated-text {
    font-size: 0.8rem;
    color: var(--val-text-muted); /* Тусклый серый цвет */
    font-weight: 500;
    letter-spacing: 0.5px;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--val-text-muted);
    color: var(--val-light);
    padding: 0.5rem 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tab-btn:hover {
    border-color: var(--val-red);
}

.tab-btn.active {
    background: var(--val-red);
    border-color: var(--val-red);
    color: #fff;
}

.player-header {
    display: flex;
    justify-content: space-between; /* Ник слева, ранги справа */
    align-items: flex-end; /* Выравнивание по нижнему краю */
    margin-bottom: 0; /* Убрали старый отступ, так как gap в сетке всё сделает сам */
    width: 100%; 
}

.player-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    letter-spacing: 1px;
}

.rank-badge {
    background: var(--val-gray);
    padding: 0.5rem 1.5rem;
    border-left: 4px solid var(--val-red);
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
}

/* Сетка карточек статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* ЖЕСТКО ЗАДАЕМ 4 КОЛОНКИ */
    gap: 1.5rem;
    width: 100%;
    clear: both;
}

.stat-card {
    background: var(--val-gray);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--val-red);
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-label {
    color: var(--val-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 600;
}

/* Админка - новая иконка */
.admin-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    cursor: pointer;
    background: transparent; /* Убрали серый фон, чтобы была видна только иконка */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 100;
    transition: all 0.3s ease;
}

.admin-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Чтобы иконка не искажалась */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2)); /* Легкая тень в спокойном состоянии */
    transition: all 0.3s ease;
}

/* Красивое свечение и легкое увеличение при наведении (без вращения) */
.admin-trigger:hover .admin-icon-img {
    transform: scale(1.15); /* Чуть-чуть увеличивается */
    filter: drop-shadow(0 0 15px var(--val-red)); /* Красивое красное свечение в стиле Valorant */
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 25, 35, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--val-gray);
    padding: 2rem;
    border: 1px solid var(--val-red);
    width: 90%;
    max-width: 400px;
    border-radius: 4px;
}

.admin-panel {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    font-family: 'Oswald', sans-serif;
    color: var(--val-red);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.modal input[type="text"],
.modal input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 0.5rem 0 1rem 0; /* Немного раздвинули поля */
    background: var(--val-dark);
    border: 1px solid var(--val-text-muted);
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    border-radius: 4px;
}

.modal input:focus {
    border-color: var(--val-red);
    outline: none;
}

.edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.edit-group {
    display: flex;
    flex-direction: column;
}

.edit-group label {
    font-size: 0.85rem;
    color: var(--val-text-muted);
    margin-bottom: 0.3rem;
}

.edit-group input {
    padding: 8px;
    background: var(--val-dark);
    border: 1px solid #333;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
}

.edit-group input:focus {
    border-color: var(--val-red);
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.5rem 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--val-red);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--val-text-muted);
    color: var(--val-light);
}

.btn-primary:hover {
    background: #ff5e6b;
}

.btn-secondary:hover {
    border-color: white;
}

/* Кнопки переключения в админке */
.admin-player-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.admin-tab-btn {
    background: transparent;
    border: 1px solid var(--val-text-muted);
    color: var(--val-light);
    padding: 0.5rem 1rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.admin-tab-btn.active {
    background: var(--val-red);
    border-color: var(--val-red);
    color: #fff;
}

.admin-tab-btn:hover {
    border-color: var(--val-red);
}


.edit-group input:focus {
    border-color: var(--val-red);
    outline: none;
}


.admin-tab-btn.active {
    background: var(--val-red);
    border-color: var(--val-red);
    color: #fff;
}

.admin-tab-btn:hover {
    border-color: var(--val-red);
    background: rgba(255, 70, 85, 0.1);
}




#edit-form .admin-player-tabs {
    display: flex !important;
    justify-content: center !important; /* Центрируем */
    gap: 1rem !important;
    width: 100% !important;
    margin-bottom: 2rem !important; /* Отступ вниз до полей */
    padding-bottom: 1rem !important;
}

#edit-form .admin-tab-btn {
    background: rgba(255, 70, 85, 0.2);
    border: 2px solid var(--val-red);
    color: var(--val-light);
    padding: 0.7rem 1.4rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    flex: 1;
    min-width: 120px;
    border-radius: 4px;
}

#edit-form .admin-tab-btn.active {
    background: var(--val-red) !important;
    color: #fff !important;
    box-shadow: 0 4px 8px rgba(255, 70, 85, 0.4);
}

#edit-form .admin-tab-btn:hover {
    background: var(--val-red);
    transform: translateY(-1px);
}

/* Сетка полей строго под кнопками в 3 ряда */
#edit-form .edit-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto 2rem auto !important;
    align-items: end !important; /* ВАЖНО: Выравниваем все ячейки по нижнему краю ряда */
}

/* Обязательно убираем grid с самого edit-form, если он там остался */
#edit-form {
    display: block !important; 
    width: 100%;
}

#edit-form .edit-group {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important; /* ВАЖНО: Прижимаем поле ввода к низу внутри группы */
    min-height: 75px !important; /* Чуть увеличим минимальную высоту для стабильности */
    max-width: 220px;
    width: 100%;
}

#edit-form .edit-group label {
    font-size: 0.9rem !important;
    color: var(--val-text-muted) !important;
    margin-bottom: 0.4rem !important;
    font-weight: 500;
    min-height: 22px;
}

#edit-form .edit-group input:focus {
    border-color: var(--val-red) !important;
    box-shadow: 0 0 8px rgba(255, 70, 85, 0.3);
    outline: none;
}

#admin-modal .modal-content {
    width: 95% !important;
    max-width: 1000px !important;
    max-height: 95vh !important;
}

#admin-modal .admin-panel {
    padding: 2rem !important;
}

#edit-form .admin-player-tabs {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin: 0 auto 3rem auto !important;
    padding: 1rem 0 !important;
    border-bottom: 2px solid var(--val-red) !important;
    max-width: 600px;
}

#edit-form .admin-tab-btn {
    background: rgba(255, 70, 85, 0.15) !important;
    border: 2px solid var(--val-red) !important;
    color: var(--val-light) !important;
    padding: 0.8rem 1.5rem !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    border-radius: 8px !important;
    flex: none !important;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#edit-form .admin-tab-btn.active {
    background: var(--val-red) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(255, 70, 85, 0.5) !important;
    transform: translateY(-2px);
}

#edit-form .admin-tab-btn:hover {
    background: var(--val-red) !important;
    transform: translateY(-1px);
}

/* 3 РЯДА ПО 5-6 ПОЛЕЙ */
#edit-form .edit-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
	max-width: 800px !important; /* Ограничим ширину, чтобы не растягивалось слишком сильно */
	margin: 0 auto 2rem auto !important; /* Центрируем саму сетку */
	align-items: start !important; /* ВЕРНУЛИ START: выравниваем блоки по верху, так надежнее */
}

#edit-form .edit-group {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100%;
    max-width: 220px;
    height: 73px !important; /* ЖЕСТКАЯ ФИКСАЦИЯ ВЫСОТЫ ВСЕЙ ГРУППЫ (20px лейбл + 8px отступ + 45px поле) */
}

#edit-form .edit-group label {
    display: block !important; /* Лейбл теперь отдельный блок */
    font-size: 0.9rem !important;
    color: var(--val-light) !important;
    margin-bottom: 8px !important; /* Фиксированный отступ от текста до поля ввода */
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 20px !important; /* ЖЕСТКО ФИКСИРУЕМ ВЫСОТУ ЛЕЙБЛА ДЛЯ ВСЕХ ПОЛЕЙ */
    line-height: 20px !important;
    white-space: nowrap; /* Чтобы текст лейбла не переносился на новую строку */
}	


#edit-form .edit-group input:focus {
    border-color: var(--val-red) !important;
    box-shadow: 0 0 12px rgba(255, 70, 85, 0.4) !important;
    background: var(--val-dark) !important;
    transform: translateY(-1px);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    #edit-form .edit-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    
    #edit-form .admin-player-tabs {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}

#edit-form .edit-group input,
#edit-form .edit-group select {
    padding: 0 12px !important; /* Делаем одинаковый padding для всех */
    background: linear-gradient(145deg, var(--val-dark), #1a252f) !important;
    border: 2px solid #555 !important;
    color: #fff !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    height: 45px !important; /* Жестко фиксируем высоту */
	min-height: 45px !important; /* ЗАПРЕЩАЕМ СЖИМАТЬСЯ */
    max-height: 45px !important; /* ЗАПРЕЩАЕМ РАСТЯГИВАТЬСЯ */
    line-height: 41px !important; /* Выравниваем текст по вертикали во всех полях */
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
	margin: 0 !important; /* Убираем любые системные отступы браузера */
}

/* Отдельно убираем дефолтную стрелку только у select */
#edit-form .edit-group select {
    appearance: none !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
}

#edit-form .edit-group input:focus,
#edit-form .edit-group select:focus {
    border-color: var(--val-red) !important;
    box-shadow: 0 0 12px rgba(255, 70, 85, 0.4) !important;
    background: var(--val-dark) !important;
    transform: translateY(-1px);
    outline: none;
}


#edit-form .edit-group:has(select) {
    position: relative;
}

#edit-form .edit-group:has(select)::after {
    content: "▼";
    position: absolute;
    right: 15px;
    top: 50%; /* СТАВИМ ПО ЦЕНТРУ */
	transform: translateY(15%); /* Немного корректируем вниз из-за смещения относительно лейбла */
    color: var(--val-red);
    font-size: 0.8rem;
    pointer-events: none; /* Чтобы клик проходил сквозь стрелку */
}

#edit-form .edit-group select:focus {
    border-color: var(--val-red) !important;
    box-shadow: 0 0 12px rgba(255, 70, 85, 0.4) !important;
    background: var(--val-dark) !important;
    transform: translateY(-1px);
    outline: none;
}

/* Стили для рангов в шапке (справа от ника) */
.header-ranks {
    display: flex;
    gap: 2rem; /* Расстояние между Rating и Peak Rating */
    align-items: center;
}

.header-rank-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Выравниваем по правому краю */
    background: rgba(255, 255, 255, 0.03); /* Легкий стильный фон */
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.header-rank-label {
    font-size: 0.8rem;
    color: var(--val-text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.header-rank-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-rank-image {
    width: 50px; /* Размер иконки в шапке */
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.15));
}

.header-rank-text {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

/* --- НОВЫЙ ПОДВАЛ (ФУТЕР) --- */
.site-footer {
    margin-top: 4rem; /* Отступ от основного контента */
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Легкая линия сверху */
}

.footer-inner {
    display: flex;
    align-items: center; /* Центрируем элементы по высоте */
    gap: 3rem; /* Расстояние между кнопкой и текстом */
}

.ts-footer-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ts-footer-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* При наведении увеличиваем и добавляем фирменное голубое свечение */
.ts-footer-link:hover {
    transform: scale(1.05);
}

.ts-footer-link:hover .ts-footer-img {
    filter: drop-shadow(0 0 15px rgba(65, 164, 245, 0.8)); /* Красивая голубая тень */
}

.ts-footer-img {
    max-width: 180px;
    height: auto;
    display: block;
    transition: filter 0.3s ease; /* Плавное появление свечения */
}

.footer-text {
    flex: 1; /* Текст занимает всё оставшееся место */
    text-align: left; /* Выравнивание текста влево */
}

.footer-copyright {
    color: #ff4655;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    color: #8b978f;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Адаптация футера под телефоны */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-text {
        text-align: center;
    }
}

/* --- СТИЛИ ДЛЯ ПОДСКАЗОК (TOOLTIPS) --- */

/* Переопределяем саму карточку статистики для правильного позиционирования иконки */
.stat-card {
    background: var(--val-gray);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
    position: relative; /* ВАЖНО: Карточка становится точкой отсчета для иконки */
    overflow: visible; /* ВАЖНО: Разрешаем подсказке вылезать за пределы карточки */
}

/* Контейнер иконки (в правом верхнем углу) */
.tooltip-container {
    position: absolute; /* Отвязываем от текста */
    top: 10px; /* Отступ сверху */
    right: 12px; /* Отступ справа */
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Чтобы иконка была поверх всего в карточке */
}

/* Сама иконка 🛈 */
.tooltip-icon {
    color: var(--val-text-muted);
    font-size: 1rem;
    transition: color 0.2s ease;
}

/* Подсветка иконки при наведении */
.tooltip-container:hover .tooltip-icon {
    color: var(--val-light);
}

/* Скрытый блок с текстом подсказки */
.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 10px); /* Всплывает точно над иконкой */
    right: -10px; /* Выравниваем правый край тултипа чуть правее иконки */
    width: max-content; /* Автоматическая ширина по тексту */
    max-width: 250px; /* Максимальная ширина, чтобы текст переносился, если он очень длинный */
    background-color: #2b3238; /* Чуть светлее фона, чтобы выделялось */
    color: var(--val-light);
    text-align: left; /* Выравнивание текста по левому краю для удобства чтения */
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Более заметная рамка */
    font-size: 0.85rem;
    font-family: 'Roboto', sans-serif;
    text-transform: none;
    line-height: 1.5;
    font-weight: 400;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8); /* Мощная тень для эффекта "поверх всего" */
    z-index: 9999; /* ОЧЕНЬ ВАЖНО: максимальный приоритет, чтобы окно было поверх всех остальных карточек */
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    transform: translateY(5px); /* Легкая анимация появления */
    pointer-events: none;
}

/* Маленький треугольник-стрелочка вниз */
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 14px; /* Стрелочка ровно над иконкой */
    border-width: 6px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.15) transparent transparent transparent;
}

.tooltip-text::before {
    content: "";
    position: absolute;
    top: calc(100% - 1px);
    right: 15px; /* Имитация заливки стрелочки */
    border-width: 5px;
    border-style: solid;
    border-color: #2b3238 transparent transparent transparent;
    z-index: 1;
}

/* Появление тултипа при наведении */
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Очистка старых ненужных классов */
.stat-label-container {
    display: block; /* Убираем flex, возвращаем как было */
}
.stat-label {
    margin-bottom: 0.5rem !important; /* Возвращаем отступ от названия до цифр */
}

/* --- СТИЛИ ДЛЯ АВТО-АДМИНКИ --- */
.auto-admin-panel {
    max-width: 600px !important;
    text-align: center;
}

.auto-update-container {
    background: var(--val-dark);
    border: 1px solid var(--val-gray);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#update-player-title {
    font-size: 2rem;
    color: var(--val-light);
    margin-bottom: 0.5rem;
}

.update-status {
    font-size: 1.1rem;
    color: var(--val-text-muted);
}

.status-ready { color: #4ade80; } /* Зеленый */
.status-wait { color: #facc15; } /* Желтый */
.status-error { color: #f87171; } /* Красный */

.last-update-info {
    font-size: 0.9rem;
    color: #7b878e;
    margin-bottom: 1rem;
}

.huge-btn {
    padding: 1rem 3rem !important;
    font-size: 1.5rem !important;
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
}

.huge-btn:disabled {
    background: #444 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border-color: #444 !important;
    transform: none !important;
}

/* Крутилка загрузки */
.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 70, 85, 0.3);
    border-top: 4px solid var(--val-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для картинки агента в правом нижнем углу */
.agent-avatar-container {
    position: fixed; /* Фиксируем на экране, как и кнопку админки */
    bottom: 20px; /* Отступ снизу. Если картинка перекрывает кнопку Riot, сделайте тут 80px или больше */
    right: 155px; /* Отступ справа, чтобы картинка стояла левее кнопки Riot */
    width: 250px; /* Примерный размер картинки. Меняйте на свой вкус! */
    height: auto;
    z-index: 90; /* Задаем слой ниже кнопки админки, чтобы кнопка всегда нажималась */
    pointer-events: none; /* Запрещаем картинке перехватывать клики, чтобы она не мешала */
    transition: all 0.4s ease-in-out; /* Плавная анимация смены агента */
}

.agent-avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5)); /* Красивая тень под агентом */
}

/* --- КНОПКА TEAMSPEAK (Левый нижний угол) --- */
.ts-connect-btn {
    position: fixed;
    bottom: 20px; /* Отступ снизу (как у кнопки админки) */
    left: 250px; /* Отступ слева */
    width: 180px; /* Ширина вашей картинки. Можете сделать больше или меньше */
    height: auto;
    z-index: 90;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.ts-connect-btn img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Базовое легкое свечение в спокойном состоянии (синеватый цвет TeamSpeak) */
    filter: drop-shadow(0 0 5px rgba(37, 164, 227, 0.4)); 
    transition: all 0.3s ease-in-out;
}

/* Анимация при наведении (hover) - чтобы было понятно, что это кнопка */
.ts-connect-btn:hover {
    transform: translateY(-8px) scale(1.05); /* Кнопка чуть подпрыгивает и увеличивается */
}

.ts-connect-btn:hover img {
    /* Мощное яркое свечение при наведении */
    filter: drop-shadow(0 0 20px rgba(37, 164, 227, 0.9)); 
}

/* Эффект при клике (нажатии) */
.ts-connect-btn:active {
    transform: translateY(0) scale(0.95); /* Сжимается при клике */
}

/* --- НОВЫЙ МАКЕТ ДЛЯ ПЕРЕНОСА КНОПОК АККАУНТОВ --- */
.player-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Выравниваем всё по правому краю */
    gap: 70px; /* Расстояние между кнопками аккаунтов и плашками рангов */
}

.account-tabs-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px; /* Расстояние от кнопок до надписи "Статистика обновлена" */
}

/* --- СТИЛИ ДЛЯ СТРАНИЦЫ В РАЗРАБОТКЕ --- */
.dev-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh; /* Занимает половину экрана по высоте, чтобы быть ровно по центру */
    width: 100%;
}

.dev-title {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem; /* Огромный красивый текст */
    color: var(--val-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.6)); /* Сочная тень */
}

/* --- LAYOUT СТРАНИЦЫ (GRID СЕТКА) --- */
.main-content-layout {
    display: grid;
    grid-template-columns: 320px 1fr; 
    grid-template-areas:
        "header header"     /* ИЗМЕНЕНИЕ: Шапка теперь занимает всю ширину сверху */
        "sidebar content";  /* Слева плашка, справа статы */
    gap: 2rem; /* Одинаковый отступ и вниз, и вправо */
    width: 100%;
    align-items: flex-start;
}

.grid-header { 
    grid-area: header; 
}

.grid-sidebar { 
    grid-area: sidebar; 
}

.grid-content { 
    grid-area: content; 
}

/* Сбрасываем старые значения ширины */
.sidebar-left, .main-stats-area {
    width: 100%;
}

/* Адаптация под маленькие экраны (Телефоны) */
@media (max-width: 992px) {
    .main-content-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "sidebar"
            "content";
        gap: 2rem;
    }
}

.sidebar-left {
    flex: 0 0 320px; /* Фиксированная ширина левой колонки */
}

.main-stats-area {
    flex: 1; /* Правая часть занимает всё оставшееся место */
}

/* --- ПЛАШКА ACCURACY --- */
.accuracy-card {
    background: var(--val-gray);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.accuracy-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.accuracy-header h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff;
}

.accuracy-subtitle {
    font-size: 0.75rem;
    color: var(--val-text-muted);
}

.accuracy-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* --- ЧЕЛОВЕЧЕК ИЗ CSS --- */
.human-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
    gap: 2px;
}

.human-figure div {
    background-color: #4a545c; /* Стандартный серый цвет неактивных частей */
    transition: background-color 0.3s ease;
}

.figure-head {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.figure-body {
    width: 22px;
    height: 36px;
    border-radius: 3px;
    position: relative;
}

/* Имитация рук */
.figure-body::before, .figure-body::after {
    content: '';
    position: absolute;
    top: 0;
    width: 6px;
    height: 28px;
    background-color: inherit;
    border-radius: 4px;
}

.figure-body::before { 
    left: -2px; /* Накладываем на тело, чтобы слить их в одно целое */
    transform-origin: top center; /* Делаем точку сгиба на плече */
    transform: rotate(20deg); /* Слегка расставляем левую руку в сторону */
}

.figure-body::after { 
    right: -2px; /* Накладываем на тело */
    transform-origin: top center; /* Делаем точку сгиба на плече */
    transform: rotate(-20deg); /* Слегка расставляем правую руку в сторону */
}

.figure-legs {
    display: flex;
    gap: 4px;
    background-color: transparent !important; /* Убираем фон с контейнера ног */
}

.leg-left, .leg-right {
    width: 8px;
    height: 25px;
    border-radius: 2px;
}

/* Активный цвет (Зеленый как на трекере) */
.human-figure .active-part,
.human-figure .active-part::before,
.human-figure .active-part::after,
.human-figure .active-part .leg-left,
.human-figure .active-part .leg-right {
    background-color: #00ffaa !important;
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}

/* --- СТАТИСТИКА ACCURACY --- */
.accuracy-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.acc-row {
    display: flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
}

.acc-label {
    color: var(--val-text-muted);
    width: 45px;
}

.acc-pct {
    font-weight: 600;
    color: #fff;
    width: 55px;
}

/* Цвет процента совпадает с подсвеченной частью */
.acc-row.active-text .acc-pct {
    color: #00ffaa;
}

/* Контейнер для цифры и слова Hits */
.acc-hits-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    flex: 1;
}

/* Сама цифра - БЕЛАЯ */
.acc-hits {
    color: #fff;
    font-weight: 600; /* Как у процентов */
    font-size: 0.95rem; /* Чуть крупнее, чтобы читалось */
    text-align: right;
}

/* Слово Hits - СЕРОЕ */
.acc-hits-text {
    color: #8b978f; /* Серый цвет (var(--val-text-muted)) */
    font-size: 0.85rem;
}

/* Адаптация под маленькие экраны */
@media (max-width: 992px) {
    .main-content-layout {
        flex-direction: column;
    }
    .sidebar-left {
        width: 100%;
    }
}

/* Адаптация сетки 4 колонок под меньшие экраны */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr); /* На планшетах будет 2 колонки */
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr; /* На телефонах 1 колонка */
    }
}

/* --- ПОДСКАЗКА ДЛЯ ПЛАШКИ ACCURACY --- */
.accuracy-card {
    position: relative; 
}

.accuracy-tooltip {
    position: absolute;
    top: 0.5rem;     /* Уменьшили отступ, чтобы поднять значок ВЫШЕ */
    right: 1rem; /* Уменьшили отступ, чтобы подвинуть ПРАВЕЕ */
    z-index: 10;
}

/* Также слегка сдвинем текст "Last 20 Matches", чтобы он точно не касался иконки, даже если экран узкий */
.accuracy-subtitle {
    margin-right: 0.1rem;
}

/* =========================================
   СТРАНИЦА НОВОСТЕЙ И ВКЛАДКИ
   ========================================= */

/* Прячем все страницы по умолчанию */
.page-section {
    display: none;
    width: 100%;
}

/* Показываем только активную страницу */
.page-section.active-page {
    display: block;
}

/* --- СТРАНИЦА НОВОСТЕЙ --- */
.news-layout {
    display: flex;
    gap: 2rem;
    width: 100%;
    height: 75vh;
    margin-top: 1rem;
}

.news-column {
    flex: 1;
    background: var(--val-gray);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.news-col-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: var(--val-red);
    text-transform: uppercase;
    text-align: center;
    padding: 1rem;
    background: rgba(15, 25, 35, 0.5);
    border-bottom: 2px solid var(--val-red);
    letter-spacing: 1px;
}

.news-feed-container {
    flex: 1;
    width: 100%;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Скроллбар для новостей */
.news-feed-container::-webkit-scrollbar {
    width: 6px;
}
.news-feed-container::-webkit-scrollbar-track {
    background: transparent;
}
.news-feed-container::-webkit-scrollbar-thumb {
    background: var(--val-red);
    border-radius: 3px;
}

@media (max-width: 992px) {
    .news-layout {
        flex-direction: column;
        height: auto;
    }
    .news-column {
        height: 60vh;
    }
}

/* --- КАРТОЧКИ ПОСТОВ TELEGRAM --- */
.tg-post-card {
    background: rgba(15, 25, 35, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: all 0.2s ease;
}

.tg-post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 70, 85, 0.3);
}

.tg-post-date {
    font-size: 0.8rem;
    color: var(--val-text-muted);
}

.tg-post-img {
    width: 100%;
    border-radius: 4px;
    display: block;
    object-fit: cover;
}

.tg-post-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--val-light);
    word-break: break-word;
}

.tg-post-text a {
    color: #41a4f5;
    text-decoration: none;
}

.tg-post-text a:hover {
    color: var(--val-red);
}

/* =========================================
   ПЛАШКА LEVEL И ПОБЕДЫ/ПОРАЖЕНИЯ (Стиль Tracker.gg)
   ========================================= */
.player-title-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem; 
}

.level-wl-widget {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.level-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.level-label {
    font-size: 0.8rem;
    color: var(--val-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--val-light);
    line-height: 1;
}

/* Большой круглый график с текстом внутри */
.wl-chart {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(#00ffaa 0% 50%, var(--val-red) 50% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Внутренний вырез (фон совпадает с фоном сайта) */
.wl-inner-text {
    width: 58px; /* Толщина кольца (70-58)/2 = 6px */
    height: 58px;
    background-color: var(--val-dark); 
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.wl-wins {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #00ffaa; /* Зеленый цвет для побед */
}

.wl-losses {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--val-red); /* Красный цвет для поражений */
}

@media (max-width: 768px) {
    .player-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* --- ДИНАМИЧЕСКИЙ КУЛДАУН (ТАЙМЕР) В АДМИНКЕ --- */
.cooldown-timer-box {
    background: rgba(255, 70, 85, 0.1);
    border: 1px solid var(--val-red);
    border-radius: 6px;
    padding: 1rem 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    display: none; /* скрыт по умолчанию */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(255, 70, 85, 0.15);
    animation: pulse-border 2s infinite;
}

.cooldown-timer-box.active {
    display: flex;
}

.cooldown-title {
    color: var(--val-red);
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.cooldown-time {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 2px;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 10px rgba(255, 70, 85, 0.1); }
    50% { box-shadow: 0 0 20px rgba(255, 70, 85, 0.3); }
    100% { box-shadow: 0 0 10px rgba(255, 70, 85, 0.1); }
}

/* =========================================
   СТРАНИЦА СТРИМОВ TWITCH
   ========================================= */
.streams-container {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 0 1rem;
}

.streams-main-title {
    font-size: 3rem !important;
    margin-bottom: 3rem;
    text-align: center;
}

.streams-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две ровные колонки */
    gap: 2rem;
    align-items: start;
}

.streams-column {
    background: var(--val-gray);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.streams-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

.online-header {
    border-bottom-color: rgba(0, 255, 170, 0.3);
}

.streams-col-header h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--val-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.online-header h3 {
    color: #00ffaa;
}

.live-dot {
    width: 14px;
    height: 14px;
    background-color: #00ffaa;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffaa;
    animation: blink 1.5s infinite;
}

.streams-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Расстояние между плеерами */
}

/* Карточка отдельного стрима */
.stream-card {
    background: rgba(15, 25, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stream-card:hover {
    transform: translateY(-3px);
    border-color: rgba(145, 70, 255, 0.5); /* Фирменный цвет Twitch при наведении */
}

.stream-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    text-align: center;
    letter-spacing: 2px;
}

/* Хитрый контейнер, который держит плеер в пропорции 16:9 */
.stream-wrapper {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
}

.stream-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@media (max-width: 992px) {
    .streams-layout {
        grid-template-columns: 1fr; /* На телефонах блоки встанут друг под друга */
    }
}

/* =========================================
   НОВАЯ АДМИНКА (Вкладки и Редактор стримов)
   ========================================= */
.admin-main-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.admin-main-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--val-text-muted);
    padding: 1rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-main-tab.active {
    color: var(--val-light);
    border-bottom: 3px solid var(--val-red);
    background: rgba(255, 70, 85, 0.05);
}

.admin-main-tab:hover:not(.active) {
    color: var(--val-light);
    background: rgba(255, 255, 255, 0.05);
}

.admin-section {
    display: none;
    flex-direction: column;
    width: 100%;
}

.admin-section.active-section {
    display: flex;
}

/* Форма добавления стримера */
.add-streamer-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 25, 35, 0.6);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.add-streamer-form input {
    flex: 1;
    margin: 0 !important;
}

.add-streamer-form button {
    white-space: nowrap;
}

/* Список стримеров */
.streamers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

.streamers-list::-webkit-scrollbar { width: 6px; }
.streamers-list::-webkit-scrollbar-thumb { background: var(--val-red); border-radius: 3px; }

.streamer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.streamer-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.streamer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.streamer-info-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--val-light);
    letter-spacing: 1px;
}

.streamer-info-url {
    font-size: 0.85rem;
    color: var(--val-text-muted);
}

.delete-streamer-btn {
    background: transparent;
    border: none;
    color: var(--val-text-muted);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.delete-streamer-btn:hover {
    color: var(--val-red);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .add-streamer-form { flex-direction: column; }
    .admin-main-tabs { flex-direction: column; gap: 0; }
}