/* Ver=3.8.1 */
:root {
    --glass-bg: rgba(236, 240, 241, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 0 10px rgba(255, 255, 255, 0.05);
    --glass-blur: blur(12px);
    --neon-blue: #3498DB;
    --neon-green: #2ECC71;
    --transition: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === КОНТЕЙНЕР === */
.ts3-container {
    color: #ECF0F1;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.4em;
    max-width: 275px; /* Ширина кнтейнера */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    cursor: default !important;
}

.ts3-container::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at 30% 30%, rgba(52, 152, 219, 0.15), transparent 60%);
    animation: floatGlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, 15px) rotate(5deg); }
}

/* === ЗАГОЛОВОК === */
.ts3-header {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 2px;
    color: var(--neon-blue);
    text-shadow: 0 0 6px rgba(52, 152, 219, 0.6);
    display: inline-block;
    position: relative;
    z-index: 1;
}

.ts3-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0.7;
}

/* === ПОДЗАГОЛОВОК === */
.ts3-subheader {
    font-size: 11px;
    color: #BDC3C7;
    margin: -8px 0 3px 14px;
    display: inline-block;
    position: relative;
}

.ts3-subheader::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--neon-green);
    transition: width var(--transition);
}

.ts3-subheader:hover::after {
    width: 100%;
}

/* === СПИСКИ === */
.ts3-channels,
.ts3-channels ul {
    list-style: none;
    margin: 0;
    padding-left: 14px;
    display: block !important;
    width: 100%;
}

/* === КАНАЛ === */
.ts3-channel {
    margin: -6px 0 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: #ECF0F1;
    display: block !important;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    transition: color var(--transition);
}

.ts3-channel:hover {
    color: var(--neon-green);
}

/* === СПИСОК ПОЛЬЗОВАТЕЛЕЙ === */
.ts3-channel > ul {
    list-style: none;
    border-left: 1px solid transparent;
    border-image: linear-gradient(to bottom, transparent, #34495E, transparent) 1;
    margin: -1px 0 12px 6px;
    padding-left: 8px;
    display: block !important;
    width: 100%;
}

/* === ПОЛЬЗОВАТЕЛЬ === */
.ts3-client {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin: 1px 0;
    padding-left: 22px; /* Отступ внутри полосы слева*/
    padding-right: 24px; /* Отступ внутри полосы справа*/
    color: #2ECC71;
    font-size: 12px;
    line-height: 1.4;
    position: relative;
    width: 88% !important; /* Ширина полосы с ником */
    min-height: 18px;
    box-sizing: border-box;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: text-shadow var(--transition), transform 0.2s ease, opacity 0.4s ease;
    opacity: 0;
    cursor: default !important;
}

.ts3-client:hover {
    text-shadow: 0 0 8px var(--neon-green);
    transform: translateX(3px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.25);
}

.ts3-client.ts3-fade-in {
    opacity: 1;
    animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(4px); }
    60% { opacity: 1; transform: translateY(-1px); }
    100% { opacity: 1; transform: translateY(0); }
}

.ts3-client .scramble {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts3-status-icon {
    width: 15px;
    height: 15px;
	padding-left: 5px; /* Отступ внутри полосы слева*/
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.ts3-client:hover .ts3-status-icon {
    transform: scale(1.1);
}

/* === ФЛАГ — ВЫРОВНЕН ПО ПРАВОМУ КРАЮ ПЛАГИНА === */
.ts3-country {
    position: absolute;
    left: 4px; /* Фиксированный отступ от правого края плагина */
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px; /* Размер флага */
    line-height: 1;
    display: inline-block;
    transform-origin: center;
    transition: 
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default !important;
}

/* === АНИМАЦИЯ ФЛАГОВ === */
@keyframes flagFloat {
    0%, 100% { transform: translateY(-50%) translateY(0) rotate(0deg); }
    50% { transform: translateY(-50%) translateY(-1.5px) rotate(0.3deg); }
}

@keyframes flagWave {
    0% { transform: translateY(-50%) rotate(0deg); }
    20% { transform: translateY(-50%) rotate(5deg); }
    40% { transform: translateY(-50%) rotate(-3deg); }
    60% { transform: translateY(-50%) rotate(2deg); }
    80% { transform: translateY(-50%) rotate(-1deg); }
    100% { transform: translateY(-50%) rotate(0deg); }
}

/* === Нет активных пользователей === */
.ts3-empty {
    color: #7F8C8D;
    font-style: italic;
    margin-top: 4px;
    font-size: 12px;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	width: 88% !important; /* Ширина полосы */
}

.ts3-error {
    background: linear-gradient(135deg, rgba(244, 58, 37, 0.9), rgba(192, 57, 43, 0.8));
    color: #F1C40F;
    padding: 6px;
    border-radius: 4px;
    margin-top: 6px;
    font-size: 12px;
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 100, 100, 0.3);
    box-shadow: 0 0 12px rgba(244, 58, 37, 0.4);
    text-align: center;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* === SCRAMBLE === */
.scramble {
    transition: color 0.5s ease;
    display: inline-block;
    position: relative;
}

.scramble::before,
.scramble::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scramble:hover::before {
    opacity: 1;
    color: #ff00ff;
    transform: translate(1px, -1px);
    animation: glitch1 0.3s infinite;
}

.scramble:hover::after {
    opacity: 1;
    color: #00ffff;
    transform: translate(-1px, 1px);
    animation: glitch2 0.3s infinite;
}

@keyframes glitch1 {
    0%, 100% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
}

@keyframes glitch2 {
    0%, 100% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
}