/* ===== МИНИАТЮРНЫЙ ЧАТ - ПАЦАНСКИЙ СТИЛЬ ===== */
.chat-pizdat {
    background: #0f1217;
    border: 1px solid #44a677;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    font-family: 'Courier New', monospace;
}

/* ===== ШАПКА ЧАТА ===== */
.chat-pizdat .chat-header {
    padding: 10px 15px;
    background: linear-gradient(90deg, #1a1e24, #0f1217);
    border-bottom: 1px solid #44a677;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-pizdat .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-pizdat .header-icon {
    display: none;
}

.chat-pizdat .title-main {
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.chat-pizdat .title-sub {
    font-size: 12px;
    color: #44a677;
    margin-left: 5px;
}

.chat-pizdat .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}



/* ===== ОНЛАЙН В ШАПКЕ С КРУГЛОЙ РАМКОЙ ===== */
#chat-online-counter {
    background: radial-gradient(100% 100% at 50% 0, #5f646f 0, #4c5059 100%) !important;
    text-shadow: #000000a1 1px 0 10px !important;
    width: 30px !important;
    height: 30px !important;
    margin-left: 10px !important;
    display: flex !important;
    color: #8d919b !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* ===== СПЕКТАТОРЫ В ШАПКЕ ===== */
.chat-pizdat .spectators-status {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.chat-pizdat .spectators-status i {
    color: #909090;
}

.chat-pizdat .spectators-count {
    font-weight: 700;
    color: #b0b0b0;
}

/* ===== БЕЙДЖ СЕРВЕРА ===== */
.chat-pizdat .server-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(68, 166, 119, 0.15);
    padding: 4px 12px;
    border-radius: 30px;
    border: 1px solid #44a677;
}

.chat-pizdat .server-badge i {
    color: #44a677;
    font-size: 12px;
}

.chat-pizdat .server-badge span {
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* ===== СЕТКА ЧАТА ===== */
.chat-pizdat .chat-grid {
    padding: 10px;
}

.chat-pizdat .grid-overlay {
    display: none;
}

.chat-pizdat .chat-columns {
    display: none;
}

/* ===== СООБЩЕНИЯ ===== */
.chat-pizdat .chat-messages-pizdat {
    max-height: 400px;
    overflow-y: auto;
}

.chat-pizdat .chat-message {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(68,166,119,0.1);
    font-size: 12px;
    gap: 8px;
}

/* ===== АВАТАРКИ ===== */
.chat-pizdat .chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #909090;
    transition: border 0.2s ease;
}

/* ===== НИКНЕЙМ - ОСНОВНЫЕ СТИЛИ ===== */
.chat-pizdat .chat-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
}

/* ===== БЕЙДЖ ГРУППЫ ===== */
.chat-pizdat .chat-group-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== ТЕКСТ СООБЩЕНИЯ ===== */
.chat-pizdat .chat-text {
    flex: 1;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== БЕЙДЖ КОМАНДЫ ===== */
.chat-pizdat .chat-team {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    min-width: 45px;
    text-align: center;
}

.chat-pizdat .chat-team.tt { background: #ff6b6b; }
.chat-pizdat .chat-team.ct { background: #4dabf7; }
.chat-pizdat .chat-team.spec { background: #909090; }

/* ===== ВРЕМЯ ===== */
.chat-pizdat .chat-time {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    min-width: 45px;
    text-align: right;
}

/* ===== ФУТЕР ===== */
.chat-pizdat .chat-footer-pizdat {
    padding: 10px 15px;
    background: #1a1e24;
    border-top: 1px solid #44a677;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    overflow: hidden;
}

.chat-pizdat .footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-pizdat .status-pizdat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 12px;
}

.chat-pizdat .status-pizdat i {
    color: #44a677;
}

.chat-pizdat .counter-pizdat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 12px;
}

.chat-pizdat .counter-pizdat i {
    color: #44a677;
}

/* ===== КРАСИВАЯ НАДПИСЬ В ФУТЕРЕ ===== */
.chat-pizdat .server-name-pizdat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255,255,255,0.8),
                 0 0 30px rgba(68,166,119,0.6);
    padding: 6px 16px;
    background: linear-gradient(90deg, 
        rgba(68,166,119,0.2), 
        rgba(68,166,119,0.3),
        rgba(68,166,119,0.2));
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
}

.chat-pizdat .server-name-pizdat i {
    color: #ffd700;
    font-size: 14px;
    filter: drop-shadow(0 0 8px #ffd700);
}

/* ===== КНОПКА ===== */
.chat-pizdat .button-pizdat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(45deg, #44a677, #2d5a4a);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.chat-pizdat .button-pizdat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(68, 166, 119, 0.4);
}

/* ===== ЗАГРУЗКА / ПУСТО / ОШИБКА ===== */
.chat-pizdat .loading-pizdat,
.chat-pizdat .empty-pizdat,
.chat-pizdat .error-pizdat {
    padding: 30px;
    text-align: center;
    color: white;
}



/* ===== СТИЛИ РАМОК ПО DATA-RAMKA ===== */
.chat-pizdat .chat-name[data-ramka="frame1.png"] { color: #ffd700 !important; -webkit-text-fill-color: #ffd700 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame2.png"] { color: #c0c0c0 !important; -webkit-text-fill-color: #c0c0c0 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame3.png"] { color: #cd7f32 !important; -webkit-text-fill-color: #cd7f32 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame4.png"] { color: #4dabf7 !important; -webkit-text-fill-color: #4dabf7 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame5.png"] { color: #44a677 !important; -webkit-text-fill-color: #44a677 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame6.png"] { color: #9c27b0 !important; -webkit-text-fill-color: #9c27b0 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame7.png"] { color: #ff9800 !important; -webkit-text-fill-color: #ff9800 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame8.png"] { color: #795548 !important; -webkit-text-fill-color: #795548 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame9.png"] { color: #e91e63 !important; -webkit-text-fill-color: #e91e63 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame10.png"] { color: #00bcd4 !important; -webkit-text-fill-color: #00bcd4 !important; background: none !important; animation: none !important; }
.chat-pizdat .chat-name[data-ramka="frame16.png"] { color: #ff6b6b !important; -webkit-text-fill-color: #ff6b6b !important; background: none !important; animation: none !important; }

/* ===== СТИЛИ РАМОК ДЛЯ АВАТАРОК ПО DATA-RIGHTS ===== */
.chat-pizdat .chat-avatar[data-rights="1"] {
    border: 2px solid #23cfd1 !important;
    box-shadow: 0 0 10px rgba(35, 207, 209, 0.5) !important;
}
.chat-pizdat .chat-avatar[data-rights="2"] {
    border: 2px solid #45688E !important;
    box-shadow: 0 0 5px rgba(69, 104, 142, 0.3) !important;
}
.chat-pizdat .chat-avatar[data-rights="5"] {
    border: 2px solid #9c27b0 !important;
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.5) !important;
}
.chat-pizdat .chat-avatar[data-rights="6"] {
    border: 2px solid #4dabf7 !important;
    box-shadow: 0 0 10px rgba(77, 171, 247, 0.5) !important;
}
.chat-pizdat .chat-avatar[data-rights="7"] {
    border: 2px solid #ff6b6b !important;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5) !important;
}
.chat-pizdat .chat-avatar[data-rights="8"] {
    border: 2px solid #FBDA61 !important;
    box-shadow: 0 0 10px rgba(251, 218, 97, 0.5) !important;
}
.chat-pizdat .chat-avatar[data-rights="9"] {
    border: 2px solid #1ae07f !important;
    box-shadow: 0 0 10px rgba(26, 224, 127, 0.5) !important;
}

/* ===== СТИЛИ ДЛЯ НЕЗАРЕГИСТРИРОВАННЫХ АВАТАРОК ===== */
.chat-pizdat .chat-avatar:not([data-rights]):not([data-ramka]),
.chat-pizdat .chat-avatar[data-rights="0"],
.chat-pizdat .chat-avatar[data-rights=""] {
    border: 2px solid #8ec9c9 !important;
    box-shadow: 0 0 5px rgba(142, 201, 201, 0.3) !important;
}

/* ===== АНИМАЦИИ (KEYFRAMES) ===== */
@keyframes glowGold {
    0% { text-shadow: 0 0 5px #F4D03F; }
    50% { text-shadow: 0 0 20px #F4D03F, 0 0 30px #FF5ACD; }
    100% { text-shadow: 0 0 5px #F4D03F; }
}

@keyframes glowPurple {
    0% { text-shadow: #9c27b0 1px 1px 6px; }
    50% { text-shadow: #9c27b0 1px 1px 15px, #ff0000 1px 1px 6px; }
    100% { text-shadow: #9c27b0 1px 1px 6px; }
}

@keyframes glowBlue {
    0% { text-shadow: #4dabf7 1px 1px 6px; }
    50% { text-shadow: #4dabf7 1px 1px 15px; }
    100% { text-shadow: #4dabf7 1px 1px 6px; }
}

@keyframes glowRed {
    0% { text-shadow: 0 0 5px #ff6b6b; }
    50% { text-shadow: 0 0 20px #ff6b6b, 0 0 30px #ff0000; }
    100% { text-shadow: 0 0 5px #ff6b6b; }
}

@keyframes glowGreen {
    0% { text-shadow: 0 0 5px #1ae07f; }
    50% { text-shadow: 0 0 20px #1ae07f, 0 0 30px #44a677; }
    100% { text-shadow: 0 0 5px #1ae07f; }
}


/* ===== СТИЛИ ДЛЯ ИКОНКИ КОНВЕРТА ===== */
.chat-pizdat .chat-text span[style*="background"] {
    transition: all 0.2s ease;
}

.chat-pizdat .chat-text i {
    margin-right: 4px !important;  /* Отступ между конвертом и "написал:" */
}

.chat-pizdat .chat-message:hover .chat-text span[style*="background"] {
    background: rgba(68, 166, 119, 0.15) !important;
}

.chat-pizdat .chat-message:hover .chat-text i {
    transform: scale(1.1);
    color: #5fc98c !important;
}


_______

/* ===== ГРУППЫ - ВЫСШИЙ ПРИОРИТЕТ (ПО DATA-RIGHTS) ===== */

/* Создатель - rights=1 - как в таблице */
.chat-pizdat .chat-name[data-rights="1"] {
    background: url(/files/groups_styles/1.gif) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-size: cover !important;
    font-weight: 700 !important;
    color: transparent !important;
    animation: glowGold 3s ease-in-out infinite !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.11) !important;
}

/* Игрок - rights=2 - как в таблице */
.chat-pizdat .chat-name[data-rights="2"] {
    color: #45688E !important;
    -webkit-text-fill-color: #45688E !important;
    background: none !important;
    font-weight: 700 !important;
}

/* Временный бан - rights=3 - как в таблице */
.chat-pizdat .chat-name[data-rights="3"] {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background: none !important;
    font-weight: 700 !important;
}

/* Вечный бан - rights=4 - как в таблице */
.chat-pizdat .chat-name[data-rights="4"] {
    color: #404040 !important;
    -webkit-text-fill-color: #404040 !important;
    background: none !important;
    font-weight: 700 !important;
}

/* Меценат - rights=5 - как в таблице */
.chat-pizdat .chat-name[data-rights="5"] {
    background: url(/files/groups_styles/2.gif) left no-repeat !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-size: contain !important;
    font-weight: 700 !important;
    color: transparent !important;
    text-shadow: #FF0000 1px 1px 6px !important;
    animation: glowPurple 3s ease-in-out infinite !important;
}

/* Модератор - rights=6 - как в таблице */
.chat-pizdat .chat-name[data-rights="6"] {
    background: url(/files/groups_styles/2.gif) left no-repeat !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-size: contain !important;
    font-weight: 700 !important;
    color: transparent !important;
    text-shadow: #FF0000 1px 1px 6px !important;
    animation: glowBlue 3s ease-in-out infinite !important;
}

/* Администратор - rights=7 - как в таблице */
.chat-pizdat .chat-name[data-rights="7"] {
    background: linear-gradient(132deg, #F4D03F 0%, #16A085 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 700 !important;
    color: transparent !important;
    animation: glowRed 3s ease-in-out infinite !important;
}

/* VIP - rights=8 - точно как в element.style */
.chat-pizdat .chat-name[data-rights="8"] {
    background: linear-gradient(45deg, #FBDA61 0%, #FF5ACD 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700 !important;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Основатель - rights=9 - как в таблице */
.chat-pizdat .chat-name[data-rights="9"] {
    background: url(/files/groups_styles/1.gif) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-size: cover !important;
    font-weight: 700 !important;
    color: transparent !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.11) !important;
    animation: glowGreen 3s ease-in-out infinite !important;
}

/* ===== АНИМАЦИИ ===== */
@keyframes glowGold {
    0%, 100% { text-shadow: 0 0 5px #ffd700, 0 0 10px #ffa500; }
    50% { text-shadow: 0 0 15px #ffd700, 0 0 25px #ffa500; }
}

@keyframes glowRed {
    0%, 100% { text-shadow: 0 0 5px #ff6b6b, 0 0 10px #ff4757; }
    50% { text-shadow: 0 0 15px #ff6b6b, 0 0 25px #ff4757; }
}

@keyframes glowBlue {
    0%, 100% { text-shadow: 0 0 5px #4dabf7, 0 0 10px #339af0; }
    50% { text-shadow: 0 0 15px #4dabf7, 0 0 25px #339af0; }
}

@keyframes glowPurple {
    0%, 100% { text-shadow: 0 0 5px #9c27b0, 0 0 10px #7b1fa2; }
    50% { text-shadow: 0 0 15px #9c27b0, 0 0 25px #7b1fa2; }
}

@keyframes glowGreen {
    0%, 100% { text-shadow: 0 0 5px #44a677, 0 0 10px #2d5a4a; }
    50% { text-shadow: 0 0 15px #44a677, 0 0 25px #2d5a4a; }
}




/* ===== CS 1.6 СТИЛЬ (ВСЁ В ОДНОМ) ===== */
.chat-pizdat,
.chat-pizdat .chat-name,
.chat-pizdat .chat-text {
    font-family: 'Tahoma', 'Verdana', 'Arial', sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.chat-pizdat .chat-name {
    font-weight: 700 !important;
    font-size: 12px !important;
    -webkit-font-smoothing: none !important;
    -moz-osx-font-smoothing: unset !important;
    text-rendering: optimizeSpeed !important;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3) !important;
}
__________________

@keyframes loaderBars {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

/* КОНТЕЙНЕР ДЛЯ ГОРИЗОНТАЛЬНОЙ ПРОКРУТКИ */
.chat-messages-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* ОСНОВНАЯ ТАБЛИЦА - стили для ПК (по умолчанию) */
.chat-message {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    padding: 8px 12px !important;
    gap: 8px !important;
}

/* ИКОНКА */
.chat-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
}

/* ИМЯ ПОЛЬЗОВАТЕЛЯ С "НАПИСАЛ" */
.chat-name-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

/* ТЕКСТ СООБЩЕНИЯ */
.chat-text {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 1 auto !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.chat-text span {
    display: inline !important;
    white-space: nowrap !important;
}

/* КОМАНДА */
.chat-team {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    margin: 0 4px 0 auto !important;
    white-space: nowrap !important;
}

/* ВРЕМЯ */
.chat-time {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media screen and (max-width: 768px) {
    .chat-message {
        padding: 6px 10px !important;
        gap: 6px !important;
        /* УМЕНЬШАЕМ НА 20% (2000px - 20% = 1600px) */
        width: 1600px !important;        /* Было 2000px */
        min-width: 1600px !important;    /* Было 2000px */
    }
    
    .chat-icon {
        width: 22px !important;
        height: 22px !important;
    }
    
    .chat-icon {
        width: 30px !important;
    }
    
    .chat-name-wrapper {
        width: 100px !important;
        min-width: 100px !important;
    }
    
    /* Текст оставляем без изменений (800px) */
    .chat-text {
        flex: 0 0 auto !important;
        width: 800px !important;
        min-width: 800px !important;
        max-width: 800px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .chat-team {
        width: 50px !important;
        min-width: 50px !important;
        text-align: center !important;
        margin: 0 0 0 auto !important;
    }
    
    .chat-time {
        width: 60px !important;
        min-width: 60px !important;
        text-align: right !important;
    }
    
    .chat-message::after,
    .chat-time::after {
        display: none !important;
    }
}

/* ========== ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ ========== */
@media screen and (max-width: 480px) {
    .chat-message {
        padding: 4px 8px !important;
        gap: 4px !important;
        /* УМЕНЬШАЕМ НА 20% (1800px - 20% = 1440px) */
        width: 1000px !important;        /* Было 1800px */
        min-width: 1000px !important;    /* Было 1800px */
    }
    
    .chat-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
    
    .chat-name-wrapper {
        width: 80px !important;
        min-width: 80px !important;
        font-size: 14px !important;
    }
    
    /* Текст оставляем без изменений (720px) */
    .chat-text {
        width: 720px !important;
        min-width: 720px !important;
        font-size: 14px !important;
    }
    
    .chat-team {
        width: 45px !important;
        min-width: 45px !important;
        font-size: 12px !important;
    }
    
    .chat-time {
        width: 55px !important;
        min-width: 55px !important;
        font-size: 12px !important;
    }
}


@media screen and (max-width: 768px) {
    .server-name-pizdat {
        transform: scale(0.7) translateX(-20px);
        transform-origin: right center;
        white-space: nowrap;
        width: fit-content;
        margin-left: -15px;
        position: relative;
        left: -8px;
        right: 5px;
    }
    .fas.fa-crown {
        transform: scale(0.7) translateX(-5px);
    }
}