/**
 * Manga User Profile Frontend Styles
 * Version: 6.2 - ДВУХУРОВНЕВЫЕ ТАБЫ (ОСНОВНЫЕ + ПОДТАБЫ СПИСКОВ)
 */

/* ========== ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ ========== */
.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;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.avatar-edit-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.avatar-image-container {
    position: relative;
    width: 120px;
    height: 120px;
}

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

.avatar-image-container.loading img {
    opacity: 0.5;
}

/* Спиннер загрузки аватара */
.avatar-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spinner-circle {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(252, 163, 17, 0.2);
    border-top-color: #FCA311;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.avatar-change-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 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #FCA311;
    font-size: 13px;
    font-weight: 500;
}

.avatar-change-btn:hover {
    background: rgba(252, 163, 17, 0.25);
    transform: translateY(-2px);
}

/* Модальное окно кропа аватара */
.avatar-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.avatar-crop-content {
    position: relative;
    z-index: 1;
    background: #2d2d2d;
    border-radius: 24px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(252, 163, 17, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.avatar-crop-header h3 {
    color: #FCA311;
    font-size: 18px;
    margin: 0;
}

.avatar-crop-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.avatar-crop-body {
    margin-bottom: 20px;
}

.avatar-crop-area {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 2px solid rgba(252, 163, 17, 0.2);
}

.avatar-crop-area img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.avatar-crop-hint {
    font-size: 12px;
    color: #888;
    text-align: center;
}

.avatar-crop-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-crop-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
    transition: all 0.2s;
}

.avatar-crop-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.avatar-crop-save {
    background: #FCA311;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.avatar-crop-save:hover:not(:disabled) {
    background: #e09100;
    transform: translateY(-1px);
}

.avatar-crop-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.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;
}

/* ========== РЕДАКТИРОВАНИЕ ПРОФИЛЯ ========== */
.edit-profile-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 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #FCA311;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
}

.edit-profile-btn:hover {
    background: rgba(252, 163, 17, 0.25);
    transform: translateY(-2px);
}

.edit-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.edit-profile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.edit-profile-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border-radius: 24px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(252, 163, 17, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s ease;
}

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

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

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

.edit-profile-header h3 {
    color: #FCA311;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

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

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #FCA311;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.1);
}

.form-hint {
    display: block;
    color: #FCA311;
    font-size: 12px;
    margin-top: 5px;
}

#emailConfirmCode {
    font-family: monospace;
    letter-spacing: 8px;
    text-align: center;
    font-size: 18px !important;
}

#emailConfirmCode:focus {
    border-color: #FCA311;
    box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.1);
}

.resend-code-btn {
    background: rgba(252, 163, 17, 0.15);
    border: 1px solid rgba(252, 163, 17, 0.3);
    color: #FCA311;
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

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

.resend-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#emailConfirmGroup {
    background: rgba(252, 163, 17, 0.05);
    border: 1px solid rgba(252, 163, 17, 0.15);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

#emailConfirmGroup label {
    color: #FCA311;
    font-weight: 600;
    font-size: 14px;
}

.code-timer {
    color: #888;
    font-size: 11px;
    margin-top: 5px;
}

.code-timer.expiring {
    color: #f44336;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.save-profile-btn {
    flex: 1;
    background: #FCA311;
    color: #1a1a1a;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-profile-btn:hover {
    background: #e09100;
    transform: translateY(-2px);
}

.save-profile-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cancel-profile-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cancel-profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ========== ОСНОВНЫЕ ТАБЫ (как в карточке манги) ========== */
.profile-tabs-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.profile-tabs-header {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

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

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

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

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

.profile-tabs-content {
    min-height: 400px;
}

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

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

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

/* ========== ПОДТАБЫ СПИСКОВ (чипсы) ========== */
.profile-subtabs-wrapper {
    margin-bottom: 25px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-subtabs-header {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 5px;
}

.profile-subtabs-header::-webkit-scrollbar {
    display: none;
}

.profile-subtab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-subtab-btn:hover {
    background: rgba(252, 163, 17, 0.1);
    border-color: rgba(252, 163, 17, 0.3);
    color: #FCA311;
}

.profile-subtab-btn.active {
    background: rgba(252, 163, 17, 0.15);
    border-color: #FCA311;
    color: #FCA311;
}

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

.subtab-text {
    font-size: 13px;
}

.subtab-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: normal;
    color: #aaa;
}

.profile-subtab-btn.active .subtab-count {
    background: #FCA311;
    color: #1a1a1a;
}

/* ========== КОНТЕЙНЕР СПИСКА ========== */
.profile-list-container {
    min-height: 300px;
}

.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 a {
    display: block;
    width: 100%;
    height: 100%;
}

.list-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.list-item:hover .list-item-cover img {
    transform: scale(1.05);
}

.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);
}

/* ========== ИСТОРИЯ ЧТЕНИЯ (ТАБ 2) ========== */
.reading-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 20px;
}

.history-item {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

a.history-item {
    color: inherit;
}

.history-item:hover {
    transform: translateY(-3px);
    border-color: #FCA311;
    background: rgba(252, 163, 17, 0.05);
}

.history-item-cover {
    aspect-ratio: 3/4;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}

.history-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.history-item:hover .history-item-cover img {
    transform: scale(1.05);
}

.history-item-info {
    padding: 12px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    text-align: center;
    min-height: 135px;
}

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    word-break: break-word;
    text-align: center;
    overflow: visible;
    flex-shrink: 0;
}

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

.history-item-chapter {
    display: inline-block;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #FCA311;
    text-align: center;
    margin: 2px auto;
    word-break: break-word;
    line-height: 1.3;
}

.history-item-chapter strong {
    color: #FCA311;
    font-weight: 600;
}

.history-item-time {
    font-size: 10px;
    color: #777;
    margin-top: 4px;
    text-align: center;
}

.history-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #FCA311;
    border: 1px solid #FCA311;
    padding: 7px 12px;
    border-radius: 20px;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.history-continue-btn:hover {
    background: #e09100;
    border-color: #e09100;
    color: #1a1a1a;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-page-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.history-page-btn:hover:not(:disabled) {
    background: rgba(252, 163, 17, 0.2);
    border-color: #FCA311;
    color: #FCA311;
    transform: translateY(-1px);
}

.history-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.history-page-info {
    color: #aaa;
    font-size: 13px;
    font-weight: 500;
}

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

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

.history-empty h4 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 8px;
}

.history-empty p {
    font-size: 13px;
    color: #888;
}

/* ========== ЗАЯВКИ НА ОБНОВЛЕНИЕ (ТАБ 3 - УПРОЩЕННЫЕ) ========== */
.orders-simple-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-simple-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s ease;
}

.order-simple-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(252, 163, 17, 0.3);
    transform: translateX(5px);
}

.order-simple-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    word-break: break-word;
}

.order-simple-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.order-simple-title a:hover {
    color: #FCA311;
}

.order-simple-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.order-simple-status.pending {
    background: rgba(255, 186, 0, 0.15);
    color: #ffba00;
}

.order-simple-status.in_progress {
    background: rgba(33, 150, 243, 0.15);
    color: #64B5F6;
}

.order-simple-status.completed {
    background: rgba(76, 175, 80, 0.15);
    color: #81C784;
}

.order-simple-status.rejected {
    background: rgba(244, 67, 54, 0.15);
    color: #E57373;
}

.order-simple-comment {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(252, 163, 17, 0.05);
    border-left: 3px solid #FCA311;
    border-radius: 6px;
    font-size: 13px;
    color: #ddd;
}

.order-simple-comment strong {
    color: #FCA311;
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.order-simple-comment p {
    margin: 0;
    line-height: 1.5;
}

.order-simple-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding: 5px 12px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 20px;
    color: #4CAF50;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.order-simple-link:hover {
    background: rgba(76, 175, 80, 0.25);
    transform: translateY(-1px);
}

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

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

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

.orders-empty p {
    font-size: 14px;
    color: #888;
}

/* ========== ОБЩИЕ СТИЛИ ДЛЯ ЗАГРУЗКИ И ПУСТЫХ СОСТОЯНИЙ ========== */
.list-loading {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.list-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #FCA311;
    border-top-color: transparent;
    border-radius: 50%;
    animation: list-spin 0.6s linear infinite;
    vertical-align: middle;
}

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

.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;
}

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

.manga-actions-buttons-mobile {
    display: flex;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100%;
    margin: 15px 0;
}

.manga-actions-buttons-mobile .manga-read-button-mobile,
.manga-actions-buttons-mobile .manga-list-button-container-mobile,
.manga-actions-buttons-mobile .manga-update-button-mobile {
    width: 100%;
}

.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:not(.has-list) {
    background: #7B2D8E;
    border-color: #7B2D8E;
    color: #FFFFFF;
}

.manga-list-main-button-custom:not(.has-list):hover {
    background: #6a2678;
    border-color: #6a2678;
}

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

.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;
}

.dropdown-option-custom.remove-option {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 5px;
    padding-top: 10px;
    color: #f44336;
}

.dropdown-option-custom.remove-option:hover {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.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;
}

.order-toggle-btn.loading .order-icon img {
    animation: spin 0.6s linear infinite;
}

/* ========== КНОПКИ ПЕРЕКЛЮЧЕНИЯ ВИДА ГЛАВ ========== */
.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.chapters-header-left {
    display: flex;
    gap: 15px;
    align-items: baseline;
    flex-wrap: wrap;
}

.chapters-count, .volumes-count {
    color: #aaa;
    font-size: 13px;
}

.chapters-header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 8px;
    background: #1a1a1a;
    border-radius: 50px;
    padding: 4px;
    width: fit-content;
}

.view-btn {
    background: transparent;
    border: none;
    border-radius: 40px;
    padding: 8px 18px;
    cursor: pointer;
    color: #888;
    font-size: 13px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn.active {
    color: #FCA311;
    background: rgba(252, 163, 17, 0.2);
}

.view-btn:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.order-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 {
    background: rgba(252, 163, 17, 0.25);
    transform: translateY(-1px);
}

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

/* ========== РЕЙТИНГ ========== */
.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-histogram {
    width: 100%;
}

.rating-histogram-title {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
    text-align: center;
}

.rating-histogram-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-histogram-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.rating-histogram-label {
    width: 28px;
    text-align: right;
    color: #FCA311;
    font-weight: 600;
}

.rating-histogram-bar-container {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.rating-histogram-bar {
    height: 100%;
    background: linear-gradient(90deg, #FCA311, #FFB347);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.rating-histogram-count {
    min-width: 35px;
    text-align: right;
    color: #fff;
    font-weight: 500;
}

.rating-histogram-percent {
    min-width: 55px;
    color: #888;
    font-size: 11px;
}

.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: 550px;
    width: 90%;
    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-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rating-stars-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.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:not(:disabled) {
    background: rgba(244, 67, 54, 0.25);
    transform: translateY(-2px);
}

.rating-modal-remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.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;
}

@media (min-width: 769px) {
    .tabs-wrapper::before,
    .tabs-wrapper::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .tabs-wrapper.has-scroll-left::before {
        opacity: 1;
    }
    .tabs-wrapper.has-scroll-right::after {
        opacity: 1;
    }
    .tabs-wrapper.no-scroll::after {
        opacity: 0;
    }
}

.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: 16px 24px;
    font-size: 17px;
    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;
    min-height: 400px;
}

.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); }
}

/* ========== СПИСОК ГЛАВ ========== */
.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);
}

.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; }

.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; }

/* ========== ПОХОЖИЕ ТАЙТЛЫ ========== */
.related-grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }

.related-item {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.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 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    background: rgba(0,0,0,0.3);
    word-break: break-word;
}

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

/* ========== УВЕДОМЛЕНИЯ ========== */
.manga-notification-custom,
.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;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    animation: notificationSlideDown 0.3s ease;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

@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 { border-left: 4px solid #4CAF50; }

.manga-notification-custom.error,
.manga-notification.error { 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: 22px;
    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;
}

.manga-profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FCA311;
    color: #1a1a1a !important;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(252, 163, 17, 0.3);
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    animation: notificationSlideDown 0.3s ease;
}

.manga-profile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 163, 17, 0.5);
    background: #ffb347;
    color: #1a1a1a !important;
    text-decoration: none;
}

a.manga-profile-button,
a.manga-profile-button:link,
a.manga-profile-button:visited,
a.manga-profile-button:hover,
a.manga-profile-button:active {
    color: #1a1a1a !important;
    text-decoration: none;
}

.notification-button { display: none; }

/* ========== ОПИСАНИЕ ========== */
.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: 0; }

.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 { width: 130px; flex-shrink: 0; font-weight: 600; color: #FCA311; font-size: 13px; }
.info-value { flex: 1; color: #ddd; line-height: 1.5; font-size: 13px; word-break: break-word; }

.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; }

/* ========== БАЗОВЫЕ СТИЛИ СТРАНИЦЫ ========== */
.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; }

.manga-cover-wrapper a[href*="manga-reader.php"] { display: none !important; }

/* ========== СКЕЛЕТОН ЗАГРУЗКИ ========== */
.manga-list-main-button-custom,
.manga-list-main-button-mobile { position: relative; }

.manga-list-main-button-custom.list-button-loading,
.manga-list-main-button-mobile.list-button-loading { pointer-events: none; opacity: 0.7; }

.manga-list-main-button-custom.has-list,
.manga-list-main-button-mobile.has-list,
.manga-list-main-button-custom:not(.list-button-loading),
.manga-list-main-button-mobile:not(.list-button-loading) { opacity: 1; pointer-events: auto; }

.loading-placeholder { display: inline-flex; align-items: center; gap: 8px; }

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
    .related-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@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: 14px 18px; font-size: 15px; }
    .info-row { flex-direction: column; text-align: center; }
    .info-label { width: auto; text-align: center; }
    .chapter-item { flex-direction: column; text-align: center; }
    .rating-container { flex-direction: column; align-items: stretch; }
    .rating-average { align-self: center; }
    .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; }
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .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; }
    .chapters-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .chapters-header-left { justify-content: center; text-align: center; order: 1; }
    .chapters-header-right { justify-content: center; order: 2; }
    .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%);
    }
    .manga-notification-custom,
    .manga-notification { top: 10px; max-width: 90%; white-space: normal; text-align: center; padding: 10px 16px; font-size: 13px; }
    .manga-profile-button { top: 70px; padding: 8px 20px; font-size: 13px; max-width: 80%; white-space: nowrap; }
    .notification-message:before { width: 20px; height: 20px; line-height: 20px; margin-right: 8px; }
    .rating-histogram-label { width: 24px; font-size: 11px; }
    .rating-histogram-bar-container { height: 20px; }
    .rating-histogram-count { min-width: 30px; font-size: 11px; }
    .rating-histogram-percent { min-width: 50px; font-size: 10px; }
    .rating-star-item-compact { padding: 6px 12px !important; min-width: 38px !important; }
    .star-number-compact { font-size: 13px !important; }
    .rating-stars-row { gap: 6px !important; }
    .edit-profile-content { padding: 20px; max-width: 100%; }
    .form-actions { flex-direction: column; }
    .edit-profile-header h3 { font-size: 18px; }
    
    .user-avatar img,
    .user-avatar-img { width: 100px; height: 100px; }
    .avatar-change-btn { font-size: 12px; padding: 6px 14px; }
    
    .reading-history-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 15px; }
    .history-item-title { font-size: 11px; }
    .history-item-chapter { font-size: 10px; padding: 4px 8px; }
    .history-continue-btn { font-size: 10px; padding: 5px 8px; }
    .history-page-btn { padding: 6px 14px; font-size: 12px; }
    
    /* Адаптивность табов профиля */
    .profile-tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .profile-tab-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .profile-subtabs-header {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .profile-subtab-btn {
        flex-shrink: 0;
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .subtab-text {
        font-size: 12px;
    }
    
    /* Заявки на мобильных */
    .order-simple-item {
        padding: 12px 16px;
    }
    .order-simple-title {
        font-size: 14px;
    }
    .order-simple-status {
        font-size: 11px;
    }
    .order-simple-comment {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .rating-modal-container.compact { max-width: 400px; }
    .rating-stars-compact { gap: 8px; }
    .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; }
    .rating-histogram-row { gap: 6px; }
    .rating-histogram-label { width: 22px; font-size: 10px; }
    .rating-histogram-count { font-size: 10px; min-width: 28px; }
    .rating-histogram-percent { font-size: 9px; min-width: 48px; }
    #emailConfirmCode { font-size: 16px !important; letter-spacing: 4px; }
    .resend-code-btn { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
    .manga-left-column { width: 240px; }
    .manga-title { font-size: 20px; }
    .tabs-content { padding: 15px; }
    .tab-btn { padding: 12px 15px; font-size: 14px; }
    .rating-modal-container.compact { max-width: 320px; }
    .rating-star-item-compact { padding: 5px 8px; min-width: 32px; }
    .star-number-compact { font-size: 11px; }
    .list-items-wrapper { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .related-grid { gap: 12px; }
    .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; }
    .rating-histogram-row { gap: 5px; }
    .rating-histogram-label { width: 20px; font-size: 10px; }
    .rating-histogram-bar-container { height: 18px; }
    .rating-histogram-count { min-width: 25px; font-size: 9px; }
    .rating-histogram-percent { min-width: 42px; font-size: 8px; }
    .rating-star-item-compact { padding: 4px 8px !important; min-width: 30px !important; }
    .star-number-compact { font-size: 11px !important; }
    .rating-stars-row { gap: 5px !important; }
    #emailConfirmCode { font-size: 14px !important; letter-spacing: 3px; padding: 10px 8px !important; }
    .resend-code-btn { padding: 6px 10px; font-size: 11px; }
    
    .user-avatar img,
    .user-avatar-img { width: 80px; height: 80px; }
    .user-name { font-size: 20px; }
    
    .reading-history-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .history-item-info { padding: 10px 6px 6px; min-height: 120px; }
    .history-item-title { font-size: 10px; }
    .history-item-chapter { font-size: 9px; padding: 3px 6px; }
    .history-item-time { font-size: 9px; }
    .history-continue-btn { font-size: 9px; padding: 4px 6px; }
    .history-page-btn { padding: 5px 12px; font-size: 11px; }
    
    /* Заявки на маленьких телефонах */
    .order-simple-item {
        padding: 10px 12px;
    }
    .order-simple-title {
        font-size: 13px;
    }
    .order-simple-comment {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* Подтабы на маленьких */
    .profile-subtab-btn {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .subtab-text {
        font-size: 11px;
    }
    
    .subtab-icon {
        font-size: 12px;
    }
}