/* ==============================
   SERIES MODULE - Dark Theme
   ============================== */

.series-block {
    padding: 20px 0;
}

/* Collapsible description */
.description-text.collapsible {
    max-height: 100px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
}

.description-text.collapsible::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #1a1a2e);
    pointer-events: none;
    transition: opacity 0.3s;
}

.description-text.collapsible.expanded {
    max-height: 2000px;
}

.description-text.collapsible.expanded::after {
    opacity: 0;
}

.desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 6px;
    color: #f97316;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.desc-toggle:hover {
    background: #f97316;
    color: #fff;
}

.desc-toggle.active {
    background: transparent;
}

/* Hide toggle if description is short */
.serial-description.short .desc-toggle {
    display: none;
}

.serial-description.short .description-text.collapsible {
    max-height: none;
}

.serial-description.short .description-text.collapsible::after {
    display: none;
}

/* Header with stats */
.series-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid #2a2a4a;
    border-radius: 14px;
    margin-bottom: 25px;
}

.series-stats {
    display: flex;
    gap: 25px;
}

.stat-item {
    color: #71717a;
    font-size: 15px;
}

.stat-item i {
    color: #f97316;
    margin-right: 8px;
}

.stat-item b {
    color: #fff;
}

/* Action buttons */
.series-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff !important;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.sbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

.sbtn i {
    font-size: 16px;
}

/* Sections */
.series-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a4a;
}

.section-title i {
    color: #f97316;
    margin-right: 10px;
}

/* Seasons grid */
.seasons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.season-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    background: #1e1e3a;
    border: 2px solid transparent;
    border-radius: 12px;
    text-decoration: none !important;
    color: #e4e4e7 !important;
    transition: all 0.25s ease;
    min-width: 110px;
}

.season-item:hover {
    border-color: #f97316;
    background: #252545;
    transform: translateY(-3px);
}

.season-item.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-color: transparent;
    color: #fff !important;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
}

.season-item .season-num {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.season-item .season-label {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 5px;
}

.season-item .season-count {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 8px;
}

/* Episodes grid */
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 10px;
}

.episode-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: #1e1e3a;
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none !important;
    color: #e4e4e7 !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.episode-item:hover {
    border-color: #f97316;
    background: #252545;
    transform: scale(1.05);
}

.episode-item.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-color: transparent;
    color: #fff !important;
}

.episode-num-badge {
    font-size: 13px;
}

/* Pagination */
.series-pagination {
    margin-top: 25px;
    text-align: center;
}

/* Season/Episode header */
.season-info-header,
.episode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
}

.episode-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid #2a2a4a;
    border-radius: 14px;
    margin-bottom: 20px;
}

.season-title,
.episode-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.season-title i,
.episode-title i {
    color: #f97316;
    margin-right: 10px;
}

.season-meta {
    color: #71717a;
    font-size: 14px;
    margin-left: 15px;
}

.season-meta i {
    color: #f97316;
    margin-right: 5px;
}

/* Navigation buttons */
.season-navigation-btns,
.episode-navigation-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sbtn-nav {
    padding: 10px 18px !important;
    font-size: 13px !important;
}

/* No video */
.no-video {
    padding: 80px 20px;
    text-align: center;
    background: #1a1a2e;
    border-radius: 12px;
    margin: 20px 0;
}

.no-video i {
    font-size: 60px;
    color: #3f3f46;
    margin-bottom: 20px;
    display: block;
}

.no-video p {
    color: #71717a;
    font-size: 16px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .series-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .series-stats {
        justify-content: center;
    }
    
    .series-buttons {
        justify-content: center;
    }
    
    .sbtn {
        flex: 1;
        justify-content: center;
        padding: 14px 12px;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .episode-item {
        padding: 12px 8px;
    }
    
    .season-item {
        padding: 15px 20px;
        min-width: 90px;
    }
    
    .season-item .season-num {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .series-buttons {
        flex-direction: column;
    }
    
    .sbtn {
        width: 100%;
    }
}

/* ==============================
   COMMENTS STYLES
   ============================== */
.comments-section {
    margin-top: 30px;
}

.comments-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-section h2::before {
    content: '';
    width: 4px;
    height: 18px;
    background: #f97316;
    border-radius: 2px;
}

.comments-count {
    font-size: 13px;
    color: #71717a;
    font-weight: 400;
}

.comments-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid #2a2a4a;
    border-radius: 14px;
    padding: 22px 25px;
}

/* Add comment form */
#dlefastreplycomments,
#dlecomments,
.addcomments,
#dle-ajax-comments {
    margin-bottom: 20px;
}

.comments-content textarea,
.addcomments textarea,
#dlefastreplycomments textarea,
#dle-ajax-comments textarea {
    width: 100% !important;
    min-height: 120px;
    padding: 15px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #2a2a4a !important;
    border-radius: 10px !important;
    color: #e4e4e7 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.comments-content textarea:focus,
.addcomments textarea:focus,
#dlefastreplycomments textarea:focus,
#dle-ajax-comments textarea:focus {
    outline: none !important;
    border-color: #f97316 !important;
}

.comments-content textarea::placeholder {
    color: #71717a;
}

/* Кнопка добавления комментария */
.comments-content input[type="submit"],
.comments-content button[type="submit"],
.addcomments input[type="submit"],
.addcomments button,
#dlefastreplycomments input[type="submit"],
#dle-ajax-comments input[type="submit"],
.comments-content a[onclick*="addcomment"],
a[onclick*="addcomment"] {
    display: inline-block;
    padding: 12px 28px !important;
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    text-decoration: none !important;
}

.comments-content input[type="submit"]:hover,
.comments-content button[type="submit"]:hover,
.addcomments input[type="submit"]:hover,
.addcomments button:hover,
#dlefastreplycomments input[type="submit"]:hover,
#dle-ajax-comments input[type="submit"]:hover,
a[onclick*="addcomment"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(249, 115, 22, 0.4);
}

/* Инпуты в форме комментариев */
.comments-content input[type="text"],
.comments-content input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.comments-content input[type="text"]:focus,
.comments-content input[type="email"]:focus {
    outline: none;
    border-color: #f97316;
}

/* Comment items */
.comment,
.comments-item,
#dle-comments-list > div {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comment:last-child,
.comments-item:last-child,
#dle-comments-list > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-author,
.comm-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-author img,
.comm-author img,
.comm-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author-name,
.comm-author a {
    font-weight: 600;
    color: #fff;
}

.comment-date,
.comm-date {
    font-size: 12px;
    color: #71717a;
    margin-left: auto;
}

.comment-text,
.comm-text {
    color: #a1a1aa;
    line-height: 1.6;
    font-size: 14px;
}

/* Subscribe checkbox */
.comments-content label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a1a1aa;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 15px;
}

.comments-content input[type="checkbox"] {
    accent-color: #f97316;
}

/* Comment list */
#dle-comments-list,
.comments-list {
    margin-top: 25px;
}

/* Individual comment */
.comments-content > div[id^="comment-"],
#dle-comments-list > div,
.mass_comments_action {
    padding: 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comments-content > div[id^="comment-"]:last-child,
#dle-comments-list > div:last-child {
    margin-bottom: 0;
}

/* Avatar placeholder (colored bars) */
.comments-content .avatar,
.comments-content [class*="avatar"],
.comments-content img[src*="noavatar"],
.mass_comments_action > span:first-child {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    overflow: hidden;
}

/* Comment header */
.mass_comments_action {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 15px;
}

/* Author name */
.comments-content b,
.comments-content .comm-author,
.mass_comments_action b {
    font-size: 15px;
    font-weight: 600;
    color: #fff !important;
    display: block;
}

/* Admin/moderator badge */
.comments-content a[style*="color"],
.mass_comments_action a[style*="color"] {
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(249, 115, 22, 0.2);
    border-radius: 4px;
    margin-left: 8px;
}

/* Comment date */
.comments-content span[style*="color:#888"],
.comments-content .comm-date,
.mass_comments_action > span:nth-child(3) {
    font-size: 12px;
    color: #71717a !important;
    display: block;
    margin-top: 2px;
}

/* Comment text */
.comments-content .comm-text,
.comments-content br + br ~ *:not(a):not(span):not(b) {
    color: #a1a1aa;
    line-height: 1.7;
    font-size: 14px;
    margin-top: 12px;
}

/* Reply button */
.comments-content a[onclick*="reply"],
.comments-content a[onclick*="Reply"],
a.reply-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #a1a1aa !important;
    font-size: 12px;
    font-weight: 500;
    margin-top: 12px;
    transition: all 0.2s;
    text-decoration: none !important;
}

.comments-content a[onclick*="reply"]:hover,
.comments-content a[onclick*="Reply"]:hover,
a.reply-link:hover {
    background: #f97316;
    border-color: #f97316;
    color: #fff !important;
}

/* Nested/reply comments */
.comments-content > div > div[id^="comment-"] {
    margin-left: 30px;
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid #f97316;
}

/* Hide ugly default elements */
.comments-content hr {
    display: none;
}

/* Comment info row */
.mass_comments_action > div {
    flex: 1;
    min-width: 200px;
}
