/* ===== 详情页专属样式 ===== */

/* 两栏布局 */
.detail-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 30px;
    margin: 30px 0;
}

.info-label-strong {
    color: var(--text);
    font-weight: 600;
}

/* 左侧面板 */
.left-panel {
    background: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    align-self: start;
}

.poster-container {
    width: 100%;
    height: 480px;
    overflow: hidden;
    position: relative;
}

.poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.series-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--secondary);
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 999;
}

.movie-info-compact {
    padding: 20px;
}

.movie-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* 竖排信息样式 */
.info-vertical {
    margin: 15px 0 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.info-item {
    display: flex;
    margin-bottom: 8px;
    line-height: 1.6;
}

.info-label {
    width: 70px;
    color: var(--text-muted);
    font-size: 14px;
}

.info-value {
    flex: 1;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== 可点击链接样式（去掉下划线） ===== */
.info-value-link {
    flex: 1;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
}

.info-value-link:hover {
    color: var(--primary) !important;
}

.info-value-link:visited {
    color: var(--text-secondary);
}

.actor-link {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
}

.actor-link:hover {
    color: var(--primary) !important;
}

.actor-link:visited {
    color: var(--text-secondary);
}

/* 分类标签样式 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    background: rgba(0, 204, 255, 0.15);
    border: 1px solid var(--primary);
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.category-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-tag:visited {
    color: var(--primary);
}

.category-tag:hover:visited {
    color: white;
}

.update-time {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 12px;
    border-left: 4px solid var(--secondary);
    padding-left: 12px;
}

.short-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.gradient-btn {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: 0.3s;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 255, 0.4);
}

.gradient-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.outline-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 右侧面板 */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.card-module {
    background: var(--bg-light);
    border-radius: 24px;
    padding: 20px 24px;
    border: 1px solid var(--border);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.module-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.module-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

/* 线路 tabs */
.route-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.route-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

.route-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
}

.route-btn:hover {
    border-color: var(--primary);
}

/* 播放列表 - 按线路分组 */
.route-group {
    display: none;
}

.route-group.active-group {
    display: block;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 6px;
}

.episode-play-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 10px 4px;
    text-align: center;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.episode-play-card:hover {
    border-color: var(--primary);
    background: #252542;
}

.episode-play-card .num {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}

.episode-play-card .name {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 下载列表 */
.episode-download-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.episode-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    transition: 0.2s;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-item:hover {
    border-color: var(--primary);
}

.episode-name {
    font-weight: 600;
    color: var(--text);
    min-width: 80px;
}

.episode-name i {
    color: var(--primary);
    margin-right: 6px;
    font-size: 14px;
}

.episode-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-thunder,
.btn-copy {
    border: none;
    background: transparent;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border: 1px solid;
}

.btn-thunder {
    color: #ffaa00;
    border-color: #ffaa00;
}

.btn-thunder:hover {
    background: #ffaa00;
    color: black;
}

.btn-thunder.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-copy {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-copy:hover {
    background: var(--primary);
    color: black;
}

/* 排行榜 - 悬停显示图片 */
.rank-list {
    list-style: none;
    margin-top: 6px;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    position: relative;
}

.rank-item:hover {
    background: rgba(0, 204, 255, 0.05);
}

.rank-number-wrapper {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    position: relative;
    flex-shrink: 0;
}

.rank-number {
    width: 32px;
    height: 32px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid var(--border);
}

.rank-hover-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

.rank-item:hover .rank-number {
    display: none;
}

.rank-item:hover .rank-hover-img {
    display: block !important;
}

.rank-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-title {
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-badge {
    background: #2f2f4a;
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 12px;
    color: #ffaa00;
    margin-right: 10px;
}

.rank-score {
    color: var(--text-muted);
    font-size: 14px;
}

.rank-score i {
    color: #ffaa00;
    margin-right: 4px;
}

/* 猜你喜欢样式 */
.recommend-module {
    margin-top: 20px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.recommend-grid .movie-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s;
    border: 1px solid var(--border);
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.recommend-grid .movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.recommend-grid .movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    position: relative;
    background: #2a2a3a;
}

.recommend-grid .movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recommend-grid .movie-card:hover .movie-poster img {
    transform: scale(1.03);
}

.recommend-grid .movie-info {
    padding: 8px 6px;
    background: var(--bg-card);
    position: relative;
    z-index: 2;
    flex: 1;
}

.recommend-grid .movie-info div {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-grid .movie-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    line-height: 1.4;
    margin-bottom: 2px;
    color: var(--text);
}

.recommend-grid .movie-meta {
    font-size: 10px;
    color: var(--text-muted);
}

/* 下载列表折叠样式 */
.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapse-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    font-size: 14px;
}

.collapse-content {
    transition: all 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 1000px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .left-panel {
        margin-bottom: 20px;
    }

    .poster-container {
        height: 400px;
    }

    .movie-title {
        font-size: 24px;
    }

    .detail-actions {
        flex-direction: column;
    }

    .gradient-btn,
    .outline-btn {
        width: 100%;
        padding: 12px;
    }

    .episode-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .episode-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .rank-info {
        flex-wrap: wrap;
    }

    .card-module {
        padding: 15px;
    }

    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .route-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .route-btn {
        white-space: nowrap;
    }

    /* 移动端隐藏热播榜 */
    .card-module:has(.rank-list) {
        display: none;
    }

    /* 猜你喜欢移动端显示6条（每排3个，2排） */
    .recommend-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /*.recommend-grid .movie-card {*/
    /*    display: block;*/
    /*}*/

    .recommend-grid .movie-title {
        font-size: 11px;
    }

    .recommend-grid .movie-meta {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .poster-container {
        height: 350px;
    }

    .movie-title {
        font-size: 20px;
    }

    .rank-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
        margin-right: 10px;
    }

    .rank-title {
        font-size: 13px;
        max-width: 120px;
    }

    .rank-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .rank-score {
        font-size: 11px;
    }

    .recommend-grid {
        gap: 8px;
    }

    .recommend-grid .movie-title {
        font-size: 10px;
    }
}

.comment-module {
    margin-top: 20px;
}

.comment-count {
    color: var(--primary);
    font-size: 14px;
}

.comment-form {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.comment-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comment-form-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.comment-form-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.nickname-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(0, 204, 255, 0.1);
    border-radius: 8px;
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 15px;
    border: 1px dashed var(--primary);
}

.nickname-tip i {
    font-size: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
}

.form-textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    width: 100px;
    height: 40px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-refresh:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.comment-submit-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border: none;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 255, 0.4);
}

.comment-cancel-reply {
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
}

.comment-cancel-reply:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.comment-list {
    margin-top: 20px;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-user-name {
    font-weight: 600;
    color: var(--primary);
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
    word-break: break-word;
    padding-left: 48px;
}

.comment-actions {
    display: flex;
    gap: 20px;
    padding-left: 48px;
}

.comment-action {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.comment-action:hover {
    color: var(--primary);
}

.comment-action i {
    font-size: 14px;
}

.comment-liked {
    color: #ff4d4d !important;
}

/* 回复区域 */
.comment-replies {
    margin-left: 48px;
    margin-top: 15px;
    padding-left: 15px;
    border-left: 2px solid var(--border);
}

.reply-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.reply-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reply-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.reply-to {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 5px;
}

.reply-target {
    color: var(--primary);
    font-size: 14px;
}

.reply-content {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    word-break: break-word;
    padding-left: 38px;
}

.reply-time {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    padding: 8px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-comments i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-comments p {
    font-size: 16px;
}

/* 评论成功提示 */
.comment-success-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 30px;
    border-radius: 16px;
    border: 1px solid var(--primary);
    z-index: 9999;
    text-align: center;
    animation: fadeInOut 3s ease forwards;
}

.comment-success-tip i {
    font-size: 40px;
    color: #4caf50;
    margin-bottom: 10px;
}

.comment-success-tip .nickname {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%);
    }
}

@media (max-width: 1024px) {
    .nickname-tip {
        font-size: 12px;
        padding: 8px 12px;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .reply-avatar {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .comment-content {
        padding-left: 44px;
    }

    .comment-actions {
        padding-left: 44px;
    }

    .comment-replies {
        margin-left: 44px;
    }

    .captcha-group {
        flex-wrap: wrap;
    }

    .captcha-input {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .comment-submit-btn,
    .comment-cancel-reply {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .comment-user-name {
        font-size: 14px;
    }

    .comment-content {
        font-size: 14px;
        padding-left: 0;
        margin-top: 10px;
    }

    .comment-actions {
        padding-left: 0;
        gap: 15px;
    }

    .comment-replies {
        margin-left: 20px;
        padding-left: 10px;
    }

    .reply-content {
        padding-left: 32px;
    }

    .reply-header {
        flex-wrap: wrap;
        gap: 5px;
    }

    .reply-user {
        flex-wrap: wrap;
    }
}