/* ======================================
   影视剧情模板 - 完全模仿9ad1.com
   ====================================== */

:root {
    --primary-color: #ff9800;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --bg-gray: #f0f0f0;
    --border-color: #e0e0e0;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition);
}

/* ======================================
   Header 样式
   ====================================== */

.juqing-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: inline-block;
    width: 120px;
    height: 40px;
    text-decoration: none;
    transition: opacity var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .logo {
        width: 108px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 96px;
        height: 32px;
    }
}

.nav-menu {
    display: flex;
    gap: 0;
    list-style: none;
    align-items: center;
}

.nav-item {
    display: inline-block;
    padding: 8px 15px;
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.toggle-line {
    width: 22px;
    height: 2px;
    background: var(--text-dark);
}

/* ======================================
   主内容区
   ====================================== */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
}

.section {
    background: var(--bg-white);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.more-link {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.more-link:hover {
    color: var(--primary-color);
}

/* ======================================
   顶部4个图标按钮
   ====================================== */

.icon-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.menu-icon-item {
    background: var(--bg-white);
    padding: 20px 10px;
    text-align: center;
    border-radius: 6px;
    transition: all var(--transition);
}

.menu-icon-item:hover {
    background: var(--bg-gray);
    transform: translateY(-2px);
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 8px;
}

.icon-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ======================================
   海报网格样式（最近更新+分类）
   ====================================== */

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
}

.poster-card {
    position: relative;
    width: 100%;
}

.card-link {
    display: block;
    width: 100%;
}

.card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-gray);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}

.card-link:hover .card-poster img {
    transform: scale(1.05);
}

.no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.85rem;
    background: var(--bg-gray);
}

/* 左上角评分 */
.card-score {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* 底部更新状态 */
.card-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    text-align: center;
}

/* 分类海报的标签 */
.card-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    z-index: 2;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 6px;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link:hover .card-title {
    color: var(--primary-color);
}

.card-meta {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.card-actors {
    font-size: 0.75rem;
    color: var(--text-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ======================================
   分类标签
   ====================================== */

.category-tags {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    padding: 8px;
    background: var(--bg-gray);
    color: var(--text-gray);
    text-align: center;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.tag.active,
.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* ======================================
   查看更多按钮
   ====================================== */

.view-more {
    text-align: center;
    margin-top: 15px;
}

.view-more a {
    display: inline-block;
    padding: 10px 40px;
    background: var(--bg-gray);
    color: var(--text-gray);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.view-more a:hover {
    background: var(--primary-color);
    color: white;
}

/* ======================================
   友情链接
   ====================================== */

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.link-item {
    padding: 10px;
    background: var(--bg-gray);
    color: var(--text-gray);
    text-align: center;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.link-item:hover {
    background: var(--primary-color);
    color: white;
}

/* ======================================
   Footer 样式
   ====================================== */

.juqing-footer {
    background: var(--bg-white);
    padding: 20px 15px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-link {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.footer p {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 5px 0;
}

/* ======================================
   列表页专用样式
   ====================================== */

.category-header {
    text-align: center;
    padding: 25px 15px;
}

.category-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.category-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 0;
}

.filter-section {
    padding: 15px;
}

.video-grid-section {
    padding: 15px;
}

.pagination-section {
    padding: 15px;
    text-align: center;
}

.pagination-section a,
.pagination-section span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all var(--transition);
}

.pagination-section a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-section .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ======================================
   响应式断点
   ====================================== */

@media (max-width: 1200px) {
    .poster-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 10px 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .icon-menu {
        grid-template-columns: repeat(4, 1fr);
    }

    .poster-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .category-tags {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-title {
        font-size: 0.8rem;
    }

    .card-actors {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 8px 10px;
    }

    .section {
        padding: 12px;
    }

    .icon-menu {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .menu-icon-item {
        padding: 12px 5px;
    }

    .icon-box {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }

    .icon-label {
        font-size: 0.7rem;
    }

    .poster-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .card-title {
        font-size: 0.75rem;
    }

    .card-actors {
        font-size: 0.65rem;
    }

    .category-tags {
        grid-template-columns: repeat(3, 1fr);
    }

    .tag {
        font-size: 0.75rem;
        padding: 6px;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ======================================
   内容页面样式 (show_article.html)
   ====================================== */

/* 面包屑 */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    padding: 12px 15px;
    background: var(--bg-white);
    color: var(--text-gray);
    margin-bottom: 8px;
}

.breadcrumb-item {
    color: var(--text-gray);
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-light);
}

/* 内容头部 */
.content-header {
    background: var(--bg-white);
    padding: 15px;
    margin-bottom: 8px;
}

.content-poster {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.poster-image {
    width: 120px;
    height: 160px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
}

.poster-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.content-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.content-status {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(243, 156, 18, 0.1);
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.content-score {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.score-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: all var(--transition);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 信息栏 */
.info-bar {
    background: var(--bg-white);
    padding: 12px 15px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.info-item {
    display: flex;
    margin-bottom: 10px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    width: 70px;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: var(--text-gray);
    line-height: 1.4;
}

.info-value a {
    color: var(--primary-color);
}

/* 标签导航 */
.tab-nav {
    background: var(--bg-white);
    padding: 0 15px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    overflow-x: auto;
}

.tab-nav-item {
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--text-gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-nav-item:hover {
    color: var(--primary-color);
}

/* 内容区 */
.content-body {
    background: var(--bg-white);
    padding: 15px;
    margin-bottom: 8px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.content-text p {
    margin-bottom: 12px;
}

.content-text img {
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 4px;
}

/* 列表样式 */
.content-text ul,
.content-text ol {
    margin: 12px 0 12px 24px;
    padding: 0;
}

.content-text li {
    margin-bottom: 8px;
    line-height: 1.8;
    color: var(--text-dark);
}

.content-text ul li {
    list-style-type: disc;
}

.content-text ol li {
    list-style-type: decimal;
}

.content-text ul ul,
.content-text ol ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* 标题样式 */
.content-text h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 16px 0 12px 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.content-text h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 12px 0 8px 0;
}

.content-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 10px 0 6px 0;
}

/* 块针样式 */
.content-text blockquote {
    margin: 12px 0;
    padding: 12px 15px;
    border-left: 3px solid var(--primary-color);
    background: var(--bg-light);
    font-style: italic;
    color: var(--text-gray);
    line-height: 1.6;
}

/* 代码样式 */
.content-text code {
    background: var(--bg-light);
    color: #c7254e;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.content-text pre {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 12px 0;
    line-height: 1.4;
}

.content-text pre code {
    background: transparent;
    color: #333;
    padding: 0;
    font-size: 0.9rem;
}

/* 表格样式 */
.content-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    background: var(--bg-white);
}

.content-text table th,
.content-text table td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.content-text table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.content-text table td {
    color: var(--text-gray);
}

/* 强调文本 */
.content-text strong,
.content-text b {
    font-weight: 600;
    color: var(--text-dark);
}

/* 下划线文本 */
.content-text u {
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    text-underline-offset: 3px;
}

/* 演员表 */
.actor-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.actor-item {
    padding: 12px;
    background: var(--bg-light);
    border-radius: 4px;
    text-align: center;
}

.actor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    margin: 0 auto 8px;
}

.actor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actor-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.actor-role {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* 分集列表 */
.episode-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.episode-item {
    padding: 10px;
    background: var(--bg-light);
    border-radius: 3px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.episode-item:hover,
.episode-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 相关推荐 */
.related-section {
    background: var(--bg-white);
    padding: 15px;
    margin-bottom: 8px;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-item {
    padding: 10px;
    background: var(--bg-light);
    border-radius: 3px;
    transition: all var(--transition);
}

.related-item:hover {
    background: rgba(243, 156, 18, 0.1);
    padding-left: 15px;
}

.related-item a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.related-item a:hover {
    color: var(--primary-color);
}

/* 内容页响应式 */
@media (max-width: 768px) {
    .content-poster {
        gap: 12px;
        margin-bottom: 12px;
    }

    .poster-image {
        width: 100px;
        height: 140px;
    }

    .content-title {
        font-size: 1rem;
    }

    .actor-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .episode-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .content-header {
        padding: 12px;
    }

    .info-bar {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .info-label {
        width: 60px;
    }

    .poster-image {
        width: 80px;
        height: 120px;
    }

    .content-title {
        font-size: 0.95rem;
    }

    .content-body {
        padding: 12px;
    }

    .actor-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .episode-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .tab-nav {
        gap: 12px;
        padding: 0 12px;
    }
}