/**
 * Manga User Profile Frontend Styles
 * Version: 3.0
 */

/* ========== ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ ========== */
.user-profile-wrapper {
    background: #2d2d2d;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
}

.user-profile-header {
    display: flex;
    gap: 25px;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 25px;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #FCA311;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #aaa;
}

.user-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.user-login {
    font-family: monospace;
    background: rgba(255,255,255,0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

/* Статистика */
.user-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 15px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

.stat-item.active {
    background: rgba(252, 163, 17, 0.2);
    border-color: #FCA311;
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-count {
    font-size: 24px;
    font-weight: 700;
    color: #FCA311;
}

.stat-label {
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

/* Навигация по спискам */
.user-lists-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.list-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #aaa;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 30px;
}

.list-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.list-tab.active {
    color: #FCA311;
    background: rgba(252, 163, 17, 0.1);
}

.list-tab .tab-count {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
}

.list-tab.active .tab-count {
    background: #FCA311;
    color: #1e1e1e;
}

/* Контент списков */
.user-lists-content {
    min-height: 400px;
}

.list-content {
    display: none;
}

.list-content.active {
    display: block;
}

/* Элементы списка */
.list-items-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.list-item {
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.list-item:hover {
    transform: translateY(-3px);
    border-color: #FCA311;
}

.list-item-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.list-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-item-info {
    padding: 12px;
}

.list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    line-height: 1.4;
}

.list-item-title:hover {
    color: #FCA311;
}

.list-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #aaa;
}

.list-item-remove {
    background: none;
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.list-item-remove:hover {
    background: rgba(244, 67, 54, 0.2);
}

.list-loading {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.list-empty {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.list-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.list-empty h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}

.list-empty p {
    font-size: 14px;
}

/* Гостевое сообщение */
.user-profile-guest {
    background: #2d2d2d;
    border-radius: 20px;
    padding: 50px 20px;
    text-align: center;
    margin: 20px 0;
}

.guest-message .guest-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
}

.guest-message h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 15px;
}

.guest-message p {
    color: #aaa;
    margin-bottom: 25px;
}

.login-btn {
    display: inline-block;
    background: #FCA311;
    color: #1e1e1e;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.login-btn:hover {
    background: #e09100;
    transform: translateY(-2px);
    color: #1e1e1e;
}

/* ========== КНОПКИ ДЕЙСТВИЙ ========== */
.manga-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
}

.manga-list-button-container-custom {
    position: relative;
    width: 100%;
}

.manga-list-main-button-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    border: 1px solid;
    background: #2c3e50;
    color: #FFFFFF;
}

.manga-list-main-button-custom:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.manga-list-main-button-custom .button-text {
    flex: 1;
    text-align: center;
}

.manga-list-main-button-custom .button-arrow {
    transition: transform 0.2s ease;
    margin-left: auto;
}

.manga-list-main-button-custom.open .button-arrow {
    transform: rotate(180deg);
}

.manga-list-dropdown-custom {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.1);
}

.manga-list-dropdown-custom.open {
    display: block;
    animation: dropdown-fade 0.2s ease;
}

@keyframes dropdown-fade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-option-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 13px;
}

.dropdown-option-custom:hover {
    background: rgba(252, 163, 17, 0.2);
    color: #FCA311;
}

.option-icon {
    font-size: 14px;
    width: 24px;
}

.manga-read-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    border: 1px solid;
    background: #2c3e50;
    color: #FFFFFF;
}

.manga-read-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.read-text {
    flex: 1;
    text-align: center;
}

.read-icon {
    margin-left: 8px;
}

.manga-update-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #E63946;
    color: white;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
}

.manga-update-button:hover {
    background: #c92c3a;
    transform: translateY(-2px);
    color: white;
}

.manga-update-button.loading {
    position: relative;
    color: transparent !important;
}

.manga-update-button.loading:after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
    to { transform: rotate(360deg); }
}

.update-success {
    display: none;
}

/* ========== РЕЙТИНГ ========== */
.rating-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

.rating-average {
    display: flex;
    align-items: baseline;
    gap: 2px;
    background: rgba(0,0,0,0.4);
    padding: 6px 15px;
    border-radius: 40px;
    flex-shrink: 0;
}

.average-value {
    font-size: 28px;
    font-weight: 700;
    color: #FCA311;
    line-height: 1;
}

.average-divider, .average-max {
    font-size: 18px;
    color: #888;
}

.rating-select-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.rating-vote-count {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
    white-space: nowrap;
}

.rating-open-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(252, 163, 17, 0.15);
    border: 1px solid rgba(252, 163, 17, 0.3);
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #FCA311;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
}

.rating-open-modal-btn:hover {
    background: rgba(252, 163, 17, 0.25);
    transform: translateY(-2px);
    border-color: #FCA311;
}

.rating-btn-icon {
    font-size: 14px;
}

.rating-btn-text {
    font-size: 13px;
}

/* Модальное окно */
.rating-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ratingFadeIn 0.3s ease;
}

.rating-modal-container.compact {
    max-width: 450px;
    width: 90%;
    max-height: auto;
    overflow: visible;
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(252, 163, 17, 0.3);
    animation: ratingSlideUp 0.3s ease;
}

@keyframes ratingFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ratingSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #FCA311;
    margin: 0;
}

.rating-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.rating-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.rating-modal-content {
    padding: 20px;
}

.rating-modal-manga-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
}

.rating-modal-current-rating {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    margin-bottom: 20px;
}

.rating-stars-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-star-item-compact {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 45px;
}

.rating-star-item-compact:hover {
    background: rgba(252, 163, 17, 0.2);
    border-color: #FCA311;
    transform: translateY(-2px);
}

.rating-star-item-compact.selected {
    background: rgba(252, 163, 17, 0.3);
    border-color: #FCA311;
    box-shadow: 0 0 10px rgba(252, 163, 17, 0.3);
}

.rating-star-item-compact.loading {
    opacity: 0.6;
    cursor: wait;
    position: relative;
}

.rating-star-item-compact.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(252, 163, 17, 0.3);
    border-top-color: #FCA311;
    border-radius: 50%;
    animation: ratingSpin 0.6s linear infinite;
}

.star-number-compact {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.rating-star-item-compact:hover .star-number-compact {
    color: #FCA311;
}

.rating-modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-modal-remove {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #f44336;
    font-size: 13px;
    font-weight: 500;
}

.rating-modal-remove:hover {
    background: rgba(244, 67, 54, 0.25);
    transform: translateY(-2px);
}

.rating-modal-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.rating-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@keyframes ratingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== ТАБЫ ========== */
.manga-tabs {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.tabs-wrapper {
    position: relative;
}

.tabs-header {
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.3);
    padding: 0 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

/* Градиенты для индикации прокрутки */
.tabs-wrapper::before,
.tabs-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.2s ease;
}

/* Левый градиент (появляется при прокрутке вправо) */
.tabs-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
    opacity: 0;
}

/* Правый градиент (появляется, если контент не помещается) */
.tabs-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
    opacity: 1;
}

/* Классы для управления видимостью градиентов */
.tabs-wrapper.has-scroll-left::before {
    opacity: 1;
}

.tabs-wrapper.has-scroll-right::after {
    opacity: 1;
}

/* Если контент не прокручивается, правый градиент скрыт */
.tabs-wrapper.no-scroll::after {
    opacity: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #FCA311;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #FCA311;
    border-radius: 3px;
}

.tabs-content {
    padding: 25px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== КНОПКИ УПРАВЛЕНИЯ ГЛАВАМИ ========== */
.chapters-header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.order-toggle-btn,
.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(252, 163, 17, 0.15);
    border: 1px solid rgba(252, 163, 17, 0.3);
    padding: 8px 12px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #FCA311;
}

.order-toggle-btn:hover,
.view-toggle-btn:hover {
    background: rgba(252, 163, 17, 0.25);
    transform: translateY(-1px);
}

.order-toggle-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.order-toggle-btn.loading .order-icon img,
.view-toggle-btn.loading span img {
    animation: spin 1s linear infinite;
}

/* ========== СПИСОК ГЛАВ ========== */
.manga-chapters {
    background: transparent;
    padding: 0;
}

/* Режим списка (по умолчанию) */
.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.chapters-list::-webkit-scrollbar {
    width: 6px;
}

.chapters-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.chapters-list::-webkit-scrollbar-thumb {
    background: #FCA311;
    border-radius: 10px;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.chapter-item:hover {
    background: rgba(252,163,17,0.1);
    transform: translateX(5px);
}

.chapter-number {
    color: #fff;
    font-weight: 500;
    font-size: 13px;
}

.chapter-date {
    color: #888;
    font-size: 11px;
}

/* Режим плитки (сетка) */
.chapters-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.chapters-list.grid-view .chapter-item {
    flex-direction: column;
    text-align: center;
    gap: 0;
    padding: 16px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}

.chapters-list.grid-view .chapter-item:hover {
    transform: translateY(-3px);
    background: rgba(252,163,17,0.15);
    border-color: #FCA311;
}

.chapters-list.grid-view .chapter-number {
    font-size: 14px;
    font-weight: 600;
}

.chapters-list.grid-view .chapter-date {
    display: none;
}

/* Стили для томов в режиме плитки */
.chapters-list.grid-view .volume-header {
    grid-column: 1 / -1;
    margin: 8px 0 4px 0;
    padding: 6px 12px;
    background: rgba(252, 163, 17, 0.15);
    border-left: 3px solid #FCA311;
    border-radius: 8px;
}

.chapters-list.grid-view .volume-header .volume-name {
    font-size: 12px;
}

/* Адаптивность для плитки */
@media (max-width: 768px) {
    .chapters-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .chapters-list.grid-view .chapter-item {
        padding: 12px 8px;
    }
    
    .chapters-list.grid-view .chapter-number {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .chapters-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
    
    .chapters-list.grid-view .chapter-item {
        padding: 10px 6px;
    }
    
    .chapters-list.grid-view .chapter-number {
        font-size: 11px;
    }
}

.volume-header {
    margin: 12px 0 8px 0;
    padding: 6px 10px;
    background: rgba(252, 163, 17, 0.1);
    border-left: 3px solid #FCA311;
    border-radius: 6px;
}

.volume-name {
    font-size: 13px;
    font-weight: 600;
    color: #FCA311;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chapters-empty {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.manga-notification-custom {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 24px;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    background: #1a1a1a;
    border: 1px solid rgba(252, 163, 17, 0.3);
    animation: notificationSlideDown 0.3s ease;
}

.manga-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    animation: notificationSlideDown 0.3s ease;
}

@keyframes notificationSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.manga-notification-custom.success,
.manga-notification.success {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-left: 4px solid #4CAF50;
}

.manga-notification-custom.error,
.manga-notification.error {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-left: 4px solid #f44336;
}

.notification-message {
    color: #fff;
    font-size: 14px;
}

.notification-message:before {
    content: '✓';
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #4CAF50;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    margin-right: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.manga-notification-custom.error .notification-message:before,
.manga-notification.error .notification-message:before {
    content: '✕';
    background: #f44336;
}

.notification-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FCA311;
    color: #1a1a1a;
    text-decoration: none;
    padding: 8px 22px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.notification-button:before {
    content: '📋';
    font-size: 14px;
}

.notification-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(252, 163, 17, 0.4);
    background: #ffb347;
    color: #1a1a1a;
}

/* ========== ОПИСАНИЕ ========== */
.manga-description {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.description-content {
    color: #ddd;
    line-height: 1.7;
    font-size: 14px;
}

.description-full {
    margin-top: 15px;
}

.description-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(252, 163, 17, 0.15);
    border: 1px solid rgba(252, 163, 17, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #FCA311;
    margin-top: 12px;
}

.description-toggle-btn:hover {
    background: rgba(252, 163, 17, 0.25);
    transform: translateY(-1px);
}

.description-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* ========== ДЕТАЛЬНАЯ ИНФОРМАЦИЯ ========== */
.manga-info-detailed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.info-label {
    min-width: 100px;
    font-weight: 600;
    color: #FCA311;
    font-size: 13px;
}

.info-value {
    flex: 1;
    color: #ddd;
    line-height: 1.5;
    font-size: 13px;
}

.info-tag {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin: 0 5px 5px 0;
    transition: all 0.2s ease;
}

.info-tag:hover {
    background: #FCA311;
    color: #1a1a1a;
}

/* ========== КОММЕНТАРИИ ========== */
.comments-block {
    color: #ddd;
}

.comments-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.comments-title {
    font-size: 18px;
    color: #FCA311;
    margin: 0;
    font-weight: 600;
}

.comment-respond {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #FCA311;
}

.comment-form .submit {
    background: #FCA311;
    color: #1a1a1a;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment-author .fn {
    font-weight: 600;
    color: #FCA311;
}

.comment-content {
    padding-left: 42px;
    line-height: 1.5;
    font-size: 13px;
}

/* ========== ПОХОЖИЕ ТАЙТЛЫ ========== */
.related-grid {
    display: grid;
    gap: 20px;
}

.related-item {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-cover {
    aspect-ratio: 3/4;
    overflow: hidden;
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-title {
    padding: 12px 10px;
    text-align: center;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    background: rgba(0,0,0,0.3);
}

.related-item:hover .related-title {
    color: #FCA311;
}

.related-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* ========== БАЗОВЫЕ СТИЛИ СТРАНИЦЫ ========== */
.custom-manga-page {
    background: #1a1a1a;
    padding: 30px 0;
    min-height: 100vh;
}

.custom-manga-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.manga-breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
    color: #888;
}

.manga-breadcrumb a {
    color: #FCA311;
    text-decoration: none;
}

.manga-breadcrumb a:hover {
    text-decoration: underline;
}

.manga-breadcrumb .separator {
    margin: 0 8px;
    color: #555;
}

.manga-main-layout {
    display: flex;
    gap: 40px;
    background: #2d2d2d;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

.manga-left-column {
    flex-shrink: 0;
    width: 280px;
}

.manga-cover-wrapper {
    width: 100%;
}

.manga-cover {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 2px solid #FCA311;
}

.manga-right-column {
    flex: 1;
    min-width: 0;
}

.manga-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
}

.manga-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.meta-item {
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    font-size: 14px;
}

.meta-label {
    color: #888;
    font-size: 12px;
}

.meta-value {
    color: #FCA311;
    font-weight: 600;
    font-size: 13px;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 992px) {
    .manga-main-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px;
    }
    .manga-left-column {
        width: 280px;
    }
    .manga-right-column {
        width: 100%;
    }
    .manga-title {
        text-align: center;
    }
    .manga-meta-grid {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .custom-manga-page {
        padding: 20px 0;
    }
    .manga-main-layout {
        padding: 20px;
    }
    .manga-left-column {
        width: 270px;
    }
    .manga-title {
        font-size: 22px;
    }
    .tabs-content {
        padding: 20px;
    }
    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    .info-row {
        flex-direction: column;
        text-align: center;
    }
    .info-label {
        min-width: auto;
        text-align: center;
    }
    .chapter-item {
        flex-direction: column;
        text-align: center;
    }
    .chapters-header {
        flex-direction: column;
        align-items: center;
    }
    .rating-container {
        flex-direction: column;
        align-items: stretch;
    }
    .rating-average {
        align-self: flex-start;
    }
    .rating-select-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .rating-vote-count {
        text-align: center;
    }
    .user-profile-header {
        flex-direction: column;
        text-align: center;
    }
    .user-meta {
        justify-content: center;
    }
    .list-items-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .manga-notification-custom,
    .manga-notification {
        top: 10px;
        max-width: 90%;
        white-space: normal;
        text-align: center;
        padding: 12px 20px;
    }
    
    /* Эффект обрезанного последнего таба */
    .tabs-header {
        padding-right: 30px;
        mask-image: linear-gradient(to right, black 85%, transparent 98%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 98%);
    }
}

@media (max-width: 640px) {
    .rating-modal-container.compact {
        max-width: 320px;
    }
    .rating-stars-compact {
        gap: 6px;
    }
    .rating-star-item-compact {
        padding: 6px 10px;
        min-width: 35px;
    }
    .star-number-compact {
        font-size: 12px;
    }
    .rating-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .rating-modal-remove,
    .rating-modal-cancel {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .manga-left-column {
        width: 240px;
    }
    .manga-title {
        font-size: 20px;
    }
    .tabs-content {
        padding: 15px;
    }
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rating-modal-container.compact {
        max-width: 280px;
    }
    .rating-star-item-compact {
        padding: 5px 8px;
        min-width: 30px;
    }
    .star-number-compact {
        font-size: 11px;
    }
    .manga-notification-custom,
    .manga-notification {
        padding: 10px 16px;
        font-size: 12px;
    }
    .user-avatar img {
        width: 80px;
        height: 80px;
    }
    .user-name {
        font-size: 20px;
    }
    .list-items-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}