/* =========================================================
 *  COMMENTS PAGE PLUGIN — M.E.R.Y.O.S.A.B Electronics
 *  Полный файл стилей comments-page-plugin.css
 *  Версия 2.0 - Полный дизайн страницы отзывов
 * =======================================================*/

/* ---------- БАЗОВЫЕ СТИЛИ ---------- */
/* Вместо глобальных стилей - стилизуем только контейнер плагина */
.msb-plugin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Стили только для заголовков внутри плагина */
.msb-plugin-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(30, 64, 175, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---------- БАЗОВЫЙ КОНТЕЙНЕР ---------- */

.msb-comments-wrapper {
    max-width: 1080px; /* УВЕЛИЧЕНО с 880px до 1080px */
    margin: 24px auto;
    padding: 28px 30px 32px;
    background: #0f172a;
    border-radius: 24px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.msb-comments-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.msb-comments-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
    z-index: 1;
}

.msb-comments-wrapper a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.msb-comments-wrapper a:hover {
    color: #93c5fd;
    /* text-decoration: underline; */
}

/* ---------- ВЕРХНЯЯ ПАНЕЛЬ ---------- */

.msb-review-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.msb-comments-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msb-comments-title i {
    color: #60a5fa;
    font-size: 1.3rem;
}

.msb-comments-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #94a3b8;
}

/* ---------- КНОПКИ ОСНОВНЫЕ / ВТОРИЧНЫЕ ---------- */

.msb-primary-button,
.msb-open-review-modal {
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    position: relative;
    overflow: hidden;
}

.msb-primary-button::before,
.msb-open-review-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.msb-primary-button:hover,
.msb-open-review-modal:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.6);
}

.msb-primary-button:hover::before,
.msb-open-review-modal:hover::before {
    left: 100%;
}

.msb-secondary-button {
    border-radius: 12px;
    border: 1px solid #475569;
    padding: 10px 18px;
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.msb-secondary-button:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- СОРТИРОВКА ---------- */

.msb-sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.msb-sort-label {
    font-weight: 600;
    margin-right: 4px;
    font-size: 0.95rem;
    color: #cbd5e1;
}

.msb-sort-chip {
    border: 1px solid #475569;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    background: rgba(30, 41, 59, 0.8);
    cursor: pointer;
    color: #e2e8f0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.msb-sort-chip:hover {
    border-color: #60a5fa;
    background: rgba(30, 64, 175, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.msb-sort-chip--active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: #3b82f6;
    color: #f8fafc;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* ---------- СПИСОК ОТЗЫВОВ ---------- */

.msb-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

/* ---------- КАРТОЧКА ОТЗЫВА ---------- */

.msb-comment-card {
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.8);
    padding: 20px;
    border: 1px solid rgba(71, 85, 105, 0.7);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.msb-comment-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.msb-comment-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.msb-comment-card:hover::before {
    opacity: 1;
}

.msb-comment-card--child {
    margin-top: 16px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 14px;
    border-color: rgba(71, 85, 105, 0.5);
    position: relative;
}

.msb-comment-card--child::after {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 2px;
    height: 8px;
    background: rgba(96, 165, 250, 0.5);
}

/* ---------- ШАПКА КАРТОЧКИ ---------- */

.msb-comment-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.msb-comment-author-block {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.msb-comment-avatar {
    position: relative;
}

.msb-comment-avatar img,
.msb-comment-avatar .avatar {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 3px solid rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.msb-comment-card:hover .msb-comment-avatar img,
.msb-comment-card:hover .msb-comment-avatar .avatar {
    border-color: rgba(96, 165, 250, 0.7);
    transform: scale(1.05);
}

.msb-comment-author-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.msb-comment-author-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msb-comment-author-verified {
    color: #10b981;
    font-size: 0.9rem;
}

.msb-comment-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ---------- ЧИПЫ (СТРАНА / УСЛУГА) ---------- */

.msb-chip {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.msb-chip-country {
    border-color: #10b981;
    color: #10b981;
}

.msb-chip-service {
    border-color: #38bdf8;
    color: #38bdf8;
}

.msb-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ---------- РЕЙТИНГ ЗВЁЗДАМИ ---------- */

.msb-comment-rating {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.msb-stars {
    color: #fbbf24;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    letter-spacing: 2px;
}

/* ---------- ТЕКСТ ОТЗЫВА ---------- */

.msb-comment-content {
    margin-top: 12px;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.7;
}

.msb-comment-content p {
    margin: 0 0 10px;
}

.msb-comment-content p:last-child {
    margin-bottom: 0;
}

/* ---------- МЕДИА ВНУТРИ ОТЗЫВА ---------- */

.msb-comment-media {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.msb-comment-media-item {
    max-width: 150px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #475569;
    background: #0f172a;
    transition: all 0.3s ease;
    cursor: pointer;
}

.msb-comment-media-item:hover {
    transform: scale(1.05);
    border-color: #60a5fa;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.msb-comment-media-item img {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.msb-comment-media-item video {
    width: 150px;
    height: 100px;
    display: block;
    object-fit: cover;
}

/* ---------- БЛОК ДЕЙСТВИЙ ПОД ОТЗЫВОМ ---------- */

.msb-comment-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.msb-comment-actions-left,
.msb-comment-actions-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Кнопка "Ответить" */

.msb-reply-button {
    border-radius: 12px;
    border: 1px solid #475569;
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.msb-reply-button:hover {
    background: rgba(30, 64, 175, 0.2);
    border-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

/* ---------- РЕАКЦИИ 👍😍🤯 ---------- */

.msb-reactions-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.msb-reaction-button {
    border-radius: 999px;
    border: 1px solid #475569;
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    transition: all 0.25s ease;
}

.msb-reaction-button:hover {
    background: rgba(30, 64, 175, 0.2);
    border-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.msb-reaction-button--voted {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: #3b82f6;
    color: #f8fafc;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.msb-reaction-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.msb-reaction-count {
    font-weight: 700;
    font-size: 0.9rem;
}

/* ============ КНОПКА "ПОЛЕЗНЫЙ ОТЗЫВ" ============ */

.msb-helpful-button {
    border-radius: 14px;
    border: 1px solid #475569;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.8));
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Эффект свечения при наведении */
.msb-helpful-button::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.msb-helpful-button:hover {
    transform: translateY(-3px);
    border-color: #10b981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    color: #ecfdf5;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(20, 83, 45, 0.2));
}

.msb-helpful-button:hover::before {
    opacity: 0.4;
}

/* Счетчик */
.msb-helpful-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #10b981;
    padding: 0 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.msb-helpful-button:hover .msb-helpful-count {
    background: rgba(16, 185, 129, 0.4);
    border-color: #10b981;
    color: #ecfdf5;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* Активное состояние (после нажатия) */
.msb-helpful-button.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(20, 83, 45, 0.4));
    border-color: #10b981;
    color: #ecfdf5;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.msb-helpful-button.active .msb-helpful-count {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    border-color: #34d399;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Анимация при нажатии */
.msb-helpful-button:active {
    transform: scale(0.98);
}

/* Эффект пульсации при голосовании */
@keyframes helpfulPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

.msb-helpful-button.clicked {
    animation: helpfulPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Состояние загрузки */
.msb-helpful-button.loading {
    opacity: 0.8;
    cursor: wait;
}

.msb-helpful-button.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Индикатор "уже голосовал" */
.msb-helpful-button.voted {
    cursor: not-allowed;
    opacity: 0.7;
}

.msb-helpful-button.voted:hover {
    transform: none;
    box-shadow: none;
}

.msb-helpful-button.voted:hover::before {
    opacity: 0;
}

/* ---------- ВЛОЖЕННЫЕ ОТВЕТЫ ---------- */

.msb-comment-children {
    margin-top: 16px;
    padding-left: 24px;
    border-left: 2px dashed #475569;
    position: relative;
}

.msb-comment-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: -1px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #475569, transparent);
}

/* ---------- ТЕКСТ "НЕТ ОТЗЫВОВ" ---------- */

.msb-no-comments {
    font-size: 1rem;
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    border: 2px dashed #475569;
}

/* ============ ПАГИНАЦИЯ В СТИЛЕ MERYOSAB ============ */

.msb-pagination {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(71, 85, 105, 0.5);
    position: relative;
}

.msb-pagination::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}

.msb-pagination__links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

/* Кнопки пагинации */
.msb-pagination__prev,
.msb-pagination__next {
    border-radius: 14px;
    border: 1px solid #475569;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.8));
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-width: 200px;
    justify-content: center;
}

/* Эффект свечения при наведении */
.msb-pagination__prev::before,
.msb-pagination__next::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb, #3b82f6);
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.msb-pagination__prev:hover,
.msb-pagination__next:hover 
{
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    color: #f8fafc;
}

.msb-pagination__prev:hover::before,
.msb-pagination__next:hover::before {
    opacity: 0.4;
}

/* Стрелки */
.msb-pagination__prev::after {
    content: "←";
    font-size: 1.1rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.msb-pagination__next::after {
    content: "→";
    font-size: 1.1rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
    order: 2;
}

.msb-pagination__prev:hover::after {
    transform: translateX(-3px);
}

.msb-pagination__next:hover::after {
    transform: translateX(3px);
}

/* Неактивное состояние */
.msb-pagination__prev[href=""]:not([href]),
.msb-pagination__next[href=""]:not([href]) {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.8);
}

/* Индикатор текущей страницы */
.msb-pagination__info {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.msb-pagination__info::before {
    content: "📄";
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Номера страниц */
.msb-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.msb-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #475569;
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.msb-pagination__page:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
    color: #f8fafc;
    transform: translateY(-2px);
}

.msb-pagination__page.active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: #3b82f6;
    color: #f8fafc;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.msb-pagination__page.ellipsis {
    background: transparent;
    border: none;
    cursor: default;
}

.msb-pagination__page.ellipsis:hover {
    transform: none;
    background: transparent;
}

/* ---------- ИНДИКАТОР "MERYOSAB Travel печатает..." ---------- */

.msb-ai-typing {
    font-size: 0.95rem;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.msb-ai-typing::after {
    content: '●●●';
    font-size: 0.8em;
    letter-spacing: 2px;
    animation: msb-ai-dots 1s infinite;
}

@keyframes msb-ai-dots {
    0%   { opacity: 0.2; }
    50%  { opacity: 1; }
    100% { opacity: 0.2; }
}

/* ---------- ФОРМА КОММЕНТАРИЯ ---------- */

.msb-comment-form-wrapper {
    margin-top: 30px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 18px;
    border: 1px solid rgba(71, 85, 105, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.msb-form-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msb-form-title i {
    color: #60a5fa;
}

.msb-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.msb-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.msb-form-field label {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 600;
}

.msb-form-field input[type="text"],
.msb-form-field input[type="email"],
.msb-form-field select,
.msb-form-field textarea {
    border-radius: 12px;
    border: 1px solid #475569;
    padding: 12px 16px;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.8);
    color: #f1f5f9;
    outline: none;
    width: 100%;
    transition: all 0.3s ease;
}

.msb-form-field input[type="text"]:focus,
.msb-form-field input[type="email"]:focus,
.msb-form-field select:focus,
.msb-form-field textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

.msb-form-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* ---------- РЕЙТИНГ В ФОРМЕ ---------- */

.msb-rating-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.msb-rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 8px;
    position: relative;
}

.msb-rating-stars input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.msb-rating-stars label {
    cursor: pointer;
    font-size: 2rem;
    color: #475569;
    transition: all 0.2s ease;
}

.msb-rating-stars label:hover,
.msb-rating-stars label:hover ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

.msb-rating-stars input[type="radio"]:checked ~ label {
    color: #fbbf24;
}

/* ---------- КНОПКА ОТПРАВКИ ---------- */

.msb-comment-form input[type="submit"],
.msb-comment-form button[type="submit"],
.comment-form input[type="submit"] {
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    margin-top: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.msb-comment-form input[type="submit"]:hover,
.comment-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.6);
}

/* ---------- РАСПОЛОЖЕНИЕ В СТРУКТУРЕ ---------- */

/* Кнопка в блоке действий слева */
.msb-comment-actions-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ---------- ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ ИНТЕРФЕЙСА ---------- */

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    border: 1px solid rgba(71, 85, 105, 0.5);
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 6px;
}

.footer-note {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px solid rgba(71, 85, 105, 0.5);
}

/* ---------- АДАПТИВНОСТЬ ---------- */

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .msb-comments-wrapper {
        padding: 20px 16px 24px;
        border-radius: 20px;
    }

    .msb-review-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .msb-sort-bar {
        padding: 10px 12px;
    }

    .msb-comment-card {
        padding: 16px;
    }

    .msb-comment-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .msb-comment-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .msb-comment-children {
        padding-left: 16px;
    }

    .msb-form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .msb-form-field {
        min-width: 100%;
    }

    /* Адаптивность пагинации */
    .msb-pagination__links {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .msb-pagination__prev,
    .msb-pagination__next {
        width: 100%;
        min-width: auto;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .msb-helpful-button {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .msb-comment-actions-left {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- МЕДИА ДЛЯ МОБИЛЬНЫХ ---------- */

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .msb-comments-wrapper {
        padding: 16px 12px 20px;
        border-radius: 16px;
    }
    
    .msb-comments-title {
        font-size: 1.2rem;
    }
    
    .msb-comments-subtitle {
        font-size: 0.85rem;
    }
    
    .msb-primary-button,
    .msb-open-review-modal {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .msb-comment-avatar img,
    .msb-comment-avatar .avatar {
        width: 40px;
        height: 40px;
    }
    
    .msb-comment-author-name {
        font-size: 1rem;
    }
    
    .msb-comment-content {
        font-size: 0.9rem;
    }
    
    .msb-comment-media-item {
        max-width: 100px;
        height: 80px;
    }
    
    .msb-comment-media-item video {
        width: 100px;
        height: 80px;
    }
    
    .msb-reaction-button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .msb-reply-button,
    .msb-helpful-button {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* Анимация появления страницы */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageFadeIn 0.8s ease-out;
}

/* Скрытие элементов при отсутствии контента */
.msb-comments-list:empty + .msb-pagination,
.msb-comments-list:empty ~ .msb-pagination {
    display: none;
}

/* Стили для состояния загрузки */
.msb-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.msb-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #3b82f6;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Стили для ошибок */
.msb-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    color: #fca5a5;
    font-size: 0.9rem;
    text-align: center;
}

.msb-error::before {
    content: "⚠️";
    display: block;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Стили для успешных сообщений */
.msb-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    color: #a7f3d0;
    font-size: 0.9rem;
    text-align: center;
}

.msb-success::before {
    content: "✅";
    display: block;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Стили для информационных сообщений */
.msb-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    color: #93c5fd;
    font-size: 0.9rem;
    text-align: center;
}

.msb-info::before {
    content: "💡";
    display: block;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Стили для предупреждений */
.msb-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    color: #fcd34d;
    font-size: 0.9rem;
    text-align: center;
}

.msb-warning::before {
    content: "⚠️";
    display: block;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Стили для пустых состояний */
.msb-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.msb-empty-state::before {
    content: "📝";
    display: block;
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.msb-empty-state h3 {
    color: #cbd5e1;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.msb-empty-state p {
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.msb-button-loading {
    position: relative;
    opacity: 0.7;
    cursor: default;
}
