/* TV详情页面 - 桌面端简约清爽三栏排版设计 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 夜间模式样式 */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode h1 {
    background: #1e1e1e;
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark-mode .tv-details-container,
body.dark-mode .description-container,
body.dark-mode #netdiskSection,
body.dark-mode .similar-tv,
body.dark-mode .quick-actions,
body.dark-mode .info-section,
body.dark-mode .tags-section,
body.dark-mode .content-left,
body.dark-mode .content-middle,
body.dark-mode .content-right {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .tv-details h2,
body.dark-mode .info-label,
body.dark-mode .description-container h3,
body.dark-mode .netdisk-category h3,
body.dark-mode .similar-tv h3 {
    color: #e0e0e0;
}

body.dark-mode .info-value,
body.dark-mode .rating-badge.douban,
body.dark-mode .rating-badge.site {
    color: #e0e0e0;
}

body.dark-mode .actors-section,
body.dark-mode .netdisk-category,
body.dark-mode .content-section {
    background: #2a2a2a;
    border-color: #333;
}

body.dark-mode .tag-item {
    background: #2a2a2a;
    color: #b0b0b0;
    border-color: #444;
}

body.dark-mode .tag-item:hover {
    background: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .netdisk-item {
    background: #2a2a2a;
    border-color: #333;
}

body.dark-mode .password-code {
    background: #333;
    color: #e0e0e0;
}

body.dark-mode .similar-tv-item {
    background: #2a2a2a;
    border-color: #333;
}

body.dark-mode .similar-tv-item p {
    background: #2a2a2a;
    color: #e0e0e0;
    border-top-color: #333;
}

body.dark-mode button {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode button:hover {
    background: #333;
    border-color: #555;
}

/* 确保所有链接在夜间模式下也有合适的颜色 */
body.dark-mode a {
    color: #9c27b0;
}

body.dark-mode a:hover {
    color: #e91e63;
}

/* 页面标题 */
h1 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #34495e;
    text-align: left;
    padding: 30px 40px 20px;
    margin: 0;
    background: white;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e8ecef;
}

/* 主要内容区域 - 三栏布局 */
.tv-details-container {
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 0;
    margin-bottom: 0;
    background: white;
    align-items: start;
    padding: 40px;
    position: relative;
}

/* 左侧海报区域 */
.poster-section {
    position: relative;
    top: 20px;
    align-self: start;
    height: fit-content;
}

#tv_poster_container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#tv_poster_container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

#tv_poster_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 状态标签 */
#tv_status_badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(52, 152, 219, 0.95);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 100;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

/* 点赞按钮容器 - 桌面端 */
.like-container {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 点赞按钮 - 桌面端 */
.like-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e74c3c;
    border-radius: 24px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #e74c3c;
    cursor: pointer;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    position: relative;
}

.like-button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.heart-icon {
    font-size: 16px;
    transition: all 0.3s ease;
}

.heart-icon.liked {
    transform: scale(1.3);
    color: #e74c3c;
}

/* 中间详情区域 */
.tv-details {
    padding: 0 40px;
    border-right: 1px solid #e8ecef;
}

.tv-details h2 {
    font-size: 1.8rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.tv-details > p {
    font-size: 0.9rem;
    color: #95a5a6;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* 评分徽章区域 */
.rating-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f3f5;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
}

.rating-badge.douban {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.rating-badge.site {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.rating-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 详情信息列表 */
.info-list {
    margin: 24px 0;
}

.info-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f7f8fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    flex-shrink: 0;
    width: 100px;
    color: #7f8c8d;
    font-size: 0.85rem;
    font-weight: 400;
}

.info-value {
    flex: 1;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 400;
}

/* 演员区域 */
.actors-section {
    margin: 32px 0;
    padding: 20px;
    background: #fafbfc;
    border-radius: 6px;
    border: 1px solid #e8ecef;
}

.actors-section > p {
    color: #5a6c7d;
    font-weight: 500;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.actors-list {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #34495e;
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.actors-list.expanded {
    max-height: 300px;
}

/* 标签区域 */
.tags-section {
    margin: 32px 0;
}

.tags-section > p {
    color: #5a6c7d;
    font-weight: 500;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: white;
    color: #6c757d;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.tag-item:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* 右侧信息栏 */
.side-info {
    padding-left: 32px;
}

/* 快速操作区域 */
.quick-actions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    color: white;
}

.quick-actions h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: white;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* 点赞按钮悬停效果 - 桌面端 */
.like-button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 1);
}

/* 影片统计卡片 */
.stats-card {
    background: #fafbfc;
    border: 1px solid #e8ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.stats-card h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a6c7d;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f3f5;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.stat-value {
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 按钮系统 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    margin: 4px 6px 4px 0;
    min-height: 38px;
}

.btn-primary {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
}

.btn-secondary {
    background: white;
    color: #5a6c7d;
    border-color: #d5dbe1;
}

.btn-secondary:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #adb5bd;
}

/* 展开按钮 */
.expand-btn {
    color: #3498db;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    display: inline-block;
    margin-top: 12px;
    border: 1px solid #e9ecef;
}

.expand-btn:hover {
    background: #e9ecef;
    color: #2980b9;
}

/* 剧情简介区域 */
.description-container {
    margin: 0;
    background: white;
    padding: 40px;
    border-top: 1px solid #e8ecef;
}

.description-container h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 24px;
}

.short-description {
    background: #f0f9ff;
    border-left: 3px solid #3498db;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 4px;
}

.short-description p {
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

#descriptionContent {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a5568;
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* 网盘资源区域 */
#netdiskSection {
    margin: 0;
    background: white;
    padding: 40px;
    border-top: 1px solid #e8ecef;
}

#netdiskSection h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 24px;
}

.resource-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.resource-content {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid #e8ecef;
}

/* 推荐区域 */
.similar-tv {
    margin: 0;
    background: white;
    padding: 40px;
    border-top: 1px solid #e8ecef;
}

.similar-tv h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 32px;
}

.similar-tv-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
}

.similar-tv-item {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #f0f3f5;
}

.similar-tv-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #e1e8ed;
}

.similar-tv-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.similar-tv-item p {
    padding: 14px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #2c3e50;
    text-align: center;
    line-height: 1.4;
    margin: 0;
    background: #fafbfc;
    border-top: 1px solid #f0f3f5;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.similar-tv-item a {
    text-decoration: none;
    color: inherit;
}

/* 网盘资源显示区域 */
.netdisk-section {
    margin: 0;
    background: white;
    border-top: 1px solid #e8ecef;
    animation: slideDown 0.3s ease;
}

.netdisk-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px;
}

.netdisk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f3f5;
}

.netdisk-header h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
}

.netdisk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-upload {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-close {
    background: #dc3545;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: #c82333;
    transform: scale(1.1);
}

.netdisk-content {
    display: grid;
    gap: 24px;
}

/* 网盘分类 */
.netdisk-category {
    border: 1px solid #e8ecef;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.category-items {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.netdisk-item {
    background: #fafbfc;
    border: 1px solid #e8ecef;
    border-radius: 6px;
    padding: 16px;
    transition: all 0.2s ease;
}

.netdisk-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.netdisk-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6c757d;
}

.netdisk-user {
    font-weight: 500;
    color: #495057;
}

.netdisk-link {
    margin-bottom: 10px;
}

.netdisk-url {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    color: #1976d2;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid #bbdefb;
    transition: all 0.2s ease;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.netdisk-url:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #e3f2fd 100%);
    color: #1565c0;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
}

.netdisk-password {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
}

.password-code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    user-select: all;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.netdisk-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.netdisk-empty p {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.netdisk-empty p:last-child {
    font-size: 14px;
    color: #adb5bd;
}

/* 动画效果 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端独立的快速操作区域在桌面端隐藏 */
.mobile-only {
    display: none;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .tv-details-container {
        grid-template-columns: 260px 1fr 280px;
        padding: 30px;
    }
    
    #tv_poster_container {
        height: 390px;
    }
    
    .tv-details {
        padding: 0 30px;
    }
    
    .side-info {
        padding-left: 24px;
    }
}

@media (max-width: 1024px) {
    .tv-details-container {
        grid-template-columns: 1fr 300px;
        padding: 30px;
    }
    
    /* 在1024px以下但大于768px的屏幕上隐藏海报 */
    .poster-section {
        display: none;
    }
    
    .tv-details {
        padding: 0 30px 0 0;
    }
}

@media (max-width: 768px) {
    h1 {
        padding: 20px;
        font-size: 1.6rem;
    }
    
    .tv-details-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    /* 移动端显示海报并使用左右布局 */
    .poster-section {
        display: block;
    }
    
    .tv-details {
        padding: 0;
        border-right: none;
    }
    
    .side-info {
        padding-left: 0;
        padding-top: 24px;
    }
    
    .description-container,
    #netdiskSection,
    .similar-tv {
        padding: 24px 20px;
    }
}