/**
 * 91ketang.com 统一样式文件
 * 包含：首页、列表页、详情页的公共样式
 */

/* ================= 基础重置 ================= */
body {
    margin: 0;
    font-family: "微软雅黑", Arial;
    background: #f5f5f5;
}

/* ================= 容器 ================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================= 头部 ================= */
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo img {
    height: 50px;
}

/* 搜索 */
.search form {
    display: flex;
}

.search input {
    width: 260px;
    padding: 10px;
    border: 1px solid #ddd;
    border-right: none;
    outline: none;
}

.search button {
    padding: 10px 15px;
    border: none;
    background: #ff6600;
    color: #fff;
    cursor: pointer;
}

/* ================= 导航 ================= */
.navbar {
    background: #333;
}

.navbar-inner {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar a {
    display: inline-block;
    padding: 14px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
    white-space: nowrap;
}

.navbar a:hover,
.navbar a.active {
    background: #ff6600;
    color: #fff;
}

/* ================= 面包屑 ================= */
.breadcrumb {
    font-size: 14px;
    margin: 15px 0;
}

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

.breadcrumb a:hover {
    color: #ff6600;
}

/* ================= 区块通用样式 ================= */
.section-box {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
    border-left: 4px solid #ff6600;
}

.section-title-icon {
    font-size: 20px;
}

.section-more {
    font-size: 15px;
    color: #888;
    text-decoration: none;
}

.section-more:hover {
    color: #ff6600;
}

/* ================= 电影网格（首页） ================= */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    padding: 15px;
}

/* ================= 电影卡片 ================= */
.movie-item {
    text-align: center;
}

.movie-poster {
    display: block;
    width: 100%;
    aspect-ratio: 100/140;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
    margin-bottom: 6px;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.movie-item:hover .movie-poster img {
    transform: scale(1.05);
}

/* 评分角标 */
.movie-poster .rating-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #f5a623;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* 类型角标 */
.movie-poster .type-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 15px;
    padding: 4px 8px;
    text-align: center;
}

.movie-name {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    display: block;
    padding: 0 2px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.movie-name:hover {
    color: #ff6600;
}

/* ================= 筛选区域（列表页） ================= */
.filter-section {
    background: #fff;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-label {
    color: #666;
    font-size: 15px;
    min-width: 50px;
    padding-top: 4px;
    flex-shrink: 0;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.filter-options a {
    padding: 4px 12px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-radius: 3px;
    background: transparent;
    transition: all 0.2s;
}

.filter-options a:hover {
    color: #ff6600;
}

.filter-options a.active {
    background: #ff6600;
    color: #fff;
}

/* ================= 排序区域（列表页） ================= */
.sort-section {
    background: #fff;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #ff6600;
}

.sort-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-label {
    color: #ff6600;
    font-size: 15px;
    font-weight: bold;
    min-width: 50px;
}

.sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-options a {
    padding: 6px 18px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    background: #f5f5f5;
    transition: all 0.2s;
    border: 1px solid #e5e5e5;
}

.sort-options a:hover {
    color: #ff6600;
    border-color: #ff6600;
}

.sort-options a.active {
    background: #ff6600;
    color: #fff;
    border-color: #ff6600;
}

/* ================= 电影列表（列表页） ================= */
.movie-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
}

.movie-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: box-shadow 0.2s;
}

.movie-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.movie-card .movie-poster {
    width: 100px;
    height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
    display: block;
    aspect-ratio: auto;
    margin-bottom: 0;
}

.movie-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.movie-title {
    font-size: 17px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: #ff6600;
}

.movie-meta {
    font-size: 15px;
    color: #888;
    line-height: 1.8;
}

.movie-meta a {
    color: #888;
    text-decoration: none;
}

.movie-meta a:hover {
    color: #ff6600;
}

.movie-meta a::after {
    content: ' / ';
    color: #888;
}

.movie-meta a:last-child::after {
    content: '';
}

.movie-cast {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
    max-height: 3.2em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.movie-cast em {
    font-style: normal;
}

.movie-cast a {
    color: #999;
    text-decoration: none;
}

.movie-cast a:hover {
    color: #ff6600;
}

.movie-cast a::after {
    content: ' / ';
    color: #999;
}

.movie-cast a:last-child::after {
    content: '';
}

.movie-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    text-decoration: none;
}

.rating-star {
    color: #f5a623;
    font-size: 16px;
}

.rating-score {
    font-size: 16px;
    font-weight: bold;
    color: #f5a623;
}

.movie-rating:hover .rating-score {
    color: #ff6600;
}

/* ================= 分页 ================= */
.page {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-top: 15px;
}

.page a {
    display: inline-block;
    margin: 5px;
    padding: 8px 16px;
    background: #eee;
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

.page a:hover {
    background: #ff6600;
    color: #fff;
}

.page a.active {
    background: #ff6600;
    color: #fff;
}

/* ================= 详情页 ================= */
.detail-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.detail-poster {
    width: 350px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}

.detail-poster img {
    width: 100%;
    height: 490px;
    object-fit: cover;
}

.detail-info {
    flex: 1;
    padding-left: 15px;
}

.detail-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.detail-aka {
    font-size: 15px;
    color: #888;
    margin-bottom: 12px;
}

.detail-aka span::after {
    content: ' / ';
    color: #888;
}

.detail-aka span:last-child::after {
    content: '';
}

.rating-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.rating-box a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.rating-box a:hover .rating-score {
    color: #ff6600;
}

/* 信息列表 */
.info-list {
    font-size: 15px;
    color: #666;
    line-height: 2;
}

.info-list .info-row {
    display: flex;
    align-items: flex-start;
}

.info-list .info-label {
    color: #999;
    min-width: 115px;
    flex-shrink: 0;
}

.info-list .info-value {
    color: #333;
    flex: 1;
}

.info-list a {
    color: #3399ff;
    text-decoration: none;
    transition: color 0.2s;
}

.info-list a:hover {
    color: #ff6600;
}

.info-list a::after {
    content: ' / ';
    color: #999;
}

.info-list a:last-child::after {
    content: '';
}

.info-value span::after {
    content: ' / ';
    color: #999;
}

.info-value span:last-child::after {
    content: '';
}

/* 不同字段不同颜色 */
.info-row.director .info-list a {
    color: #722ed1;
}

.info-row.director .info-list a:hover {
    color: #9254de;
}

.info-row.writer .info-list a {
    color: #eb2f96;
}

.info-row.writer .info-list a:hover {
    color: #f759ab;
}

.info-row.cast .info-list a {
    color: #52c41a;
}

.info-row.cast .info-list a:hover {
    color: #73d13d;
}

.info-row.type .info-list a {
    color: #ff9800;
}

.info-row.type .info-list a:hover {
    color: #ffa726;
}

.info-row.country .info-list a {
    color: #1890ff;
}

.info-row.country .info-list a:hover {
    color: #40a9ff;
}

.info-row.lang .info-list a {
    color: #389e0d;
}

.info-row.lang .info-list a:hover {
    color: #52c41a;
}

/* 资源更新日期红色 */
.info-row.update-time .info-value {
    color: #ff4d4f;
    font-weight: bold;
}

/* 首播/集数/片长 */
.info-row.normal .info-value {
    color: #666;
}

.info-row.normal .info-value span {
    color: #666;
}

/* 标签 */
.detail-tags {
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.detail-tags .tag-title {
    font-size: 15px;
    color: #999;
    margin-bottom: 8px;
}

.detail-tags .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags a {
    padding: 5px 14px;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
}

.detail-tags a:hover {
    background: #ff6600;
    color: #fff;
}

/* ================= 相关图片 ================= */
.pictures-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pictures-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid #ff6600;
}

.pictures-title a {
    color: #333;
    text-decoration: none;
}

.pictures-title a:hover {
    color: #ff6600;
}

.pictures {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pictures li {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
    position: relative;
}

.pictures li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.pictures li:hover img {
    transform: scale(1.05);
}

.pictures li::after {
    content: '点击查看大图';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    text-align: center;
    padding: 4px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.pictures li:hover::after {
    opacity: 1;
}

/* ================= 简介区域 ================= */
.intro-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.intro-content {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    text-indent: 2em;
        word-break: break-all;      /* 关键：强制在任意字符处换行 */
    overflow-wrap: break-word;  /* 辅助：在单词边界换行，实在不行再断 */
}

/* ================= 说明区域 ================= */
.explain-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.explain-list {
    font-size: 14px;
    color: #666;
    line-height: 2;
}

.explain-list dt {
    font-weight: bold;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.explain-list dd {
    display: inline;
    margin: 0;
}

.explain-list .explain-item {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #ddd;
}

.explain-list .explain-item:nth-child(1) {
    border-left-color: #4c8dff;
}

.explain-list .explain-item:nth-child(1) dt {
    background: #e6f0ff;
    color: #4c8dff;
}

.explain-list .explain-item:nth-child(2) {
    border-left-color: #52c41a;
}

.explain-list .explain-item:nth-child(2) dt {
    background: #e6f7e6;
    color: #52c41a;
}

.explain-list .explain-item:nth-child(3) {
    border-left-color: #ff6600;
}

.explain-list .explain-item:nth-child(3) dt {
    background: #fff3e0;
    color: #ff6600;
}

.explain-list .explain-item:nth-child(4) {
    border-left-color: #722ed1;
}

.explain-list .explain-item:nth-child(4) dt {
    background: #f4e8ff;
    color: #722ed1;
}

.explain-list .explain-item:nth-child(5) {
    border-left-color: #eb2f96;
}

.explain-list .explain-item:nth-child(5) dt {
    background: #fff0f6;
    color: #eb2f96;
}

/* ================= 下载区域 ================= */
.download-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Tab切换 */
.download-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.download-tabs .tab-btn {
    padding: 12px 22px;
    font-size: 16px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.download-tabs .tab-btn:hover {
    color: #ff6600;
}

.download-tabs .tab-btn.active {
    color: #ff6600;
    font-weight: bold;
}

.download-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff6600;
}

.download-tabs .tab-btn .count {
    display: inline-block;
    margin-left: 3px;
    padding: 2px 8px;
    background: #eee;
    border-radius: 10px;
    font-size: 14px;
    color: #999;
}

.download-tabs .tab-btn.active .count {
    background: #ff6600;
    color: #fff;
}

/* Tab内容 */
.tab-content {
    display: none;
}

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

/* 磁力列表 */
.magnet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.magnet-table th {
    text-align: left;
    padding: 10px 8px;
    background: #f5f5f5;
    color: #666;
    font-weight: normal;
    border-bottom: 1px solid #eee;
}

.magnet-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.magnet-table tr:hover td {
    background: #fafafa;
}

.magnet-table .title-cell a {
    color: #333;
    text-decoration: none;
    display: block;
    word-break: break-all;
}

.magnet-table .title-cell a:hover {
    color: #ff6600;
}

.magnet-table .size-cell {
    white-space: nowrap;
    color: #666;
    text-align: right;
}

.magnet-table .date-cell {
    white-space: nowrap;
    color: #999;
    text-align: right;
}

.magnet-table .tag {
    display: inline-block;
    padding: 3px 8px;
    background: #e6f2ff;
    color: #3399ff;
    font-size: 13px;
    border-radius: 2px;
    margin-left: 5px;
}

/* 网盘列表 */
.cloud-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cloud-list li {
    padding: 12px;
    border-bottom: 1px solid #eee;
    line-height: 1.6;
}

.cloud-list li:hover {
    background: #fafafa;
}

.cloud-list li:last-child {
    border-bottom: none;
}

.cloud-list .cloud-title {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.cloud-list .cloud-title:hover {
    color: #ff6600;
}

.cloud-list .cloud-meta {
    font-size: 13px;
    color: #999;
}

.cloud-list .cloud-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #fff3e0;
    color: #ff9800;
    font-size: 13px;
    border-radius: 2px;
    margin-left: 5px;
}

.cloud-list .update-tag {
    color: #52c41a;
    font-size: 13px;
    margin-left: 5px;
}

/* 免责声明 */
.desc-box {
    margin-top: 15px;
    padding: 12px;
    background: #f6f8fa;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
}

.desc-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.desc-content {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* ================= 弹窗 ================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 400px;
    max-width: 90%;
}

#downloadLink {
    word-break: break-all;
    color: #1677ff;
    margin: 10px 0;
    font-size: 13px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    text-align: left;
}

.modal-btn {
    padding: 8px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-btn.primary {
    background: #ff6600;
    color: #fff;
}

.modal-btn.default {
    background: #eee;
    color: #333;
}

.modal-btn.xunlei {
    background: #1890ff;
    color: #fff;
}

.modal-btn.xunlei:hover {
    background: #40a9ff;
}

#copyMsg {
    font-size: 12px;
    margin-top: 10px;
    color: #52c41a;
}

/* ================= 底部 ================= */
.footer {
    margin-top: 10px;
    padding: 15px;
    background: #222;
    color: #ccc;
    text-align: center;
    font-size: 14px;
}

/* ================= 响应式适配 ================= */
@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .movie-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    /* 头部 */
    .header-inner {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .search input {
        width: 100%;
    }

    /* 导航 */
    .navbar-inner {
        flex-wrap: wrap;
    }

    .navbar a {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* 电影网格 */
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px;
    }

    /* 电影列表 */
    .movie-list {
        grid-template-columns: 1fr;
    }

    .movie-card {
        gap: 10px;
        padding: 8px;
    }

    .movie-card .movie-poster {
        width: 80px;
        height: 112px;
    }

    .movie-title {
        font-size: 15px;
        white-space: normal;
    }

    .movie-meta,
    .movie-genre,
    .movie-cast {
        font-size: 13px;
    }

    .rating-star,
    .rating-score {
        font-size: 14px;
    }

    /* 分页 */
    .page a {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* 详情页 */
    .detail-header {
        flex-direction: column;
        align-items: center;
    }

    .detail-poster {
        width: 240px;
    }

    .detail-poster img {
        height: 336px;
    }

    /* 图片 */
    .pictures li {
        width: 100px;
        height: 100px;
    }

    /* 下载Tab */
    .download-tabs .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .magnet-table th:nth-child(3),
    .magnet-table td:nth-child(3) {
        display: none;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }
}