/* ============================================
   OVERRIDES: КОМПАКТНЫЙ РЕЙТИНГ В ПРАВОЙ ПАНЕЛИ + ТУМБЛЕР АВТО
   ============================================ */

/* Убираем фон/паддинг у блока рейтинга внутри .underplaylist-actions */
.underplaylist-actions .player-rating-block,
.underplaylist-rating.player-rating-block {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.underplaylist-actions .rating-display-compact {
    margin-bottom: 10px !important; /* промежуток до кнопок оценки */
}

.underplaylist-actions .rating-suffix {
    font-size: 20px !important; /* крупнее "/10" */
    font-weight: 700 !important;
    margin-left: 2px !important; /* ближе к основной цифре */
}

.underplaylist-actions .quick-rate {
    border-top: none !important;
    padding-top: 0 !important;
}

.underplaylist-actions .rate-label-sm {
    display: none !important; /* убираем "Оценить:" */
}

html[data-theme="light"] .underplaylist-actions .rating-suffix,
html[data-theme="light_japan"] .underplaylist-actions .rating-suffix {
    color: rgba(15, 23, 42, 0.6) !important;
}

/* ============================================
   ВЕРХНИЙ БЛОК "ПРОДОЛЖИТЬ" + ТУМБЛЕР + КНОПКА
   ============================================ */
.underplaylist-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.underplaylist-actions .continue-text {
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    margin: 0 0 6px 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.underplaylist-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Кнопка "Смотреть" — короче */
.underplaylist-actions .continue-button {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 18px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
    border-radius: 8px !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Тумблер автопереключения серий */
.auto-next-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-secondary, rgba(255, 255, 255, 0.12));
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-secondary, #cccccc);
    flex: 0 0 auto;
    white-space: nowrap;
    height: 32px; /* такой же высоты, как кнопка "Смотреть" */
}

.auto-next-toggle:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
    border-color: var(--border-primary, rgba(255, 255, 255, 0.20));
}

.auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.35) !important; /* ярче зелёный */
    border-color: rgba(34, 197, 94, 0.85) !important;
    color: rgba(34, 197, 94, 1) !important;
    box-shadow: 
        0 0 16px rgba(34, 197, 94, 0.45),
        0 0 32px rgba(34, 197, 94, 0.25),
        inset 0 0 12px rgba(34, 197, 94, 0.15) !important;
    animation: auto-glow-pulse 2s ease-in-out infinite !important;
}

@keyframes auto-glow-pulse {
    0%, 100% {
        box-shadow: 
            0 0 16px rgba(34, 197, 94, 0.45),
            0 0 32px rgba(34, 197, 94, 0.25),
            inset 0 0 12px rgba(34, 197, 94, 0.15);
    }
    50% {
        box-shadow: 
            0 0 24px rgba(34, 197, 94, 0.65),
            0 0 48px rgba(34, 197, 94, 0.35),
            inset 0 0 16px rgba(34, 197, 94, 0.25);
    }
}

html[data-theme="light"] .auto-next-toggle,
html[data-theme="light_japan"] .auto-next-toggle {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-secondary, #666);
}

html[data-theme="light"] .auto-next-toggle:hover,
html[data-theme="light_japan"] .auto-next-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.20);
}

html[data-theme="light"] .auto-next-toggle[aria-pressed="true"],
html[data-theme="light_japan"] .auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
    color: #16a34a;
}

/* Иконка (спиннер) для автопереключения */
.auto-next-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.auto-next-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auto-next-toggle[aria-pressed="true"] .auto-next-icon {
    animation: auto-next-spin 2.5s linear infinite; /* медленнее для плавности */
}

@keyframes auto-next-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   РЕЙТИНГ: КРУПНАЯ ОЦЕНКА + РАМКА ДЛЯ СЧЁТЧИКА
   ============================================ */
/* Основная оценка (например "4.5") — делаем крупной, но не огромной, чтобы блок совпал с левым */
.underplaylist-actions .rating-value-lg {
    font-size: 48px !important; /* было 56px → немного уменьшили */
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* "/10" — прижимаем вплотную к основной цифре, БЕЗ gap */
.underplaylist-actions .rating-suffix {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-left: -2px !important; /* минимальный отрицательный отступ для плотного прилегания */
}

/* Весь блок рейтинга (цифра + /10 + счётчик) — поднимаем ближе к верхней линии */
.underplaylist-actions .rating-display-compact {
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    margin-bottom: 8px !important; /* было 10px → уменьшили до 8px */
    margin-top: -2px !important; /* поднимаем весь блок чуть выше */
    gap: 0 !important; /* ОБЯЗАТЕЛЬНО 0 — убираем gap, элементы вплотную */
}

/* Дополнительно: для всех вложенных элементов убираем gap */
.underplaylist-rating .rating-display-compact {
    gap: 0 !important;
}

/* Счётчик оценок справа — стилизуем под тему (используем цвета темы) */
.underplaylist-actions .rating-count-compact {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 8px !important;
    margin-left: 8px !important;
    border-radius: 6px !important;
    background: var(--color-primary-alpha-15, rgba(255, 193, 7, 0.15)) !important; /* фон в цвете темы */
    border: 1px solid var(--color-primary-alpha-35, rgba(255, 193, 7, 0.35)) !important; /* рамка в цвете темы */
    color: var(--color-primary, #ffc107) !important; /* текст в цвете темы */
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* Добавляем " оценок" после числа */
.underplaylist-actions .rating-count-compact::after {
    content: ' оценок';
    margin-left: 3px;
}

/* Светлая тема — адаптируем под светлый фон */
html[data-theme="light"] .underplaylist-actions .rating-count-compact,
html[data-theme="light_japan"] .underplaylist-actions .rating-count-compact {
    background: var(--color-primary-alpha-12, rgba(34, 197, 94, 0.12)) !important;
    border-color: var(--color-primary-alpha-30, rgba(34, 197, 94, 0.30)) !important;
    color: var(--color-primary, #22c55e) !important;
}

/* Неоновая тема — циановый/фиолетовый */
html[data-theme="neon"] .underplaylist-actions .rating-count-compact {
    background: rgba(0, 243, 255, 0.15) !important; /* циановый фон */
    border-color: rgba(0, 243, 255, 0.40) !important; /* циановая рамка */
    color: #00f3ff !important; /* циановый текст */
}

/* Усиливаем визуал активной кнопки "Авто" — более яркий зелёный */
.auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.20) !important; /* ярче фон */
    border-color: rgba(34, 197, 94, 0.55) !important; /* ярче рамка */
    color: rgba(34, 197, 94, 1) !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.25) !important; /* свечение */
}

html[data-theme="light"] .auto-next-toggle[aria-pressed="true"],
html[data-theme="light_japan"] .auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.18) !important;
    border-color: rgba(34, 197, 94, 0.50) !important;
    color: #16a34a !important;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.20) !important;
}

/* ============================================
   ЛЕВЫЙ БЛОК (плееры/озвучка) — ЗАКРУГЛЕНИЕ УГЛОВ
   ============================================ */
/* Явное закругление для левого блока как у правого */
.video-content .underplayer-layout {
    border-radius: 12px !important;
    overflow: hidden; /* обрезаем внутренние элементы по скруглению */
}

.video-content.underplayer-panel {
    border-radius: 12px !important;
}

.video-content .underplayer-left {
    border-radius: 12px !important; /* закругляем и внутренний блок */
}

/* ============================================
   ЛЕВЫЙ БЛОК (плееры/озвучка) — КНОПКИ КОМПАКТНЕЕ (как на локалке)
   Цель: убрать "огромные" кнопки, НЕ меняя логику плеера.
   ============================================ */
.video-content.underplayer-panel #videoHostsBlock .btn-tag--player,
.video-content.underplayer-panel #voiceoversBlock .btn-tag--voice {
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    border-radius: 999px !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
    gap: 10px !important;
}

/* В неоне ранее встречался scale(...) на active — на этой панели не раздуваем */
html[data-theme="neon"] .video-content.underplayer-panel #videoHostsBlock .btn-tag--player.active,
html[data-theme="neon"] .video-content.underplayer-panel #voiceoversBlock .btn-tag--voice.active {
    transform: none !important;
}

/* ============================================
   ПЛЕЕР: ВЫБОР КАЧЕСТВА (HLS) — ОВЕРЛЕЙ ВНУТРИ ПЛЕЕРА
   ============================================ */
/* Контейнер плеера — база для абсолютного позиционирования */
#videoPlayerContainer {
    position: relative;
}

/* Оверлей выбора качества */
.player-quality-row--overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[data-theme="light"] .player-quality-row--overlay,
html[data-theme="light_japan"] .player-quality-row--overlay {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.16);
}

.player-quality-row--overlay .rate-label-sm {
    display: inline-flex !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
}

html[data-theme="light"] .player-quality-row--overlay .rate-label-sm,
html[data-theme="light_japan"] .player-quality-row--overlay .rate-label-sm {
    color: rgba(15, 23, 42, 0.72);
}

.player-quality-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 30px;
    padding: 0 30px 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.20);
    outline: none;
    cursor: pointer;
    line-height: 30px;
}

.player-quality-select:focus {
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

html[data-theme="light"] .player-quality-select,
html[data-theme="light_japan"] .player-quality-select {
    color: rgba(15, 23, 42, 0.92);
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.16);
}

/* На очень узких экранах — чуть компактнее */
@media (max-width: 420px) {
    .player-quality-row--overlay {
        top: 8px;
        right: 8px;
        padding: 6px 8px;
        gap: 6px;
    }
    .player-quality-select {
        height: 28px;
        line-height: 28px;
        font-size: 11px;
        padding-left: 8px;
    }
}
   ============================================ */

/* Убираем фон/паддинг у блока рейтинга внутри .underplaylist-actions */
.underplaylist-actions .player-rating-block,
.underplaylist-rating.player-rating-block {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.underplaylist-actions .rating-display-compact {
    margin-bottom: 10px !important; /* промежуток до кнопок оценки */
}

.underplaylist-actions .rating-suffix {
    font-size: 20px !important; /* крупнее "/10" */
    font-weight: 700 !important;
    margin-left: 2px !important; /* ближе к основной цифре */
}

.underplaylist-actions .quick-rate {
    border-top: none !important;
    padding-top: 0 !important;
}

.underplaylist-actions .rate-label-sm {
    display: none !important; /* убираем "Оценить:" */
}

html[data-theme="light"] .underplaylist-actions .rating-suffix,
html[data-theme="light_japan"] .underplaylist-actions .rating-suffix {
    color: rgba(15, 23, 42, 0.6) !important;
}

/* ============================================
   ВЕРХНИЙ БЛОК "ПРОДОЛЖИТЬ" + ТУМБЛЕР + КНОПКА
   ============================================ */
.underplaylist-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.underplaylist-actions .continue-text {
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    margin: 0 0 6px 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.underplaylist-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Кнопка "Смотреть" — короче */
.underplaylist-actions .continue-button {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 18px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
    border-radius: 8px !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Тумблер автопереключения серий */
.auto-next-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-secondary, rgba(255, 255, 255, 0.12));
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-secondary, #cccccc);
    flex: 0 0 auto;
    white-space: nowrap;
    height: 32px; /* такой же высоты, как кнопка "Смотреть" */
}

.auto-next-toggle:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
    border-color: var(--border-primary, rgba(255, 255, 255, 0.20));
}

.auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.35) !important; /* ярче зелёный */
    border-color: rgba(34, 197, 94, 0.85) !important;
    color: rgba(34, 197, 94, 1) !important;
    box-shadow: 
        0 0 16px rgba(34, 197, 94, 0.45),
        0 0 32px rgba(34, 197, 94, 0.25),
        inset 0 0 12px rgba(34, 197, 94, 0.15) !important;
    animation: auto-glow-pulse 2s ease-in-out infinite !important;
}

@keyframes auto-glow-pulse {
    0%, 100% {
        box-shadow: 
            0 0 16px rgba(34, 197, 94, 0.45),
            0 0 32px rgba(34, 197, 94, 0.25),
            inset 0 0 12px rgba(34, 197, 94, 0.15);
    }
    50% {
        box-shadow: 
            0 0 24px rgba(34, 197, 94, 0.65),
            0 0 48px rgba(34, 197, 94, 0.35),
            inset 0 0 16px rgba(34, 197, 94, 0.25);
    }
}

html[data-theme="light"] .auto-next-toggle,
html[data-theme="light_japan"] .auto-next-toggle {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-secondary, #666);
}

html[data-theme="light"] .auto-next-toggle:hover,
html[data-theme="light_japan"] .auto-next-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.20);
}

html[data-theme="light"] .auto-next-toggle[aria-pressed="true"],
html[data-theme="light_japan"] .auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
    color: #16a34a;
}

/* Иконка (спиннер) для автопереключения */
.auto-next-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.auto-next-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auto-next-toggle[aria-pressed="true"] .auto-next-icon {
    animation: auto-next-spin 2.5s linear infinite; /* медленнее для плавности */
}

@keyframes auto-next-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   РЕЙТИНГ: КРУПНАЯ ОЦЕНКА + РАМКА ДЛЯ СЧЁТЧИКА
   ============================================ */
/* Основная оценка (например "4.5") — делаем крупной, но не огромной, чтобы блок совпал с левым */
.underplaylist-actions .rating-value-lg {
    font-size: 48px !important; /* было 56px → немного уменьшили */
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* "/10" — прижимаем вплотную к основной цифре, БЕЗ gap */
.underplaylist-actions .rating-suffix {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-left: -2px !important; /* минимальный отрицательный отступ для плотного прилегания */
}

/* Весь блок рейтинга (цифра + /10 + счётчик) — поднимаем ближе к верхней линии */
.underplaylist-actions .rating-display-compact {
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    margin-bottom: 8px !important; /* было 10px → уменьшили до 8px */
    margin-top: -2px !important; /* поднимаем весь блок чуть выше */
    gap: 0 !important; /* ОБЯЗАТЕЛЬНО 0 — убираем gap, элементы вплотную */
}

/* Дополнительно: для всех вложенных элементов убираем gap */
.underplaylist-rating .rating-display-compact {
    gap: 0 !important;
}

/* Счётчик оценок справа — стилизуем под тему (используем цвета темы) */
.underplaylist-actions .rating-count-compact {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 8px !important;
    margin-left: 8px !important;
    border-radius: 6px !important;
    background: var(--color-primary-alpha-15, rgba(255, 193, 7, 0.15)) !important; /* фон в цвете темы */
    border: 1px solid var(--color-primary-alpha-35, rgba(255, 193, 7, 0.35)) !important; /* рамка в цвете темы */
    color: var(--color-primary, #ffc107) !important; /* текст в цвете темы */
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* Добавляем " оценок" после числа */
.underplaylist-actions .rating-count-compact::after {
    content: ' оценок';
    margin-left: 3px;
}

/* Светлая тема — адаптируем под светлый фон */
html[data-theme="light"] .underplaylist-actions .rating-count-compact,
html[data-theme="light_japan"] .underplaylist-actions .rating-count-compact {
    background: var(--color-primary-alpha-12, rgba(34, 197, 94, 0.12)) !important;
    border-color: var(--color-primary-alpha-30, rgba(34, 197, 94, 0.30)) !important;
    color: var(--color-primary, #22c55e) !important;
}

/* Неоновая тема — циановый/фиолетовый */
html[data-theme="neon"] .underplaylist-actions .rating-count-compact {
    background: rgba(0, 243, 255, 0.15) !important; /* циановый фон */
    border-color: rgba(0, 243, 255, 0.40) !important; /* циановая рамка */
    color: #00f3ff !important; /* циановый текст */
}

/* Усиливаем визуал активной кнопки "Авто" — более яркий зелёный */
.auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.20) !important; /* ярче фон */
    border-color: rgba(34, 197, 94, 0.55) !important; /* ярче рамка */
    color: rgba(34, 197, 94, 1) !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.25) !important; /* свечение */
}

html[data-theme="light"] .auto-next-toggle[aria-pressed="true"],
html[data-theme="light_japan"] .auto-next-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.18) !important;
    border-color: rgba(34, 197, 94, 0.50) !important;
    color: #16a34a !important;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.20) !important;
}

/* ============================================
   ЛЕВЫЙ БЛОК (плееры/озвучка) — ЗАКРУГЛЕНИЕ УГЛОВ
   ============================================ */
/* Явное закругление для левого блока как у правого */
.video-content .underplayer-layout {
    border-radius: 12px !important;
    overflow: hidden; /* обрезаем внутренние элементы по скруглению */
}

.video-content.underplayer-panel {
    border-radius: 12px !important;
}

.video-content .underplayer-left {
    border-radius: 12px !important; /* закругляем и внутренний блок */
}

/* ============================================
   ПЛЕЕР: ВЫБОР КАЧЕСТВА (HLS) — ОВЕРЛЕЙ ВНУТРИ ПЛЕЕРА
   ============================================ */
/* Контейнер плеера — база для абсолютного позиционирования */
#videoPlayerContainer {
    position: relative;
}

/* Оверлей выбора качества */
.player-quality-row--overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[data-theme="light"] .player-quality-row--overlay,
html[data-theme="light_japan"] .player-quality-row--overlay {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.16);
}

.player-quality-row--overlay .rate-label-sm {
    display: inline-flex !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
}

html[data-theme="light"] .player-quality-row--overlay .rate-label-sm,
html[data-theme="light_japan"] .player-quality-row--overlay .rate-label-sm {
    color: rgba(15, 23, 42, 0.72);
}

.player-quality-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 30px;
    padding: 0 30px 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.20);
    outline: none;
    cursor: pointer;
    line-height: 30px;
}

.player-quality-select:focus {
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

html[data-theme="light"] .player-quality-select,
html[data-theme="light_japan"] .player-quality-select {
    color: rgba(15, 23, 42, 0.92);
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.16);
}

/* На очень узких экранах — чуть компактнее */
@media (max-width: 420px) {
    .player-quality-row--overlay {
        top: 8px;
        right: 8px;
        padding: 6px 8px;
        gap: 6px;
    }
    .player-quality-select {
        height: 28px;
        line-height: 28px;
        font-size: 11px;
        padding-left: 8px;
    }
}