/* Themez Template - 参考themz.cn网站风格，简洁清晰的卡片式布局 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --themez-bg: #ffffff;
    --themez-surface: #ffffff;
    --themez-text: #333333;
    --themez-text-secondary: #666666;
    --themez-text-light: #999999;
    --themez-primary: #0073aa;
    --themez-primary-hover: #005a87;
    --themez-border: #e5e5e5;
    --themez-shadow: rgba(0, 0, 0, 0.1);
    --themez-hover-shadow: rgba(0, 0, 0, 0.15);
}

body.themez-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--themez-bg);
    color: var(--themez-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.themez-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.themez-header {
    background: var(--themez-surface);
    border-bottom: 1px solid var(--themez-border);
    box-shadow: 0 2px 4px var(--themez-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.themez-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 20px;
}

.themez-logo {
    text-decoration: none;
    color: var(--themez-text);
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    transition: color 0.3s;
}

.themez-logo:hover {
    color: var(--themez-primary);
}

.themez-logo-text {
    background: linear-gradient(135deg, var(--themez-primary), #00a0d2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search */
.themez-search-form {
    flex: 1;
    max-width: 600px;
}

.themez-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.themez-search-icon {
    position: absolute;
    left: 16px;
    color: var(--themez-text-light);
    pointer-events: none;
}

.themez-search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--themez-border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    background: var(--themez-surface);
}

.themez-search-input:focus {
    border-color: var(--themez-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.themez-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.themez-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--themez-text);
    transition: all 0.3s;
    border-radius: 2px;
}

.themez-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.themez-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.themez-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation */
.themez-nav {
    border-top: 1px solid var(--themez-border);
    background: var(--themez-surface);
}

.themez-nav-wrapper {
    display: flex;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.themez-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.themez-nav-item {
    display: inline-block;
    padding: 14px 20px;
    color: var(--themez-text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.themez-nav-item:hover,
.themez-nav-item.active {
    color: var(--themez-primary);
    border-bottom-color: var(--themez-primary);
}

/* Main */
.themez-main {
    padding: 30px 0;
}

/* Section */
.themez-section {
    margin-bottom: 40px;
}

.themez-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.themez-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--themez-text);
}

.themez-section-more {
    color: var(--themez-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.themez-section-more:hover {
    color: var(--themez-primary-hover);
}

/* Hot Search */
.themez-hot-search {
    background: #f8f9fa;
    padding: 20px 0;
    margin-bottom: 30px;
}

.themez-hot-search-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.themez-hot-search-label {
    color: var(--themez-text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.themez-hot-search-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.themez-hot-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--themez-surface);
    color: var(--themez-text-secondary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--themez-border);
    transition: all 0.3s;
}

.themez-hot-tag:hover {
    background: var(--themez-primary);
    color: white;
    border-color: var(--themez-primary);
}

/* Grid */
.themez-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Card */
.themez-card {
    background: var(--themez-surface);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--themez-border);
    box-shadow: 0 2px 8px var(--themez-shadow);
}

.themez-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--themez-hover-shadow);
    border-color: var(--themez-primary);
}

.themez-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.themez-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f5f5f5;
}

.themez-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.themez-card:hover .themez-card-image img {
    transform: scale(1.05);
}

.themez-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.themez-card:hover .themez-card-overlay {
    opacity: 1;
}

.themez-play-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: transform 0.3s;
}

.themez-card:hover .themez-play-icon {
    transform: scale(1.1);
}

.themez-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--themez-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
}

.themez-card-content {
    padding: 16px;
}

.themez-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--themez-text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.themez-card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.themez-meta-item {
    font-size: 13px;
    color: var(--themez-text-light);
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.themez-card-desc {
    font-size: 13px;
    color: var(--themez-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.themez-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--themez-border);
}

.themez-card-stat {
    font-size: 12px;
    color: var(--themez-text-light);
}

.themez-card-date {
    font-size: 12px;
    color: var(--themez-text-light);
}

/* Page Header */
.themez-page-header {
    margin-bottom: 30px;
}

.themez-breadcrumb {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--themez-text-light);
}

.themez-breadcrumb a {
    color: var(--themez-primary);
    text-decoration: none;
}

.themez-breadcrumb a:hover {
    text-decoration: underline;
}

.themez-breadcrumb-sep {
    margin: 0 8px;
    color: var(--themez-text-light);
}

.themez-breadcrumb-current {
    color: var(--themez-text);
}

.themez-page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--themez-text);
    margin-bottom: 8px;
}

.themez-page-count {
    font-size: 14px;
    color: var(--themez-text-secondary);
}

.themez-page-count strong {
    color: var(--themez-primary);
}

/* Detail Page */
.themez-detail {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.themez-detail-poster {
    flex-shrink: 0;
    width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--themez-shadow);
}

.themez-detail-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.themez-detail-info {
    flex: 1;
}

.themez-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--themez-text);
    margin-bottom: 16px;
}

.themez-detail-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--themez-border);
}

.themez-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.themez-stat-icon {
    font-size: 18px;
}

.themez-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--themez-text);
}

.themez-stat-label {
    font-size: 14px;
    color: var(--themez-text-secondary);
}

.themez-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.themez-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.themez-meta-label {
    font-size: 13px;
    color: var(--themez-text-light);
}

.themez-meta-value {
    font-size: 15px;
    color: var(--themez-text);
    font-weight: 500;
}

.themez-detail-info-row {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.themez-info-label {
    color: var(--themez-text-light);
}

.themez-info-text {
    color: var(--themez-text);
}

.themez-detail-desc {
    margin-top: 24px;
}

.themez-desc-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--themez-text);
    margin-bottom: 12px;
}

.themez-desc-text {
    font-size: 15px;
    color: var(--themez-text-secondary);
    line-height: 1.8;
}

/* Player */
.themez-detail-player {
    margin: 30px 0;
}

.themez-player-wrapper {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--themez-shadow);
}

/* Play Sources */
.themez-play-sources {
    margin: 30px 0;
}

.themez-play-sources-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--themez-text);
    margin-bottom: 16px;
}

.themez-play-source {
    margin-bottom: 20px;
}

.themez-play-source-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--themez-text);
    margin-bottom: 12px;
}

.themez-episodes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.themez-episode {
    display: inline-block;
    padding: 8px 16px;
    background: var(--themez-surface);
    color: var(--themez-text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--themez-border);
    transition: all 0.3s;
}

.themez-episode:hover,
.themez-episode.active {
    background: var(--themez-primary);
    color: white;
    border-color: var(--themez-primary);
}

/* Pagination */
.themez-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.themez-page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--themez-surface);
    color: var(--themez-text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--themez-border);
    transition: all 0.3s;
}

.themez-page-btn:hover {
    background: var(--themez-primary);
    color: white;
    border-color: var(--themez-primary);
}

.themez-page-numbers {
    display: flex;
    gap: 4px;
}

.themez-page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--themez-surface);
    color: var(--themez-text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--themez-border);
    transition: all 0.3s;
}

.themez-page-num:hover {
    background: var(--themez-primary);
    color: white;
    border-color: var(--themez-primary);
}

.themez-page-num.active {
    background: var(--themez-primary);
    color: white;
    border-color: var(--themez-primary);
}

.themez-page-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--themez-text-light);
}

/* Empty State */
.themez-empty {
    text-align: center;
    padding: 60px 20px;
}

.themez-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.themez-empty-text {
    font-size: 16px;
    color: var(--themez-text-secondary);
}

/* Footer */
.themez-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--themez-border);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.themez-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.themez-footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.themez-footer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--themez-text);
    margin-bottom: 8px;
}

.themez-footer-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--themez-text);
    margin-bottom: 8px;
}

.themez-footer-text {
    font-size: 14px;
    color: var(--themez-text-secondary);
    line-height: 1.6;
}

.themez-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.themez-footer-links a {
    color: var(--themez-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.themez-footer-links a:hover {
    color: var(--themez-primary);
}

.themez-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--themez-border);
}

.themez-footer-bottom p {
    font-size: 13px;
    color: var(--themez-text-light);
}

/* Vodplay Page */
.themez-vodplay {
    padding: 30px 0;
}

.themez-vodplay-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.themez-vodplay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.themez-vodplay-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--themez-text);
}

.themez-back-link {
    color: var(--themez-primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.themez-back-link:hover {
    color: var(--themez-primary-hover);
}

.themez-vodplay-player {
    margin-bottom: 30px;
}

.themez-vodplay-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--themez-text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .themez-header-top {
        flex-wrap: wrap;
    }

    .themez-search-form {
        order: 3;
        width: 100%;
        max-width: none;
    }

    .themez-menu-toggle {
        display: flex;
    }

    .themez-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        background: var(--themez-surface);
        border-top: 1px solid var(--themez-border);
        box-shadow: 0 4px 12px var(--themez-shadow);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 999;
    }

    .themez-nav.active {
        display: block;
    }

    .themez-nav-wrapper {
        flex-direction: column;
        padding: 12px;
    }

    .themez-nav-item {
        display: block;
        padding: 12px 16px;
        border-bottom: 1px solid var(--themez-border);
        border-left: 3px solid transparent;
    }

    .themez-nav-item.active {
        border-left-color: var(--themez-primary);
    }

    .themez-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .themez-detail {
        flex-direction: column;
    }

    .themez-detail-poster {
        width: 100%;
    }

    .themez-section-title {
        font-size: 20px;
    }

    .themez-page-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .themez-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .themez-card-content {
        padding: 12px;
    }

    .themez-card-title {
        font-size: 14px;
    }
}


/* Fallback List */
.themez-fallback-list {
    margin-top: 40px;
}

.themez-fallback-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--themez-text);
    margin-bottom: 24px;
}
