/* ========== ОСНОВНЫЕ СТИЛИ ========== */

/* Заголовок страницы */
.rhr-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.rhr-header h1 {
    margin: 0 0 15px 0;
    font-size: 36px;
    font-weight: 700;
}

.rhr-description {
    font-size: 18px;
    opacity: 0.95;
    margin: 0 auto 20px;
    max-width: 800px;
    line-height: 1.6;
}

.rhr-stats-summary {
    display: inline-block;
    padding: 8px 25px;
    background: rgba(255,255,255,0.15);
    border-radius: 40px;
    font-size: 16px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Блок голосования на странице поста */
.rhr-vote-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 8px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.rhr-vote-header {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2d3748;
    text-align: center;
    letter-spacing: -0.5px;
    position: relative;
}

.rhr-vote-header:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 10px auto 0;
    border-radius: 3px;
}

.rhr-vote-buttons-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Кнопки голосования */
.rhr-vote-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 35px;
    border: none;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    min-width: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.rhr-vote-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.rhr-vote-button:hover:not(:disabled):before {
    width: 300px;
    height: 300px;
}

.rhr-vote-up {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.rhr-vote-up:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(76, 175, 80, 0.3);
}

.rhr-vote-down {
    background: linear-gradient(135deg, #f44336, #c62828);
}

.rhr-vote-down:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(244, 67, 54, 0.3);
}

.rhr-vote-button.active {
    opacity: 0.9;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.rhr-vote-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: scale(0.98);
}

.rhr-vote-icon {
    font-size: 24px;
}

.rhr-vote-text {
    margin-right: 5px;
}

.rhr-vote-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
}

/* Уведомления */
.rhr-vote-notification {
    text-align: center;
    padding: 15px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 500;
    animation: slideIn 0.5s ease;
}

.rhr-vote-notification.success {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.rhr-vote-notification.error {
    background: linear-gradient(135deg, #f44336, #c62828);
    color: white;
}

/* Статистика */
.rhr-vote-stats {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f7f9fc;
    border-radius: 15px;
    color: #4a5568;
    font-size: 15px;
}

.rhr-rating-value {
    font-weight: 700;
    font-size: 18px;
    color: #667eea;
}

/* ========== КОМПАКТНЫЕ КНОПКИ ДЛЯ СПИСКА ========== */

.rhr-compact-vote {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 4px;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.rhr-compact-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #4a5568;
    white-space: nowrap;
}

.rhr-compact-up:hover:not(:disabled) {
    background: #4CAF50;
    color: white;
}

.rhr-compact-down:hover:not(:disabled) {
    background: #f44336;
    color: white;
}

.rhr-compact-button.active {
    background: #667eea;
    color: white;
}

.rhr-compact-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rhr-compact-button .rhr-vote-count {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.rhr-compact-notification {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    margin-left: 10px;
    display: none;
}

/* ========== ТАБЛИЦА РЕЙТИНГА ========== */

.rhr-table-wrapper {
    margin: 30px 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.rhr-rating-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.rhr-rating-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rhr-rating-table th a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    transition: opacity 0.2s;
}

.rhr-rating-table th a:hover {
    opacity: 0.9;
    background: rgba(255,255,255,0.1);
}

.rhr-rating-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

/* Колонка с названием - обрезаем длинные названия */
.rhr-title-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rhr-title-cell a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rhr-title-cell a:hover {
    color: #667eea;
}

/* Бейджи категорий - ТОЧНЫЕ ЗНАЧЕНИЯ ПО ВАШИМ ДАННЫМ */
.rhr-category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Соло */
.rhr-category-badge[data-category="Соло"] {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* 2-4 игрока */
.rhr-category-badge[data-category="2-4 игрока"] {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

/* Клановый */
.rhr-category-badge[data-category="Клановый"] {
    background: #f3e5f5;
    color: #8e24aa;
    border: 1px solid #e1bee7;
}

/* Разное */
.rhr-category-badge[data-category="Разное"] {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

/* Рейтинг */
.rhr-rating-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.rating-high {
    background: #c8e6c9;
    color: #2e7d32;
}

.rating-medium {
    background: #fff3e0;
    color: #ef6c00;
}

.rating-low {
    background: #ffcdd2;
    color: #c62828;
}

/* ========== КРАСИВАЯ ПАГИНАЦИЯ ========== */

.rhr-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 25px 15px 15px;
    background: #f8faff;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    margin-top: 20px;
}

.rhr-page-link,
.rhr-page-current,
.rhr-page-dots {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rhr-page-link {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.rhr-page-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
}

.rhr-page-link.first,
.rhr-page-link.last,
.rhr-page-link.prev,
.rhr-page-link.next {
    font-size: 20px;
    font-weight: bold;
    min-width: 45px;
}

.rhr-page-current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    box-shadow: 0 5px 12px rgba(102, 126, 234, 0.4);
    cursor: default;
    font-weight: 700;
}

.rhr-page-dots {
    color: #a0aec0;
    cursor: default;
    background: transparent;
    box-shadow: none;
    min-width: 30px;
}

.rhr-page-info {
    text-align: center;
    color: #718096;
    font-size: 15px;
    padding: 0 0 20px 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .rhr-header h1 {
        font-size: 28px;
    }
    
    .rhr-description {
        font-size: 16px;
    }
    
    .rhr-vote-button {
        min-width: 160px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .rhr-rating-table {
        font-size: 13px;
    }
    
    .rhr-rating-table th a {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .rhr-rating-table td {
        padding: 10px 8px;
    }
    
    .rhr-category-badge,
    .rhr-rating-badge {
        padding: 2px 8px;
        font-size: 11px;
    }
    
    .rhr-votes-cell {
        font-size: 12px;
    }
    
    .rhr-votes-up {
        margin-right: 8px;
    }
    
    .rhr-page-link,
    .rhr-page-current,
    .rhr-page-dots {
        min-width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .rhr-pagination {
        gap: 3px;
        padding: 20px 10px 15px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .rhr-col-title { width: 40%; }
    .rhr-col-category { width: 20%; }
    .rhr-col-rating { width: 15%; }
    .rhr-col-votes { width: 25%; }
    
    .rhr-votes-up, .rhr-votes-down {
        display: block;
        margin: 2px 0;
    }
    
    .rhr-page-link,
    .rhr-page-current,
    .rhr-page-dots {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Новая ширина колонок для десктопов */
.rhr-col-title { width: 45% !important; }
.rhr-col-category { width: 15% !important; }
.rhr-col-rating { width: 13% !important; }
.rhr-col-votes { width: 25% !important; }

/* ========== УЛУЧШЕННЫЙ БЛОК ГОЛОСОВАНИЯ ========== */

.rhr-vote-section {
    margin: 40px 0;
    padding: 35px 30px;
    background: linear-gradient(145deg, #ffffff, #f5f9ff);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 8px 20px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.rhr-vote-header {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2d3748;
    text-align: center;
    letter-spacing: -0.5px;
    position: relative;
}

.rhr-vote-header:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 15px auto 0;
    border-radius: 4px;
}

.rhr-vote-buttons-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.rhr-vote-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 45px;
    border: none;
    border-radius: 60px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    min-width: 240px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.rhr-vote-up {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.rhr-vote-up:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(76, 175, 80, 0.3);
}

.rhr-vote-down {
    background: linear-gradient(135deg, #f44336, #c62828);
}

.rhr-vote-down:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(244, 67, 54, 0.3);
}

.rhr-vote-icon {
    font-size: 28px;
}

.rhr-vote-text {
    font-size: 18px;
}

.rhr-vote-badge {
    background: rgba(255,255,255,0.25);
    padding: 5px 15px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    margin-left: 5px;
    border: 1px solid rgba(255,255,255,0.3);
}

.rhr-vote-button.active {
    opacity: 0.9;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.4);
}

.rhr-vote-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: scale(0.98);
    filter: grayscale(0.3);
}

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

.rhr-votes-cell {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.rhr-table-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rhr-table-vote-up {
    background: #4CAF50;
    color: white;
}

.rhr-table-vote-up:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(76, 175, 80, 0.3);
}

.rhr-table-vote-down {
    background: #f44336;
    color: white;
}

.rhr-table-vote-down:hover:not(:disabled) {
    background: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(244, 67, 54, 0.3);
}

.rhr-table-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rhr-table-vote-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.rhr-table-notification {
    position: absolute;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
    display: none;
    z-index: 100;
}

.rhr-title-cell a[target="_blank"]:after {
    content: " ↗";
    font-size: 12px;
    opacity: 0.6;
    margin-left: 3px;
}

/* Убираем двойные границы в ячейках */
.rhr-rating-table td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Возвращаем тонкую границу между рейтингом и голосами */
.rhr-rating-table td:nth-child(3) {
    border-right: 1px solid #e2e8f0 !important;
}

/* Убираем всё лишнее у ячейки с кнопками */
.rhr-votes-cell {
    border: none !important;
}

/* Возвращаем тонкие границы между первыми тремя колонками */
.rhr-rating-table td:nth-child(1),
.rhr-rating-table td:nth-child(2) {
    border-right: 1px solid #e2e8f0 !important;
}

/* Для шапки тоже */
.rhr-rating-table th:nth-child(1),
.rhr-rating-table th:nth-child(2),
.rhr-rating-table th:nth-child(3) {
    border-right: 1px solid rgba(255,255,255,0.2) !important;
}

/* Фиксированная ширина для всех кнопок */
.rhr-table-vote-btn {
    width: 70px !important;        /* Фиксированная ширина */
    min-width: 70px !important;    /* Запрещаем сужаться */
    max-width: 70px !important;    /* Запрещаем расширяться */
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Если нужно чуть меньше для мобильных */
@media (max-width: 768px) {
    .rhr-table-vote-btn {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        padding: 4px 0 !important;
    }
}

/* Фиксированная ширина для больших кнопок на странице схемы */
.rhr-vote-button {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Для мобильных */
@media (max-width: 768px) {
    .rhr-vote-button {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
    }
}

/* Выравнивание по центру для рейтинга и категории */
.rhr-category-cell,
.rhr-rating-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Для шапки тоже по центру (опционально) */
.rhr-col-category a,
.rhr-col-rating a {
    justify-content: center !important;
}