/* 全局变量定义与样式 */
:root {
    --primary-color: #3498db;      /* 标志天蓝色 */
    --primary-hover: #2980b9;
    --bg-color: #f5f5f5;           /* 全局背景色 */
    --bg-secondary: #e2e8f0;       /* 辅助背景色 */
    --card-bg: #ffffff;            /* 卡片背景色 */
    --text-color: #333333;         /* 主要文字颜色 */
    --text-muted: #666666;         /* 辅助文字颜色 */
    --border-color: #e2e8f0;       /* 边框颜色 */

    /* 统一按钮设计变量 - 亮色主题 */
    --btn-font-weight: 600;
    --btn-border-radius: 8px;
    --btn-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    --btn-primary-bg: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --btn-primary-text: #ffffff;
    --btn-primary-hover-bg: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
    --btn-primary-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
    --btn-primary-hover-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);

    --btn-secondary-bg: var(--bg-secondary);
    --btn-secondary-border: 1px solid var(--border-color);
    --btn-secondary-text: var(--text-color);
    --btn-secondary-hover-bg: #cbd5e1;

    --btn-success-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --btn-success-text: #ffffff;
    --btn-success-hover-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
    --btn-success-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);

    --btn-danger-bg: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --btn-danger-text: #ffffff;
    --btn-danger-hover-bg: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --btn-danger-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);

    /* Banner & Hero 区域变量 - 亮色模式 */
    --banner-bg: #f8fafc;
    --banner-text: #0f172a;           /* 更深的文字颜色 */
    --banner-text-muted: #334155;     /* 提高对比度，原本 is #64748b */
    --banner-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 50%, rgba(255, 255, 255, 0.65) 100%);
    --banner-mobile-overlay: rgba(255, 255, 255, 0.95);
    --banner-meta-bg: rgba(0, 0, 0, 0.06);
    --banner-meta-text: #1e293b;
    --banner-meta-border: rgba(0, 0, 0, 0.1);
    --hero-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);

    /* 检索参数卡片变量 - 亮色模式 */
    --wanted-card-bg: rgba(16, 185, 129, 0.05);
    --wanted-card-border: rgba(16, 185, 129, 0.2);
    --wanted-card-title: #059669;
    --wanted-card-desc: #334155;
    --wanted-btn-bg: #10b981;
    --wanted-btn-text: #ffffff;
    --wanted-btn-shadow: rgba(16, 185, 129, 0.2);
    --wiki-coin-color: #d97706;       /* 金币颜色 - 亮色主题 */
    --wiki-coin-highlight: #d97706;   /* 高亮颜色 - 亮色主题 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========== 头部导航 ========== */
.header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    padding: 0 20px;
}

.header-content {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 0;
}

/* ---- Logo ---- */
.logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}

.logo-extra {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 6px;
}

/* ---- 右侧区域 ---- */
.header-right {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
    min-width: 0;
    overflow: visible; /* 确保搜索建议不被裁剪 */
}

/* ---- 导航链接 ---- */
.main-nav {
    flex-shrink: 0;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}

/* ---- 搜索框 ---- */
.search-box {
    flex: 1;
    min-width: 80px;
    max-width: 320px;
}

.search-box form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 2px 4px 2px 12px;
    transition: background 0.2s, border-color 0.2s;
}

.search-box form:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    padding: 5px 28px 5px 0;
    width: 100%;
    outline: none;
    min-width: 0;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-clear {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 14px;
    display: none;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.search-clear:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

.search-box button[type="submit"] {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 15px;
    padding: 5px 8px;
    flex-shrink: 0;
    border-radius: 16px;
    transition: background 0.2s;
}

.search-box button[type="submit"]:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ---- 用户信息区 ---- */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-profile {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
}

.btn-profile .nav-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- 导航按钮 ---- */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.btn-admin {
    background: rgba(241,196,15,0.2);
    color: #f1c40f;
    border-color: rgba(241,196,15,0.4);
}

.btn-admin:hover {
    background: rgba(241,196,15,0.35);
    color: #f1c40f;
}

.btn-logout {
    background: rgba(231,76,60,0.2);
    color: #e74c3c;
    border-color: rgba(231,76,60,0.4);
}

.btn-logout:hover {
    background: rgba(231,76,60,0.35);
    color: #e74c3c;
}

.btn-login {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-login:hover {
    background: var(--primary-hover);
}

.btn-register {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.2);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-login-combined {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    padding: 6px 14px;
    font-size: 13px;
}

.btn-login-combined:hover {
    background: #2980b9;
}

/* ---- 主题切换按钮 ---- */
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    outline: none;
    user-select: none;
    flex-shrink: 0;
    color: rgba(255,255,255,0.85);
}

.theme-toggle-btn:hover {
    background-color: rgba(255,255,255,0.12);
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* 主要内容 */
.main-content {
    min-height: calc(100vh - 150px);
    padding: 15px 0;
}

/* 最近收录区域 */
.recent-added-section {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.section-title-inline {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.crawl-update-time {
    font-size: 12px;
    color: var(--text-muted);
}

.recent-added-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-added-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background-color: var(--bg-color);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.recent-added-item:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.recent-item-category {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.recent-item-category.cate-movie {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.recent-item-category.cate-tv {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.recent-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-item-title-col {
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.recent-item-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.recent-item-spec-col {
    width: 240px;
    flex-shrink: 0;
}

.recent-item-spec {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.recent-item-time-col {
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    margin-left: 15px;
}

.recent-item-time {
    font-size: 12px;
    color: var(--text-muted);
}

.recent-item-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* 兼容暗黑模式 */
.dark-theme .recent-added-item {
    background-color: #1e293b;
}
.dark-theme .recent-added-item:hover {
    background-color: #334155;
}

/* 筛选区域折叠 */
.filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    transition: background-color 0.2s;
}

.filter-toggle:hover {
    background-color: #f8f9fa;
}

.filter-toggle-icon {
    transition: transform 0.3s;
    font-size: 10px;
}

.filter-toggle.active .filter-toggle-icon {
    transform: rotate(180deg);
}

.filter-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: none; /* 默认隐藏 */
}

.filter-section.show {
    display: block;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    min-width: 50px;
}

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

.filter-chip {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 16px;
    background-color: white;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: #3498db;
    color: #3498db;
}

.filter-chip.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

/* 紧凑电影列表 */
.movie-compact-list {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: visible; /* 允许悬浮效果突破边界 */
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.movie-compact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 120px;
    background-color: var(--card-bg);
}

.movie-poster-wrapper {
    position: relative;
    flex-shrink: 0;
    display: flex;
}

.movie-compact-poster {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-compact-item:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
    border-radius: 8px;
}

.movie-compact-item:hover .movie-compact-poster {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.movie-compact-item:hover .btn-copy-tech {
    opacity: 1;
}

.movie-compact-poster-placeholder {
    width: 120px;
    height: 180px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    flex-shrink: 0;
}

.movie-compact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-compact-item:hover {
    background-color: var(--bg-secondary);
    transform: translateX(4px);
}

.movie-compact-item:last-child {
    border-bottom: none;
}

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

.movie-compact-title {
    font-size: 15px;
    margin-bottom: 0;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.title-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.movie-compact-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 480px;
    transition: color 0.2s ease;
}

.movie-compact-title a:hover {
    color: var(--primary-color);
}

.title-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* 紧凑列表显示剧情简介，限制为两行并完美对齐 */
.movie-compact-overview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 6px;
    text-overflow: ellipsis;
    word-break: break-all;
    white-space: normal;
}

.movie-compact-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.meta-col-stats {
    display: inline-flex;
    align-items: center;
    gap: 18px; /* 无论 PC 还是移动端，各统计数值之间统一保持 18px 的宽裕间距 */
    font-size: 12px;
    color: var(--text-muted);
}

/* 大屏幕下的表格列式对齐 */
@media (min-width: 769px) {
    .movie-compact-meta {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 0;
        flex-wrap: nowrap;
    }

    .meta-col-rating {
        width: 80px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .meta-col-year {
        width: 55px;
        flex-shrink: 0;
    }

    .meta-col-spec {
        width: auto;
        min-width: 120px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 5px;
        margin-right: 15px;
    }

    .meta-col-genres {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 4px;
        overflow: hidden;
        white-space: nowrap;
    }

    .meta-col-size {
        width: 80px;
        flex-shrink: 0;
        text-align: right;
    }

    .meta-col-stats {
        width: auto;
        min-width: 140px;
        flex-shrink: 0;
        margin-left: 15px;
    }
}

/* 规格徽章样式 */
.meta-spec-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.resolution-badge {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.source-badge {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.hdr-badge {
    background-color: rgba(230, 126, 34, 0.1);
    color: #e67e22;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

/* 暗黑模式规格徽章颜色 */
html.dark-theme .resolution-badge {
    background-color: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

html.dark-theme .source-badge {
    background-color: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

html.dark-theme .hdr-badge {
    background-color: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

.meta-rating {
    background-color: rgba(243, 156, 18, 0.12);
    color: #f39c12;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.meta-year {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.meta-size {
    background-color: rgba(52, 152, 219, 0.12);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    flex-shrink: 0;
}

.meta-item {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* 列表元数据链接样式 */
.list-meta a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.list-meta a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 个人主页评论列表精细布局 */
.profile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-list li {
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.profile-list li:hover {
    background: var(--bg-secondary);
}

.profile-list .list-content {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    word-break: break-all;
}

.profile-list .list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    gap: 15px;
    flex-wrap: wrap;
}

.profile-list .list-meta span {
    display: flex;
    align-items: center;
    min-width: 0;
}

.profile-list .list-meta a {
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 250px;
    vertical-align: bottom;
}

@media (max-width: 768px) {
    .profile-list .list-meta a {
        max-width: 150px;
    }
}

/* 评论删除按钮现代优雅样式 */
.btn-delete-comment {
    background-color: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-delete-comment:hover {
    background-color: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

html.dark-theme .btn-delete-comment {
    background-color: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

html.dark-theme .btn-delete-comment:hover {
    background-color: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
}

/* 影评讨论区输入区域美化 */
.comment-form {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
}

.comment-form .form-control {
    background-color: var(--bg-color) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    color: var(--text-color) !important;
    transition: all 0.3s ease !important;
    min-height: 90px !important;
}

.comment-form .form-control:focus {
    border-color: var(--primary-color) !important;
    background-color: var(--card-bg) !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
}

/* 评论发表按钮优化 */
.btn-comment-submit {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.25) !important;
}

.btn-comment-submit:hover {
    background-color: var(--primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.35) !important;
}

.btn-comment-submit:active {
    transform: translateY(0) !important;
}

html.dark-theme .btn-comment-submit {
    box-shadow: 0 2px 5px rgba(56, 189, 248, 0.2) !important;
}

html.dark-theme .btn-comment-submit:hover {
    box-shadow: 0 4px 10px rgba(56, 189, 248, 0.35) !important;
}

.meta-certification {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 4px;
    font-weight: 600;
    font-size: 10px;
    line-height: 1.2;
    vertical-align: middle;
}

/* 高亮显示的分级 */
.cert-high {
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.cert-mid {
    border-color: rgba(243, 156, 18, 0.4);
    color: #f39c12;
    background-color: rgba(243, 156, 18, 0.08);
}

.cert-low {
    border-color: rgba(39, 174, 96, 0.4);
    color: #27ae60;
    background-color: rgba(39, 174, 96, 0.08);
}

.genre-tag-small {
    padding: 2px 6px;
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid var(--border-color);
}

.version-badge {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-new {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    margin: 0;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.badge-updated {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    margin: 0;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-block;
    background-color: #fbbf24;
    color: #1a1a2e;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.badge-cinema {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    margin: 0;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.badge-legend {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: -10px 0 10px 0; /* 负 margin 抵消上方的间距 */
    padding: 6px 12px;
    background: transparent; /* 改为透明背景更清新 */
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    line-height: 1.4;
}
.badge-legend .legend-new {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 10px;
    padding: 0 5px;
    border-radius: 3px;
    font-weight: bold;
    margin-right: 2px;
}
.badge-legend .legend-updated {
    display: inline-block;
    background-color: #fbbf24;
    color: #1a1a2e;
    font-size: 10px;
    padding: 0 5px;
    border-radius: 3px;
    font-weight: bold;
    margin-right: 2px;
    margin-left: 8px;
}

.type-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid #ddd;
}

.type-tv {
    border-color: #3498db;
    color: #3498db;
    background-color: #e8f4f8;
}

.type-movie {
    border-color: #95a5a6;
    color: #7f8c8d;
    background-color: #f8f9fa;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    gap: 15px;
}

.version-info {
    flex: 1;
    min-width: 0;
}

.version-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.version-meta {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

.version-size {
    font-size: 12px;
    color: #7f8c8d;
    white-space: nowrap;
}

.version-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* movie-compact-overview style defined above */

.movie-compact-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.btn-magnet {
    display: inline-block;
    padding: 6px 12px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.btn-magnet:hover {
    background-color: #219a52;
}

.btn-copy-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white !important;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    outline: none;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.25);
}

.btn-copy-search:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 14px rgba(29, 78, 216, 0.4);
    color: white !important;
}

.btn-copy-search:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.2);
}

.btn-copy-search.copied {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3) !important;
}

.seeders {
    color: #27ae60;
    font-size: 12px;
    font-weight: bold;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    margin: 0 2px;
    font-weight: 500;
}

.page-link:hover, .page-link.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.page-link.disabled {
    background-color: #ecf0f1;
    color: #bdc3c7;
    cursor: not-allowed;
}

.page-link.ellipsis {
    background-color: transparent;
    border: none;
}

.pagination-info {
    width: 100%;
    text-align: center;
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 10px;
}

/* 详情页 */
.back-link {
    margin-bottom: 15px;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    text-decoration: underline;
}

.movie-detail {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.poster-placeholder {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 375px; /* 250 * 1.5 ratio */
    color: #999;
    font-size: 14px;
}

.detail-info {
    flex-grow: 1;
    min-width: 0;
}

.detail-title {
    font-size: 28px;
    margin-bottom: 8px;
    color: #ffffff;
}

.detail-original-title {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 15px;
    font-weight: normal;
}

.detail-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    font-size: 14px;
    color: #ccc;
    padding: 4px 10px;
    background-color: #2a2a2a;
    border-radius: 4px;
}

.detail-genres {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.genre-tag {
    padding: 4px 14px;
    background-color: #3498db;
    color: white;
    border-radius: 20px;
    font-size: 12px;
}

.detail-overview, .detail-tech-info, .detail-crew-box, .detail-download, .detail-file-info {
    margin-bottom: 25px;
}

.detail-overview h3, .detail-tech-info h3, .detail-crew-box h3, .detail-download h3, .detail-file-info h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #f0f0f0;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.detail-overview p, .detail-crew-box p {
    line-height: 1.8;
    color: #ddd;
    font-size: 14px;
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tech-table tr {
    border-bottom: 1px solid #eee;
}

.tech-table td {
    padding: 8px;
}

.tech-label {
    font-weight: bold;
    color: #7f8c8d;
    width: 100px;
}

.download-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-download:hover {
    background-color: #219a52;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white !important;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    outline: none;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.25);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 14px rgba(29, 78, 216, 0.4);
    color: white !important;
}

.btn-copy:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.2);
}

.btn-copy.copied {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3) !important;
}

.no-magnet {
    color: #e74c3c;
    font-style: italic;
    font-size: 13px;
}

.peer-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.file-name {
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
}

.info-hash {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 5px;
    font-family: monospace;
}

/* 搜索结果 */
.search-result-info {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-result-info h2 {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 18px;
}

.btn-back {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 18px;
    background-color: var(--primary-color);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.btn-back:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

html.dark-theme .btn-back {
    box-shadow: 0 2px 4px rgba(56, 189, 248, 0.15);
}

html.dark-theme .btn-back:hover {
    box-shadow: 0 4px 8px rgba(56, 189, 248, 0.25);
}

/* 无结果 */
.no-results {
    text-align: center;
    padding: 50px 15px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.no-results h2 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 18px;
}

.no-results p {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.no-results a:not(.btn-back) {
    color: var(--primary-color);
    text-decoration: underline;
}

.no-results a:not(.btn-back):hover {
    color: var(--primary-hover);
}

/* 错误页面 */
.error-page {
    text-align: center;
    padding: 50px 15px;
}

.error-page h1 {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-page h2 {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
}

.footer p {
    margin-bottom: 8px;
}

.footer a {
    color: #3498db;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
/* 剧集分组样式 */
.episode-group {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.episode-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    font-weight: bold;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
}

.version-title-raw {
    font-size: 11px;
    color: #7f8c8d;
    margin: 4px 0;
    font-family: monospace;
    word-break: break-all;
}

.version-info .badge {
    display: inline-block;
    padding: 2px 6px;
    background-color: #e8f4f8;
    color: #3498db;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .recent-added-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
    }

    .recent-item-content {
        display: grid;
        grid-template-areas:
            "title time"
            "spec spec";
        grid-template-columns: 1fr auto;
        gap: 4px 12px;
        flex: 1;
        min-width: 0;
    }

    .recent-item-title-col {
        grid-area: title;
        margin-right: 0;
    }

    .recent-item-spec-col {
        grid-area: spec;
        width: auto;
    }

    .recent-item-time-col {
        grid-area: time;
        width: auto;
        margin-left: 0;
        text-align: right;
    }

    .movie-detail {
        padding: 15px;
        border-radius: 0;
        border: none;
        box-shadow: none;
        margin: -15px -15px 20px -15px;
    }

    .detail-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .detail-poster {
        width: 220px;
        margin-bottom: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    }
    .poster-placeholder {
        height: 270px; /* 180 * 1.5 ratio */
    }


    .crawl-notice {
        padding: 8px 12px;
        margin-bottom: 10px;
        font-size: 12px;
    }

    .filter-toggle {
        padding: 8px 12px;
        margin-bottom: 10px;
        font-size: 13px;
    }
    .movie-compact-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
        max-width: 100%;
    }
    .title-left-group {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        max-width: 100%;
    }
    .movie-compact-title a {
        max-width: 100%;
        flex: 1 1 auto;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }
    .badge-new, .badge-updated {
        font-size: 10px;
        padding: 0 4px;
    }
    .movie-compact-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 15px;
    }

    .movie-compact-poster {
        width: 80px;
        height: 120px;
    }

    .movie-compact-poster-placeholder {
        width: 80px;
        height: 120px;
    }

    .movie-compact-body {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
        min-width: 0;
    }

    .movie-compact-meta {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    .meta-col-rating,
    .meta-col-year,
    .meta-col-spec,
    .meta-col-genres,
    .meta-col-size {
        width: auto !important;
        flex: 0 1 auto !important;
        display: inline-flex !important;
        align-items: center;
        margin-right: 0 !important;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .meta-spec-badge {
        white-space: normal;
        word-break: break-all;
        max-width: 100%;
        height: auto;
        line-height: 1.4;
    }

    .movie-compact-overview, .detail-overview, .overview {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        max-width: 100%;
    }

    .movie-compact-actions {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .btn-copy-search {
        padding: 10px 16px;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .detail-title {
        font-size: 20px;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        max-width: 100%;
    }

    .detail-meta {
        gap: 8px;
    }

    .meta-item {
        font-size: 12px;
        padding: 3px 8px;
    }

    .pagination {
        gap: 5px;
        flex-wrap: wrap;
    }

    .page-link {
        padding: 5px 10px;
        font-size: 12px;
    }

    .main-content {
        padding: 10px 0;
        overflow-x: hidden;
    }

    .filter-section {
        padding: 10px;
        margin-bottom: 10px;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 10px;
        gap: 5px;
    }

    .filter-label {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .filter-chips {
        gap: 4px;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        padding-bottom: 4px;
    }

    .filter-chip {
        padding: 3px 8px;
        font-size: 11px;
        flex: 0 0 auto;
    }

    /* 移动端详情页下载列表优化 */
    .version-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .version-actions {
        width: 100%;
    }

    .version-actions .btn-download, 
    .version-actions .btn-copy {
        flex: 1;
        padding: 8px 5px;
        font-size: 12px;
        text-align: center;
        justify-content: center;
    }

    /* 彻底杜绝移动端横向溢出与滚动抖动 */
    html, body {
        overflow-x: hidden !important;
        overscroll-behavior-x: none;
        width: 100%;
        position: relative;
        -webkit-overflow-scrolling: touch;
    }

    .movie-compact-item {
        /* 移动端去掉所有变换与过度，极速响应并防止滚动抖动 */
        transform: none !important;
        transition: none !important;
    }

    .movie-compact-item:hover {
        transform: none !important;
        background-color: var(--card-bg) !important;
        box-shadow: none !important;
    }
    .movie-compact-item:hover .movie-compact-poster {
        transform: none !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    }
    .movie-compact-list {
        overflow: hidden !important;
        width: 100% !important;
        box-shadow: none !important; /* 移动端减少阴影开销 */
    }
    .badge-legend {
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }
    .mobile-sticky-modules {
        display: none !important;
    }
}


/* 剧照展示样式 */
.detail-backdrops {
    margin-top: 30px;
    margin-bottom: 30px;
}

.detail-backdrops h3 {
    font-size: 1.2rem;
    color: #f0f0f0;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.backdrops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.backdrop-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    aspect-ratio: 16 / 9;
    background-color: #222;
}

.backdrop-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.backdrop-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

@media (max-width: 768px) {
    .backdrops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .backdrops-grid {
        grid-template-columns: 1fr;
    }
}

/* 详情页 Banner 系统 (统一规范) */
.movie-detail-new {
    margin: -15px -15px 0 -15px; /* 抵消 .main-content 的 top padding 和 .container 的 side padding */
    overflow-x: hidden;
}

.movie-banner {
    position: relative;
    background-size: cover;
    background-position: center 25%;
    background-color: var(--banner-bg);
    padding: 60px 40px;
    min-height: 450px;
    display: flex;
    align-items: center;
    color: var(--banner-text);
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 0; 
    box-shadow: none; 
}

/* 横幅底部渐变融合 */
.movie-banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
    z-index: 1;
    pointer-events: none;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--banner-overlay);
    z-index: 1;
}

.banner-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 45px;
    width: 100%;
    align-items: flex-start;
}

.movie-banner .detail-poster {
    width: 280px;
    height: 420px; /* 增加固定高度以适应海报比例 */
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

html.dark-theme .movie-banner .detail-poster {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.movie-banner .detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.movie-banner .detail-poster:hover {
    transform: translateY(-5px);
}

.banner-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-content-bottom {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
    display: flex;
}

.content-left {
    flex: 1;
    max-width: 900px; /* 保持左对齐，不铺满全宽以增加可读性 */
}

/* Banner 响应式适配 */
@media (max-width: 1024px) {
    .movie-banner {
        padding: 40px 20px;
    }
    .movie-content-bottom {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .movie-detail-new {
        margin: -10px -15px 0 -15px !important; /* 抵消移动端 main-content 的 top padding */
    }
    .movie-banner {
        flex-direction: column;
        padding: 30px 15px;
        min-height: auto;
        margin-top: -15px; /* 抵消顶部间隙 */
    }
    .banner-overlay {
        background: var(--banner-mobile-overlay); /* 移动端使用更均匀的亮/暗色遮罩 */
    }
    .banner-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    .movie-banner .detail-poster {
        width: 180px;
        height: 270px;
    }
    .banner-info {
        text-align: center;
        align-items: center;
    }
    .movie-content-bottom {
        margin: 20px auto;
        padding: 0 15px;
    }
    .content-left {
        max-width: 100%;
    }
    .detail-title {
        justify-content: center;
    }
}

/* ==========================================
   主题切换及全站精致排版样式 (Theme Switcher)
   ========================================== */

/* 头部导航布局扩展 */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 主题切换按钮 */
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
}

.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* 默认（亮色）模式下隐藏太阳，显示月亮 */
.theme-icon-light {
    display: none;
}
.theme-icon-dark {
    display: block;
}

/* 暗色模式下显示太阳，隐藏月亮 */
html.dark-theme .theme-icon-light {
    display: block;
}
html.dark-theme .theme-icon-dark {
    display: none;
}


/* ==========================================
   1. 详情页默认亮色模式 (Light Theme Detail)
   ========================================== */
.back-link {
    margin: 10px 0 25px 0;
}

.back-link a {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.back-link a:hover {
    color: #2563eb;
    transform: translateX(-4px);
}

/* 详情标题样式 */
.detail-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--banner-text);
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.type-badge {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.type-movie {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.type-tv {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.detail-original-title {
    font-size: 18px;
    color: var(--banner-text-muted);
    margin-bottom: 20px;
    font-weight: 400;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.meta-item {
    background-color: var(--banner-meta-bg);
    color: var(--banner-meta-text);
    border: 1px solid var(--banner-meta-border);
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.meta-certification {
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    padding: 3px 8px;
}

.cert-high {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.cert-mid {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.cert-low {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.genre-tag {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.detail-overview {
    text-align: left;
    width: 100%;
}

.detail-overview h3 {
    font-size: 16px;
    color: var(--banner-text);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
}

.detail-overview p {
    color: var(--banner-text-muted);
    line-height: 1.7;
    font-size: 14px;
}

/* 下方详情内容 (亮色模式) */
.movie-content-bottom {
    margin: 30px auto;
    padding: 0;
    display: flex;
    width: 100%;
}

.content-left {
    flex: 1;
    max-width: 100%;
}

.detail-crew-box {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-crew-box .crew-block h3,
.detail-backdrops h3,
.detail-download h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, #1e293b);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.detail-crew-box .crew-block h3::before,
.detail-backdrops h3::before,
.detail-download h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary-color, #2563eb);
    border-radius: 2px;
    margin-right: 10px;
}

.detail-crew-box .crew-block p {
    color: var(--text-muted, #334155);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding-left: 14px;
}

@media (min-width: 768px) {
    .detail-crew-box {
        flex-direction: row;
        gap: 30px;
    }
    .crew-block.director-block {
        flex: 0 0 35%;
        max-width: 35%;
    }
    .crew-block.cast-block {
        flex: 1;
    }
}

/* 剧照 */
.backdrops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.backdrop-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #eaeaea;
    cursor: zoom-in;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.backdrop-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.backdrop-item:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

/* 下载区域 */
.detail-download {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.version-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.25s ease;
}

.version-item:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

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

.version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.version-info .badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 0;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.version-title-raw {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.4;
    margin: 4px 0;
    word-break: break-all;
}

.version-size {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.version-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-download {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
}

.btn-download:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 6px 12px -1px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

/* .btn-copy overrides removed to preserve primary tech-blue gradient styling */

/* 剧集分组 */
.episode-group {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
}

.episode-header {
    background: #f8fafc;
    color: #2563eb;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
}


/* ==========================================
   2. 全站暗色模式适配 (Dark Theme Style)
   ========================================== */
html.dark-theme {
    background-color: #0b0f19;
    --primary-color: #38bdf8;      /* 暗色模式下更亮眼的天蓝色 */
    --primary-hover: #0ea5e9;
    --bg-color: #0b0f19;           /* 全局背景色 */
    --bg-secondary: #1e293b;       /* 辅助背景色 */
    --card-bg: #111827;            /* 卡片背景色 */
    --text-color: #f1f5f9;         /* 主要文字颜色 */
    --text-muted: #94a3b8;         /* 辅助文字颜色 */
    --border-color: #374151;       /* 边框颜色 */

    /* 统一按钮设计变量 - 暗色主题 */
    --btn-primary-bg: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    --btn-primary-text: #ffffff;
    --btn-primary-hover-bg: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --btn-primary-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
    --btn-primary-hover-shadow: 0 6px 20px rgba(56, 189, 248, 0.55);

    --btn-secondary-bg: var(--bg-secondary);
    --btn-secondary-border: 1px solid var(--border-color);
    --btn-secondary-text: var(--text-color);
    --btn-secondary-hover-bg: #374151;

    --btn-success-bg: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --btn-success-text: #ffffff;
    --btn-success-hover-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
    --btn-success-shadow: 0 4px 14px rgba(52, 211, 153, 0.3);

    --btn-danger-bg: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    --btn-danger-text: #ffffff;
    --btn-danger-hover-bg: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --btn-danger-shadow: 0 4px 14px rgba(248, 113, 113, 0.3);

    /* Banner 区域变量 - 暗色模式 */
    --banner-bg: #0f172a;
    --banner-text: #ffffff;
    --banner-text-muted: #cbd5e1;
    --banner-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 30%, rgba(15, 23, 42, 0.8) 70%, rgba(15, 23, 42, 0.6) 100%);
    --banner-mobile-overlay: rgba(15, 23, 42, 0.92);
    --banner-meta-bg: rgba(255, 255, 255, 0.08);
    --banner-meta-text: #f1f5f9;
    --banner-meta-border: rgba(255, 255, 255, 0.05);
    --hero-gradient: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);

    /* 检索参数卡片变量 - 暗色模式 */
    --wanted-card-bg: rgba(0, 255, 204, 0.1);
    --wanted-card-border: rgba(0, 255, 204, 0.3);
    --wanted-card-title: #00ffcc;
    --wanted-card-desc: #e0f7f4;
    --wanted-btn-bg: #00ffcc;
    --wanted-btn-text: #0f172a;
    --wanted-btn-shadow: rgba(0, 255, 204, 0.3);
    --wiki-coin-color: #fbbf24;       /* 金币颜色 - 暗色主题 */
    --wiki-coin-highlight: #fbbf24;   /* 高亮颜色 - 暗色主题 */
}

html.dark-theme body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

html.dark-theme .type-movie {
    background-color: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.25);
}

html.dark-theme .type-tv {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.25);
}

html.dark-theme .genre-tag {
    background-color: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

html.dark-theme .genre-tag-small {
    background-color: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

html.dark-theme .header {
    background-color: #0d1527;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 首页暗色卡片及组件 */
html.dark-theme .filter-toggle {
    background-color: #131b2e;
    color: #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

html.dark-theme .filter-toggle:hover {
    background-color: #1a243d;
}

html.dark-theme .filter-section {
    background-color: #131b2e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

html.dark-theme .filter-label {
    color: #94a3b8;
}

html.dark-theme .filter-chip {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

html.dark-theme .filter-chip:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

html.dark-theme .filter-chip.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

html.dark-theme .movie-compact-list {
    background-color: #131b2e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

html.dark-theme .movie-compact-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark-theme .movie-compact-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

html.dark-theme .movie-compact-title a {
    color: #f1f5f9;
}

html.dark-theme .movie-compact-title a:hover {
    color: #3b82f6;
}

html.dark-theme .movie-compact-overview {
    color: #94a3b8;
}

html.dark-theme .movie-compact-meta .meta-item {
    background-color: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* 详情页暗色修饰 */
html.dark-theme .back-link a {
    color: #94a3b8;
}

html.dark-theme .back-link a:hover {
    color: #3b82f6;
}

html.dark-theme .detail-crew-box {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark-theme .detail-crew-box .crew-block h3,
html.dark-theme .detail-backdrops h3,
html.dark-theme .detail-download h3 {
    color: #f8fafc;
}

html.dark-theme .detail-crew-box .crew-block h3::before,
html.dark-theme .detail-backdrops h3::before,
html.dark-theme .detail-download h3::before {
    background: #3b82f6;
}

html.dark-theme .detail-crew-box .crew-block p {
    color: #cbd5e1;
}

html.dark-theme .backdrop-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: #000;
}

html.dark-theme .backdrop-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.4);
}

html.dark-theme .detail-download {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

html.dark-theme .version-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html.dark-theme .version-item:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

html.dark-theme .version-info .badge {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

html.dark-theme .version-title-raw {
    color: #e2e8f0;
}

html.dark-theme .version-size {
    color: #64748b;
}

/* html.dark-theme .btn-copy overrides removed */

html.dark-theme .episode-group {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html.dark-theme .episode-header {
    background: rgba(15, 23, 42, 0.7);
    color: #60a5fa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html.dark-theme .footer {
    background-color: #0b0f19;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #475569;
}

html.dark-theme .footer a {
    color: #60a5fa;
}

/* 暗色主题下的分页栏优化 */
html.dark-theme .page-link {
    background-color: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

html.dark-theme .page-link:hover {
    background-color: #334155;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

html.dark-theme .page-link.active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: none;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

html.dark-theme .page-link.disabled {
    background-color: #0f172a;
    color: #334155;
    border-color: #1e293b;
    box-shadow: none;
    transform: none;
}

html.dark-theme .pagination-info {
    color: #64748b;
}


/* ==========================================
   3. 通用Toast及响应式适配样式 (Global Helpers)
   ========================================== */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 50px);
    background-color: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 10px rgba(59, 130, 246, 0.2);
    opacity: 0;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.copy-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* 响应式样式适配 */
@media (max-width: 768px) {
    .movie-banner {
        padding: 30px 20px;
        border-radius: 0;
        margin: -15px -15px 20px -15px;
    }
    
    .banner-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }
    
    .movie-banner .detail-poster {
        width: 170px;
    }
    
    .detail-title {
        font-size: 24px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .movie-content-bottom {
        padding: 0;
        margin: 15px auto;
    }
    
    .detail-crew-box,
    .detail-download {
        padding: 15px;
        border-radius: 12px;
    }
    
    .version-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    
    .version-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .btn-download,
    .btn-copy {
        justify-content: center;
        text-align: center;
        padding: 10px;
        font-size: 13px;
    }
}

/* ==========================================
   会员管理与权限系统自定义样式
   ========================================== */

/* Flash 消息分类样式 */
.flash-messages {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flash-message, .limit-status-alert {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.alert-success {
    background-color: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-left: 4px solid #10b981;
    color: #065f46 !important;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
    color: #991b1b !important;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-left: 4px solid #f59e0b;
    color: #92400e !important;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 4px solid #3b82f6;
    color: #1e40af !important;
}

/* 暗色模式下的提示框适配 */
html.dark-theme .alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid #34d399;
    color: #34d399 !important;
}

html.dark-theme .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid #f87171;
    color: #f87171 !important;
}

html.dark-theme .alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 4px solid #fbbf24;
    color: #fbbf24 !important;
}

html.dark-theme .alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 4px solid #60a5fa;
    color: #60a5fa !important;
}

/* 导航栏用户区（role-badge保留） */
.role-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* 登录/注册卡片 */
.auth-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 250px);
    padding: 20px 0;
}
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 420px;
    padding: 30px;
}
.dark-theme .auth-card {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.auth-card h2 {
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
    color: var(--text-color);
}
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}
.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-color) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-color) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
.form-row-code {
    display: flex;
    gap: 8px;
}
.btn-send-code {
    white-space: nowrap;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-auth-submit {
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}
.btn-auth-submit:hover {
    background: var(--primary-hover);
}
.auth-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 下载锁定卡片 */
.download-locked-card {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
}
.lock-icon {
    font-size: 40px;
    margin-bottom: 15px;
}
.lock-tip {
    font-size: 15px;
    color: var(--text-color);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}
.btn-login-inline {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin: 0 4px;
}

/* 管理后台样式 */
.admin-dashboard {
    padding: 20px 0;
}
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.admin-tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
}
.admin-tab-btn.active {
    background: var(--bg-secondary);
    color: var(--text-color);
    font-weight: bold;
}
.admin-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 30px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.admin-table th, .admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.admin-table th {
    background: var(--bg-secondary);
    color: var(--text-color);
    font-weight: 600;
}
.admin-select {
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
}
.badge-active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.badge-inactive {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.matrix-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}
.btn-save-matrix {
    margin-top: 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}
.btn-save-matrix:hover {
    background: var(--primary-hover);
}





/* 详情页返回图标按钮样式 */
.back-icon-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: var(--banner-meta-bg);
    color: var(--banner-text);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--banner-meta-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-icon-btn:hover {
    background: var(--banner-meta-border);
    transform: scale(1.1);
    color: var(--primary-color);
}

.btn-fav {
    margin-left: 10px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 12px;
    border: 1px solid var(--banner-meta-border);
    background: var(--banner-meta-bg);
    color: var(--banner-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    vertical-align: middle;
}

.btn-fav:hover {
    background: var(--banner-meta-border);
    transform: translateY(-1px);
}

.banner-login-tip {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: var(--banner-meta-bg);
    border: 1px dashed var(--banner-meta-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--banner-text);
    display: inline-block;
    max-width: 100%;
}

.banner-login-tip a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: underline;
}

.back-icon-btn svg {
    transition: transform 0.3s ease;
}

.back-icon-btn:hover svg {
    transform: translateX(-2px);
}

@media (max-width: 768px) {
    .back-icon-btn {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
    }
}




/* ========== 移动端响应式 ========== */
@media (max-width: 768px) {
    .header .container {
        padding: 0 10px;
    }

    /* 两行布局：第一行 logo + 按钮组，第二行搜索框 */
    .header-content {
        height: auto;
        flex-wrap: wrap;
        padding: 7px 0;
        gap: 0;
        align-items: center;
        row-gap: 6px;
    }

    /* Logo 左对齐，不压缩 */
    .logo {
        flex-shrink: 0;
        margin-right: 0;
    }

    .logo h1 {
        font-size: 15px;
        white-space: nowrap;
    }

    /* 隐藏副标题，节省空间 */
    .logo-extra {
        display: none;
    }

    /* 右侧按钮组：紧凑排列在第一行 */
    .header-right {
        flex: 1;
        flex-wrap: wrap; /* 允许折行，让搜索框换到第二行并完整铺满，按钮组留在第一行 */
        gap: 8px;
        overflow: visible;
        justify-content: flex-end; /* 右对齐以形成整齐的控制台效果 */
        align-items: center;
        flex-basis: auto;
        min-width: 0;
        width: 100%;
    }

    .main-nav {
        display: flex;
        flex: 0 1 auto;
        justify-content: flex-end;
        gap: 8px !important; /* 统一小图标间距 */
    }

    .user-info, .auth-buttons {
        display: flex;
        gap: 8px; /* 统一小图标间距 */
        align-items: center;
        margin-left: 0; /* 移除 auto 以免分隔开 */
    }

    /* 隐藏金币、后台、退出按钮，防止移动端顶栏溢出 */
    .header-right .user-coins-display,
    .header-right .btn-admin,
    .header-right .btn-logout {
        display: none !important;
    }

    /* 搜索框：独占第二行，放到最后 */
    .search-box {
        order: 10;
        flex-basis: 100%;     /* 强制换行占满整行 */
        width: 100%;
        max-width: none !important;
        margin: 8px 0 2px 0;
    }

    .search-box form {
        width: 100%;
        display: flex;
        align-items: center;
        background: rgba(255,255,255,0.15) !important;
        border-radius: 10px !important;
        padding: 4px 6px 4px 15px !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
    }

    .search-input-wrapper {
        flex: 1;
        min-width: 0;
        position: relative;
    }

    .search-box input {
        font-size: 16px !important; /* 防止 iOS 自动放大 */
        padding: 8px 30px 8px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        color: white !important;
        opacity: 1 !important;
    }

    .search-box input::placeholder {
        color: rgba(255,255,255,0.6);
    }

    .search-clear {
        right: 0 !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 18px !important;
        background: rgba(255,255,255,0.1) !important;
    }

    /* 建议框在移动端需要全宽且更明显 */
    .search-suggestions {
        position: absolute !important;
        top: 100% !important; /* 精准相对于输入框 wrapper 定位，避免写死 top 导致的间距过大问题 */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin-top: 4px !important;
        max-height: 70vh !important;
        z-index: 2000 !important;
        background: var(--card-bg) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
        border-radius: 8px !important;
    }

    .suggestion-item {
        padding: 12px 15px !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .suggestion-text {
        font-size: 15px !important;
        color: white !important;
    }

    /* 统一移动端顶栏控制图标大小和形状 (始终适应深色顶栏) */
    .nav-link, 
    .header-right .nav-btn, 
    .theme-toggle-btn, 
    .btn-login-combined {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        color: #ffffff !important;
        font-size: 16px !important;
        transition: all 0.2s ease !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }

    .nav-link:hover, 
    .header-right .nav-btn:hover, 
    .theme-toggle-btn:hover, 
    .btn-login-combined:hover {
        background: rgba(255, 255, 255, 0.22) !important;
        border-color: rgba(255, 255, 255, 0.35) !important;
        transform: scale(1.05);
    }

    /* 金黄高亮“参数检索”图标，使其符合整体但依旧醒目 */
    .nav-link.btn-wanted {
        background: rgba(255, 193, 7, 0.15) !important;
        border: 1px solid rgba(255, 193, 7, 0.4) !important;
        color: #ffc107 !important;
    }

    .nav-link.btn-wanted:hover {
        background: rgba(255, 193, 7, 0.25) !important;
        border-color: rgba(255, 193, 7, 0.7) !important;
        box-shadow: 0 0 8px rgba(255, 193, 7, 0.3) !important;
    }

    /* 隐藏导航和登录按钮中的文本 */
    .nav-text, 
    .auth-text {
        display: none !important;
    }
    .auth-icon {
        font-size: 16px !important;
        margin: 0 !important;
    }

    /* 讨论区创建按钮调整 */
    .btn-create-post {
        padding: 8px 16px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
    }

    .forum-actions {
        margin: 0;
    }
}

/* 管理控制台移动端自适应优化 */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 10px;
    }

    /* 后台 Tab 菜单支持横向滑动，防止因 Tab 过多挤压变形 */
    .admin-tabs {
        display: flex;
        width: 100%;
        gap: 8px;
        margin-bottom: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }

    .admin-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .admin-tabs::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }

    .admin-tab-btn {
        flex: 0 0 auto;
        text-align: center;
        padding: 8px 14px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* 搜索栏在小屏幕上垂直排列 */
    .admin-search-bar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }

    /* 将特定标识的管理员表格转化为精美的卡片布局 */
    .admin-table-container.has-cards {
        border: none;
        background: transparent;
        padding: 0;
    }

    .admin-table.admin-table-responsive-cards {
        display: block;
        width: 100%;
    }

    .admin-table.admin-table-responsive-cards thead {
        display: none; /* 隐藏传统表头 */
    }

    .admin-table.admin-table-responsive-cards tbody {
        display: block;
        width: 100%;
    }

    .admin-table tr.user-row,
    .admin-table tr.log-row {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .admin-table tr.user-row td,
    .admin-table tr.log-row td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
        text-align: right;
        font-size: 13px;
    }

    .admin-table tr.user-row td:last-child {
        border-bottom: none;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-top: 15px;
    }

    .admin-table tr.log-row td:last-child {
        border-bottom: none;
    }

    /* 使用 data-label 在移动端生成标签说明 */
    .admin-table tr.user-row td::before,
    .admin-table tr.log-row td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
        margin-right: 15px;
    }

    /* 针对一些特殊组件在移动端右对齐 */
    .admin-table tr.user-row td select.admin-select {
        margin: 0;
        width: auto;
    }

    /* 操作栏按钮在移动端放大并块状排列以方便触控 */
    .admin-table tr.user-row td a.nav-btn,
    .admin-table tr.user-row td button.nav-btn {
        width: 100% !important;
        height: auto !important;
        padding: 10px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 5px 0 !important;
    }

    .admin-table tr.user-row td form {
        display: block;
        width: 100%;
    }

    .mobile-hide {
        display: none !important;
    }
    .search-log-email {
        font-size: 11px !important;
        margin-left: 5px;
    }
}

/* ========== 网站介绍巨幕 ========== */
.hero-section {
    position: relative;
    background: var(--hero-gradient);
    color: var(--banner-text);
    padding: 30px 24px 30px 24px; /* 减少底部 padding，因为现在是并列布局 */
    border-radius: 12px;
    margin: -15px -15px 25px -15px; /* 扩展到边缘以增加沉浸感 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* 巨幕底部渐变融合 */
.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
    min-width: 0; /* 防止标题溢出 */
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 13.5px;
    color: var(--banner-text-muted);
}

.hero-stats-item {
    white-space: nowrap;
}

.hero-stats-sep {
    opacity: 0.3;
}

.hero-title {
    font-size: 26px;
    font-weight: 850;
    margin-bottom: 12px;
    color: var(--banner-text);
    letter-spacing: -0.01em;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif; /* 明确指定中文优先字体 */
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 32px;
        line-height: 1.2;
    }
}

.hero-subtitle {
    font-size: 15px;
    color: var(--banner-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 850px;
}

.hero-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--banner-meta-bg);
    border: 1px solid var(--banner-meta-border);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--banner-text);
    width: fit-content;
}

.step-item {
    font-weight: 600;
}

.step-arrow {
    color: var(--banner-text-muted);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 16px 16px;
        margin-bottom: 15px;
    }
    .hero-title {
        font-size: 18px;
    }
    .hero-subtitle {
        font-size: 13px;
    }
    .hero-steps {
        padding: 6px 12px;
        font-size: 12px;
        gap: 6px;
    }
}

/* ==========================================
   3. Quill 富文本编辑器全主题适配 (Quill Editor Adaptations)
   ========================================== */
.ql-toolbar.ql-snow {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 8px 12px !important;
}
.ql-container.ql-snow {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
.ql-editor {
    color: var(--text-color, #1e293b) !important;
    min-height: 200px;
    line-height: 1.6;
    -webkit-user-select: text !important;
    user-select: text !important;
}
.ql-editor.ql-blank::before {
    color: var(--text-muted, #94a3b8) !important;
    font-style: normal;
    left: 15px;
    opacity: 0.7;
}
.ql-snow .ql-stroke {
    stroke: var(--text-color, #1e293b) !important;
}
.ql-snow .ql-fill {
    fill: var(--text-color, #1e293b) !important;
}
.ql-snow .ql-picker {
    color: var(--text-color, #1e293b) !important;
}
.ql-snow .ql-picker-options {
    background-color: var(--card-bg, #ffffff) !important;
    border-color: var(--border-color, #e2e8f0) !important;
}
.ql-snow .ql-picker-item {
    color: var(--text-color, #1e293b) !important;
}
.ql-snow .ql-picker-label:hover, .ql-snow .ql-picker-item:hover {
    color: var(--primary-color, #3b82f6) !important;
}
.ql-snow .ql-picker-label.ql-active, .ql-snow .ql-picker-item.ql-selected {
    color: var(--primary-color, #3b82f6) !important;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected {
    color: var(--primary-color, #3b82f6) !important;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:focus .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke {
    stroke: var(--primary-color, #3b82f6) !important;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button:focus .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill {
    fill: var(--primary-color, #3b82f6) !important;
}

/* ========== 申请收录样式 ========== */
.collect-box {
    margin: 25px auto;
    padding: 24px;
    background-color: rgba(52, 152, 219, 0.04);
    border-radius: 12px;
    border: 1px dashed rgba(52, 152, 219, 0.25);
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.collect-lead {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 16px !important;
    line-height: 1.75;
    text-wrap: balance;
}

.btn-request-collect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    outline: none;
}

.btn-request-collect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.35);
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
}

.btn-request-collect:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.2);
}

.btn-request-collect:disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.collect-tip {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    background-color: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 8px;
    color: #27ae60;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    line-height: 1.6;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 暗色模式适配 */
html.dark-theme .collect-box {
    background-color: rgba(46, 204, 113, 0.03);
    border: 1px dashed rgba(46, 204, 113, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html.dark-theme .btn-request-collect {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

html.dark-theme .btn-request-collect:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

html.dark-theme .btn-request-collect:active {
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

html.dark-theme .btn-request-collect:disabled {
    background: #334155 !important;
    color: #64748b !important;
}

/* 科技感自助收录按钮 */
.btn-request-collect-tech {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    outline: none;
}

.btn-request-collect-tech:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
}

.btn-request-collect-tech:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* 暗色模式适配 */
html.dark-theme .btn-request-collect-tech {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

html.dark-theme .btn-request-collect-tech:hover {
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

html.dark-theme .btn-request-collect-tech:active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

html.dark-theme .collect-tip {
    background-color: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

/* ==========================================
   首页三栏布局重构 (PC端三栏并列/双栏并列，移动端上下堆叠)
   ========================================== */

/* 默认移动端布局与折叠样式保持 */
.home-layout {
    display: block;
    width: 100%;
}

.home-sidebar {
    width: 100%;
    margin-bottom: 20px;
    background: rgba(128, 128, 128, 0.03); /* 轻微背景色区分 */
    border-radius: 8px;
}

.home-main {
    width: 100%;
}

.home-right-sidebar {
    display: none;
}

/* PC端中屏双栏布局（769-1023px），无右侧栏，但显示横向粘性模块 */
@media (min-width: 769px) and (max-width: 1023px) {
    .home-layout {
        display: flex;
        gap: 20px;
        align-items: flex-start;
        margin-top: 20px;
    }

    .home-sidebar {
        flex: 0 0 220px;
        width: 220px;
        position: sticky;
        top: 80px;
        margin-bottom: 0;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.12) transparent;
    }

    .home-sidebar::-webkit-scrollbar { width: 3px; }
    .home-sidebar::-webkit-scrollbar-track { background: transparent; }
    .home-sidebar::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.12); border-radius: 3px; }
    html.dark-theme .home-sidebar { scrollbar-color: rgba(255,255,255,0.2) transparent; }
    html.dark-theme .home-sidebar::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); }

    .home-main {
        flex: 1;
        min-width: 0;
    }

    /* 中屏也显示横向粘性模块，卡片稍宽 */
    .mobile-sticky-modules {
        display: block;
        margin-bottom: 16px;
    }
    .mobile-sticky-modules .msm-card {
        flex: 0 0 260px;
    }

    .home-sidebar .filter-toggle { display: none !important; }
    .home-sidebar .filter-section {
        display: block !important;
        padding: 12px;
        margin-bottom: 0;
    }
}

/* PC端大屏三栏布局（1024px+） */
@media (min-width: 1024px) {
    .home-layout {
        display: flex;
        gap: 24px;
        align-items: flex-start;
        margin-top: 20px;
    }

    .home-sidebar {
        flex: 0 0 240px;
        width: 240px;
        position: sticky;
        top: 80px;
        margin-bottom: 0;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.12) transparent;
    }

    .home-sidebar::-webkit-scrollbar { width: 3px; }
    .home-sidebar::-webkit-scrollbar-track { background: transparent; }
    .home-sidebar::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.12); border-radius: 3px; }
    html.dark-theme .home-sidebar { scrollbar-color: rgba(255,255,255,0.2) transparent; }
    html.dark-theme .home-sidebar::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); }

    .home-main {
        flex: 1;
        min-width: 0;
    }

    .home-right-sidebar {
        display: flex;
        flex-direction: column;
        gap: 16px;
        flex: 0 0 280px;
        width: 280px;
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .home-right-sidebar::-webkit-scrollbar { display: none; }

    .home-sidebar .filter-toggle { display: none !important; }
    .home-sidebar .filter-section {
        display: block !important;
        padding: 12px;
        margin-bottom: 0;
    }
}

/* 小于1024px隐藏右侧栏 */
@media (max-width: 1023px) {
    .home-right-sidebar {
        display: none !important;
    }
}

/* 移动端粘性模块基础样式（当display:block时生效） */
.mobile-sticky-modules {
    display: none;
    margin-bottom: 16px;
}
.mobile-sticky-modules .msm-scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mobile-sticky-modules .msm-scroll-row::-webkit-scrollbar { display: none; }
.mobile-sticky-modules .msm-card {
    flex: 0 0 220px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
}
.mobile-sticky-modules .msm-card h4 {
    font-size: 13px;
    margin: 0 0 8px 0;
    color: var(--text-color);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 6px;
}
.mobile-sticky-modules .msm-item {
    padding: 4px 0;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mobile-sticky-modules .msm-item a {
    color: var(--text-color);
    text-decoration: none;
}
.mobile-sticky-modules .msm-item .msm-muted {
    color: var(--text-muted);
    font-size: 11px;
    margin-right: 4px;
}
/* 769px以下：移除可能导致溢出的粘性卡片 */
@media (max-width: 768px) {
    .mobile-sticky-modules {
        display: none !important;
    }
}

/* 优化侧边栏filter紧凑性（PC端专用） */
@media (min-width: 769px) {
    .home-sidebar .filter-section {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--border-color);
        border-radius: 10px;
    }

    .home-sidebar .filter-group {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 8px;
        border-bottom: none;
        padding-bottom: 0;
    }

    .home-sidebar .filter-group:last-child {
        margin-bottom: 0;
    }

    .home-sidebar .filter-label {
        font-weight: 600;
        color: var(--text-color);
        min-width: 40px;
        width: 40px;
        font-size: 12px;
        margin-top: 4px;
        flex-shrink: 0;
    }

    .home-sidebar .filter-chips {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
    }

    .home-sidebar .filter-chip {
        padding: 2px 7px;
        font-size: 11px;
        border-radius: 10px;
        white-space: nowrap;
    }
}

/* 暗色模式针对新布局的微调 */
html.dark-theme .home-sidebar .filter-section {
    background-color: #131b2e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* 视频详情页左右并列布局及精确对齐优化 */
.movie-detail-new .movie-banner {
    padding: 30px 0; /* 上下缩减为 30px，左右为 0 */
    min-height: 360px; /* 降低最小高度，缩减大屏上的无效纵向空白 */
    margin-bottom: 20px; /* 缩减 Banner 底部的 margin，减少与下方内容的间隙 */
}

.movie-detail-new .banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px; /* 左右内边距统一定为 24px */
    box-sizing: border-box;
    width: 100%;
}

.movie-detail-new .movie-content-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 24px 24px; /* 顶部 padding 为 0，彻底消除多余纵向间隙 */
    box-sizing: border-box;
    width: 100%;
}

/* 扁平化主容器 */
.movie-detail-new .content-left {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 剧情简介防溢出折行样式 */
.movie-detail-new .detail-overview p {
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
}

/* PC 端宽屏：顶部上下分栏，相似影片铺满全宽 */
@media (min-width: 901px) {
    .movie-detail-new .detail-top-wrapper {
        display: flex;
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
        width: 100%;
    }
    
    .movie-detail-new .detail-main-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .movie-detail-new .similar-movies-sidebar {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

/* 演职员表（导演/主演） */
.movie-detail-new .detail-crew-box {
    margin-bottom: 0 !important;
    padding: 16px 20px;
}

/* 剧照网格 */
.movie-detail-new .detail-backdrops {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.movie-detail-new .backdrops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PC 端左栏展示 3 列剧照，最适配宽度 */
    gap: 12px;
    margin-bottom: 0;
}

/* 相似影片右侧边栏（PC端） */
.movie-detail-new .similar-movies-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.movie-detail-new .similar-sidebar-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, #0f172a);
    display: flex;
    align-items: center;
}

.movie-detail-new .similar-sidebar-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary-color, #2563eb);
    border-radius: 2px;
    margin-right: 8px;
}

.movie-detail-new .similar-sidebar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* PC 端相似卡片海报及文本样式 */
.movie-detail-new .similar-movies-sidebar .similar-item-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.movie-detail-new .similar-movies-sidebar .similar-item-card:hover {
    transform: translateY(-4px);
}

.movie-detail-new .similar-movies-sidebar .similar-poster-wrap {
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.movie-detail-new .similar-movies-sidebar .similar-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-detail-new .similar-movies-sidebar .similar-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-muted, #94a3b8);
}

.movie-detail-new .similar-movies-sidebar .similar-item-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color, #0f172a);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.movie-detail-new .similar-movies-sidebar .similar-item-year {
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

/* ==========================================
   移动端与窄屏自适应响应式优化
   ========================================== */
@media (max-width: 900px) {
    /* 让分栏包装容器在渲染时打平，使用 order 重新排列各区块顺序 */
    .movie-detail-new .detail-top-wrapper,
    .movie-detail-new .detail-main-left {
        display: contents;
    }

    .movie-detail-new .movie-banner {
        padding: 24px 0;
        min-height: auto;
    }
    
    .movie-detail-new .banner-container {
        padding: 0 16px; /* 移动端 Banner 左右内边距设置为 16px，使标题、评分等拥有良好侧边距 */
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    
    /* 给移动端剧情简介添加左右间距，保证文字不紧贴边缘，阅读体验自然 */
    .movie-detail-new .detail-overview {
        padding: 0 8px;
        box-sizing: border-box;
    }
    
    /* 缩小手机边缘间距，提高显示区域 */
    .movie-detail-new .movie-content-bottom {
        padding: 0 10px 16px 10px; /* 间距设为 10px 极度合理且合理靠边 */
        gap: 16px;
    }
    
    /* 利用 flex order 属性重排移动端的垂直堆叠顺序 */
    .movie-detail-new .content-left {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* 1. 导演和主演区域（平铺透明） */
    .movie-detail-new .detail-crew-box {
        order: 1;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* 2. 剧照（排第二） */
    .movie-detail-new .detail-backdrops {
        order: 2;
    }
    
    .movie-detail-new .backdrops-grid {
        grid-template-columns: repeat(2, 1fr); /* 移动端剧照 2 列 */
        gap: 8px;
    }

    /* 3. 技术参数区域（平铺透明，直接靠边对齐） */
    .movie-detail-new .detail-download {
        order: 3;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* 4. 相似影片（排第四，完美挪动到技术参数的下方） */
    .movie-detail-new .similar-movies-sidebar {
        order: 4;
        width: 100%;
        gap: 10px;
    }

    .movie-detail-new .similar-sidebar-grid {
        grid-template-columns: repeat(2, 1fr); /* 移动端相似影片 2 列，铺满手机宽度 */
        gap: 8px;
    }
    
    /* 移动端下还原较小的字体和海报样式 */
    .movie-detail-new .similar-movies-sidebar .similar-poster-placeholder {
        font-size: 20px;
    }
    .movie-detail-new .similar-movies-sidebar .similar-item-card {
        gap: 4px;
    }
    .movie-detail-new .similar-movies-sidebar .similar-item-title {
        font-size: 11px;
    }

    /* 5. 评论区（排最后） */
    .movie-detail-new .detail-comments-section {
        order: 5;
    }
    
    /* 缩小评论输入区卡片与屏幕边缘的间距并平铺 */
    .movie-detail-new .comment-form {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
    }
    
    /* 评论卡片项目平铺，底部分割线 */
    .movie-detail-new .comment-item {
        background: none !important;
        border: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        border-radius: 0 !important;
        padding: 12px 0 !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
    }
}

@media (max-width: 480px) {
    .movie-detail-new .backdrops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .movie-detail-new .similar-sidebar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* ========== 首页使用指南示例优化 ========== */
.hero-details {
    margin-top: 20px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    max-width: 800px;
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.hero-details summary {
    font-weight: 600;
    font-size: 14.5px;
    outline: none;
    margin-bottom: 8px;
    width: fit-content;
    color: rgba(255, 255, 255, 0.95);
    transition: color 0.2s ease;
    display: list-item;
}

.hero-details summary:hover {
    color: #60a5fa;
}

.hero-details-content {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    line-height: 1.7;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero-details-content code {
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 12px;
    border-radius: 4px;
    display: block;
    margin: 8px 0;
    word-break: break-all;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #60a5fa;
}

@media (max-width: 768px) {
    .hero-details {
        margin-top: 15px;
        font-size: 13px;
        max-width: 100%;
    }

    .hero-details summary {
        font-size: 13.5px;
    }

    .hero-details-content {
        padding: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .hero-details-content code {
        padding: 4px 8px;
        margin: 6px 0;
    }
}



/* ====== Search Skeleton ====== */
.skeleton-pulse {
    background: linear-gradient(90deg, var(--bg-secondary, #e2e8f0) 25%, rgba(255,255,255,0.15) 50%, var(--bg-secondary, #e2e8f0) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.movie-card-skeleton {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 12px;
}

.skeleton-poster {
    width: 100px;
    height: 150px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
}

.skeleton-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tmdb-card-skeleton {
    display: flex;
    text-align: left;
    background: var(--card-bg, #1e293b);
    border-radius: 16px;
    padding: 20px;
    gap: 20px;
    min-height: 300px;
}

/* ====== Search Suggestions Dropdown ====== */
.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-input-wrapper {
    position: relative;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color, #333);
    transition: background 0.15s;
}

.suggestion-item:hover {
    background: var(--bg-secondary, #e2e8f0);
}

.suggestion-icon {
    font-size: 12px;
    opacity: 0.6;
}

.suggestion-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-poster {
    width: 32px;
    height: 48px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary, #e2e8f0);
    flex-shrink: 0;
}

.suggestion-movie .suggestion-text {
    font-weight: 500;
}

/* ====== Suggestion Loading Animation ====== */
.suggestion-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
}

.suggestion-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted, #999);
    animation: suggestionPulse 1.2s ease-in-out infinite;
}

.suggestion-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.suggestion-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes suggestionPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ====== Search Results Grid ====== */
#search-results-area .movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 0;
}

#search-results-area .movie-card {
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

#search-results-area .movie-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#search-results-area .movie-card .movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
}

#search-results-area .movie-card .movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#search-results-area .movie-card .movie-info {
    padding: 8px 10px;
}

#search-results-area .movie-card .movie-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#search-results-area .movie-card .movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

#search-results-area .movie-card .movie-meta span {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-muted, #666);
}

@media (min-width: 768px) {
    #search-results-area .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 480px) {
    #search-results-area .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ====== Async Stats ====== */
.movie-stats-placeholder {
    min-height: 20px;
    margin-top: 6px;
}

.movie-stats {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted, #666);
}

.movie-stats span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ====== Partial Status Note ====== */
.tmdb-partial-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted, #94a3b8);
    padding: 16px 0 8px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    margin-top: 16px;
}




/* TMDB Redesign Styles */
.tmdb-redesign-container { text-align: center; margin: 40px auto; max-width: 680px; }
.tmdb-redesign-header { font-size: 13px; color: var(--text-muted, #94a3b8); margin-bottom: 20px; }
.keyword-highlight { color: var(--text-color, #f8fafc); opacity: 0.9; }
.tmdb-redesign-card-wrapper { position: relative; }
.tmdb-redesign-nav-container { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.btn-tmdb-nav { 
    background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); 
    padding: 6px 14px; border-radius: 6px; font-size: 0.85em; cursor: pointer; transition: all 0.2s; font-weight: 600; 
}
.btn-tmdb-nav:hover { background: rgba(255, 255, 255, 0.1); color: var(--primary-color, #3b82f6); border-color: var(--primary-color, #3b82f6); }
.tmdb-redesign-count-badge { 
    background: rgba(59, 130, 246, 0.1); color: var(--primary-color, #3b82f6); padding: 4px 14px; 
    border-radius: 20px; font-weight: 700; font-family: monospace; font-size: 0.9em; min-width: 60px; text-align: center; 
}
.tmdb-redesign-card { 
    display: flex; text-align: left; background: linear-gradient(145deg, rgba(59, 130, 246, 0.08) 0%, var(--card-bg, #1e293b) 100%);
    border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); overflow: hidden; padding: 20px; gap: 20px;
}
.tmdb-card-anim { animation: fadeUpIn 0.3s ease-out forwards; }
@keyframes fadeUpIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.tmdb-card-poster { width: 160px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.tmdb-card-poster img { width: 100%; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.tmdb-card-rating, .tmdb-card-year { font-size: 12px; font-weight: bold; color: var(--text-muted); background: rgba(0,0,0,0.2); padding: 4px 12px; border-radius: 12px; width: 100%; text-align: center; box-sizing: border-box; }
.tmdb-card-rating { color: #f59e0b; }
.tmdb-card-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.tmdb-title { font-size: 22px; font-weight: bold; color: #fff; margin: 0 0 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmdb-original-title { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmdb-genre-badge { display: inline-block; background: rgba(255,255,255,0.1); color: #e2e8f0; font-size: 11px; padding: 3px 8px; border-radius: 6px; margin-bottom: 12px; }
.tmdb-overview { font-size: 14px; line-height: 1.6; color: #cbd5e1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 16px; }
.tmdb-action-area { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 16px; margin-top: auto; }
.btn-tmdb-redesign-trigger { 
    position: relative; 
    overflow: hidden; 
    width: 100%; 
    height: 48px; 
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35); 
}
html.dark-theme .btn-tmdb-redesign-trigger {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #06b6d4 100%);
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.4);
}
.btn-tmdb-redesign-trigger::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: none;
}
.btn-tmdb-redesign-trigger:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.5); 
}
html.dark-theme .btn-tmdb-redesign-trigger:hover {
    box-shadow: 0 8px 26px rgba(79, 70, 229, 0.55), 0 0 14px rgba(6, 182, 212, 0.3);
}
.btn-tmdb-redesign-trigger:hover::after {
    left: 150%;
    transition: left 1s ease-in-out;
}
.btn-tmdb-redesign-trigger:active { 
    transform: translateY(1px) scale(0.98); 
}
.btn-tmdb-redesign-trigger:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none !important; 
    box-shadow: none !important; 
}
.btn-tmdb-redesign-trigger:disabled::after {
    display: none;
}
.btn-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}
.btn-tmdb-redesign-trigger:hover .btn-icon {
    animation: lightning-wiggle 0.5s ease-in-out infinite alternate;
}
@keyframes lightning-wiggle {
    0% { transform: rotate(0deg) scale(1); filter: none; }
    100% { transform: rotate(15deg) scale(1.2); filter: drop-shadow(0 0 4px #f59e0b); }
}
.tmdb-action-help { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 10px; }
.tmdb-redesign-fallback { padding: 40px 20px; background: var(--card-bg); border-radius: 16px; border: 1px dashed var(--border-color); }
.fallback-icon { font-size: 32px; margin-bottom: 15px; opacity: 0.8; }
.tmdb-redesign-fallback h3 { font-size: 18px; margin: 0 0 10px 0; color: #fff; }
.tmdb-redesign-fallback p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 25px; }
.tmdb-redesign-back { display: inline-block; margin-top: 32px; color: var(--text-muted); font-size: 14px; text-decoration: none; transition: color 0.2s; }
.tmdb-redesign-back:hover { color: #fff; text-decoration: underline; }

@media (max-width: 500px) {
    .tmdb-redesign-card { flex-direction: row; padding: 15px; gap: 15px; }
    .tmdb-card-poster { width: 90px; }
    .tmdb-title { font-size: 18px; }
    .tmdb-overview { font-size: 13px; -webkit-line-clamp: 3; }
    .tmdb-action-help { line-height: 1.5; }
}

/* ====== PC Stats in Title ====== */
.pc-only-stats {
    display: none;
}

@media (min-width: 769px) {
    .pc-only-stats {
        display: inline-flex;
        margin-left: auto;
        padding-left: 15px;
        border-left: 1px solid var(--border-color);
    }
    .mobile-only-stats {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-only-stats {
        display: inline-flex;
        margin-top: 5px;
    }
}

/* ====== Detail Page Tech Params Fix ====== */
@media (min-width: 769px) {
    .version-item {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
    }

    .version-info {
        text-align: left !important;
        flex: 1;
    }

    .version-meta {
        justify-content: flex-start !important;
    }

    .version-actions {
        width: auto !important;
        display: flex !important;
        flex-direction: row !important;
        grid-template-columns: none !important;
        gap: 10px !important;
    }

    .version-actions .btn-copy {
        width: auto !important;
        padding: 8px 16px !important;
    }
}

/* ==========================================================================
   ====== 统一重构全站按钮设计规范 ======
   ========================================================================== */

/* 1. 主按钮系列 (确定、开始检索、评论发表、登录、注册、修改密码等) */
.btn-confirm,
.btn-comment-submit,
.btn-search-trigger,
.btn-auth-submit,
.btn-send-code,
.btn-primary,
.btn-login-combined,
.btn-register,
.btn-admin-panel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: var(--btn-font-weight) !important;
    line-height: 1.5 !important;
    padding: 9px 20px !important;
    border-radius: var(--btn-border-radius) !important;
    border: none !important;
    cursor: pointer !important;
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
    box-shadow: var(--btn-primary-shadow) !important;
    transition: var(--btn-transition) !important;
    text-decoration: none !important;
    text-shadow: none !important;
}

.btn-confirm:hover,
.btn-comment-submit:hover,
.btn-search-trigger:hover,
.btn-auth-submit:hover,
.btn-send-code:hover,
.btn-primary:hover,
.btn-login-combined:hover,
.btn-register:hover,
.btn-admin-panel:hover {
    background: var(--btn-primary-hover-bg) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: var(--btn-primary-hover-shadow) !important;
    filter: none !important;
}

.btn-confirm:active,
.btn-comment-submit:active,
.btn-search-trigger:active,
.btn-auth-submit:active,
.btn-send-code:active,
.btn-primary:active,
.btn-login-combined:active,
.btn-register:active,
.btn-admin-panel:active {
    transform: translateY(0) scale(0.98) !important;
}

/* 2. 辅助/次要按钮系列 (取消、放弃、关闭、返回、导航切换等) */
.btn-cancel,
.btn-action,
.btn-back,
.btn-back-home,
.btn-back-wanted,
.btn-tmdb-nav,
.btn-nav,
.btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: var(--btn-font-weight) !important;
    line-height: 1.5 !important;
    padding: 8px 18px !important;
    border-radius: var(--btn-border-radius) !important;
    background: var(--btn-secondary-bg) !important;
    border: var(--btn-secondary-border) !important;
    color: var(--btn-secondary-text) !important;
    cursor: pointer !important;
    transition: var(--btn-transition) !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.btn-cancel:hover,
.btn-action:hover,
.btn-back:hover,
.btn-back-home:hover,
.btn-back-wanted:hover,
.btn-tmdb-nav:hover,
.btn-nav:hover,
.btn-secondary:hover {
    background: var(--btn-secondary-hover-bg) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08) !important;
    filter: none !important;
}

.btn-cancel:active,
.btn-action:active,
.btn-back:active,
.btn-back-home:active,
.btn-back-wanted:active,
.btn-tmdb-nav:active,
.btn-nav:active,
.btn-secondary:active {
    transform: translateY(0) scale(0.98) !important;
}

/* 3. 成功与获取系列按钮 (下载、获取磁力等) */
.btn-magnet,
.btn-download,
.btn-success {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: var(--btn-font-weight) !important;
    line-height: 1.5 !important;
    padding: 9px 20px !important;
    border-radius: var(--btn-border-radius) !important;
    border: none !important;
    cursor: pointer !important;
    background: var(--btn-success-bg) !important;
    color: var(--btn-success-text) !important;
    box-shadow: var(--btn-success-shadow) !important;
    transition: var(--btn-transition) !important;
    text-decoration: none !important;
}

.btn-magnet:hover,
.btn-download:hover,
.btn-success:hover {
    background: var(--btn-success-hover-bg) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35) !important;
    filter: none !important;
}

.btn-magnet:active,
.btn-download:active,
.btn-success:active {
    transform: translateY(0) scale(0.98) !important;
}

/* 4. 复制系列按钮 (边框与主色调统一，Hover 变为主色实底) */
.btn-copy,
.btn-copy-tech,
.btn-copy-search {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: var(--btn-font-weight) !important;
    line-height: 1.5 !important;
    padding: 8px 18px !important;
    border-radius: var(--btn-border-radius) !important;
    background: transparent !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    cursor: pointer !important;
    transition: var(--btn-transition) !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.btn-copy:hover,
.btn-copy-tech:hover,
.btn-copy-search:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px) !important;
    box-shadow: var(--btn-primary-shadow) !important;
}

.btn-copy:active,
.btn-copy-tech:active,
.btn-copy-search:active {
    transform: translateY(0) scale(0.98) !important;
}

.btn-copy.copied,
.btn-copy-tech.copied,
.btn-copy-search.copied {
    background: var(--btn-success-bg) !important;
    border-color: transparent !important;
    color: var(--btn-success-text) !important;
}

/* 5. 危险/删除动作按钮系列 (删除评论、删除参数等) */
.btn-delete-comment,
.btn-delete-param,
.btn-logout-profile,
.btn-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: var(--btn-font-weight) !important;
    line-height: 1.5 !important;
    padding: 6px 14px !important;
    border-radius: var(--btn-border-radius) !important;
    border: none !important;
    cursor: pointer !important;
    background: var(--btn-danger-bg) !important;
    color: var(--btn-danger-text) !important;
    box-shadow: var(--btn-danger-shadow) !important;
    transition: var(--btn-transition) !important;
    text-decoration: none !important;
}

.btn-delete-comment:hover,
.btn-delete-param:hover,
.btn-logout-profile:hover,
.btn-danger:hover {
    background: var(--btn-danger-hover-bg) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35) !important;
}

.btn-delete-comment:active,
.btn-delete-param:active,
.btn-logout-profile:active,
.btn-danger:active {
    transform: translateY(0) scale(0.98) !important;
}

/* 当搜索未收录或无结果页面渲染时，进一步压紧间距 */
.home-layout:has(.no-results) {
    margin-top: 6px !important;
}
.home-layout:has(.no-results) .tmdb-redesign-container {
    margin-top: 5px !important;
}
.search-result-header {
    margin-bottom: 8px !important;
}


/* Share Card Styles */
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white !important;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    outline: none;
    box-shadow: 0 4px 10px rgba(24, 40, 72, 0.25);
    margin-left: 5px;
}

.btn-share:hover {
    background: linear-gradient(135deg, #5c7cc2 0%, #203a61 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 14px rgba(24, 40, 72, 0.4);
    color: white !important;
}

.btn-share:active {
    transform: translateY(0);
}

#share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.share-modal-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

#share-image-container {
    margin: 15px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.share-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s;
    z-index: 10;
}

.share-modal-close:hover {
    background: #ff2442;
    color: white;
    transform: rotate(90deg);
}

.share-tip {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .btn-share {
        flex: 1;
        padding: 8px 5px;
        font-size: 12px;
        margin-left: 0;
    }
    
    .share-modal-content {
        padding: 15px;
        width: 95%;
    }
}


/* ==================== 视频技术参数 & 讨论区深度美化 ==================== */
.detail-comments-section h3,
.movie-detail-new h3 {
    position: relative;
    padding-left: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 30px 0 20px 0;
}
.detail-comments-section h3::before,
.movie-detail-new h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), #f39c12);
    border-radius: 2px;
}

.request-collect-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}
html.dark-theme .request-collect-wrapper {
    background: rgba(255, 255, 255, 0.02);
}
.request-collect-wrapper:hover {
    border-color: var(--primary-color);
    background: rgba(255, 36, 66, 0.015);
}
html.dark-theme .request-collect-wrapper:hover {
    background: rgba(255, 36, 66, 0.03);
}
.btn-request-collect-tech {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b8b 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 30px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.2) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-request-collect-tech:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 36, 66, 0.35) !important;
}

.episode-group {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}
html.dark-theme .episode-group {
    background: rgba(255, 255, 255, 0.01);
}
.episode-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}
.episode-header::before {
    content: "🎬";
    margin-right: 6px;
    font-size: 14px;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 20px;
}
html.dark-theme .version-item {
    background: rgba(30, 41, 59, 0.45);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.version-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 36, 66, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
html.dark-theme .version-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

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

.version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.version-meta .badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    color: #fff !important;
}

.version-meta .badge[data-val*="2160p"],
.version-meta .badge[data-val*="4k"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.version-meta .badge[data-val*="1080p"] {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.version-meta .badge[data-val*="dolby"],
.version-meta .badge[data-val*="dv"],
.version-meta .badge[data-val*="hdr"] {
    background: linear-gradient(135deg, #a855f7 0%, #6b21a8 100%);
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.2);
}

.version-meta .badge[data-val*="atmos"],
.version-meta .badge[data-val*="dts"],
.version-meta .badge[data-val*="truehd"] {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.version-meta .badge[data-val*="hevc"],
.version-meta .badge[data-val*="h265"],
.version-meta .badge[data-val*="x265"] {
    background: linear-gradient(135deg, #6b7280 0%, #374151 100%);
    box-shadow: 0 2px 6px rgba(107, 114, 128, 0.2);
}

.version-meta .badge:not([data-val*="2160p"]):not([data-val*="4k"]):not([data-val*="1080p"]):not([data-val*="dolby"]):not([data-val*="dv"]):not([data-val*="hdr"]):not([data-val*="atmos"]):not([data-val*="dts"]):not([data-val*="truehd"]):not([data-val*="hevc"]):not([data-val*="h265"]):not([data-val*="x265"]) {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color) !important;
}
html.dark-theme .version-meta .badge:not([data-val*="2160p"]):not([data-val*="4k"]):not([data-val*="1080p"]):not([data-val*="dolby"]):not([data-val*="dv"]):not([data-val*="hdr"]):not([data-val*="atmos"]):not([data-val*="dts"]):not([data-val*="truehd"]):not([data-val*="hevc"]):not([data-val*="h265"]):not([data-val*="x265"]) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8) !important;
}

.version-title-raw {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-color);
    word-break: break-all;
}

.version-size {
    font-size: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.03);
    padding: 3px 8px;
    border-radius: 6px;
    width: fit-content;
}
html.dark-theme .version-size {
    background: rgba(255, 255, 255, 0.04);
}

.version-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.version-actions .btn-download {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b8b 100%) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 7px 16px !important;
    border-radius: 30px !important;
    box-shadow: 0 3px 8px rgba(255, 36, 66, 0.18) !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    border: none !important;
}
.version-actions .btn-download:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 5px 12px rgba(255, 36, 66, 0.3) !important;
}

.version-actions .btn-copy,
.version-actions .btn-share,
.version-actions .btn-action {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 7px 14px !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}
html.dark-theme .version-actions .btn-copy,
html.dark-theme .version-actions .btn-share,
html.dark-theme .version-actions .btn-action {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.version-actions .btn-copy:hover,
.version-actions .btn-share:hover,
.version-actions .btn-action:hover {
    background: var(--border-color) !important;
    transform: translateY(-1.5px);
}

.version-actions .btn-delete-param {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 7px 14px !important;
    border-radius: 30px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.18) !important;
    transition: all 0.2s ease !important;
}
.version-actions .btn-delete-param:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 5px 12px rgba(239, 68, 68, 0.3) !important;
}

.comment-form {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
    margin-bottom: 25px;
}
html.dark-theme .comment-form {
    background: rgba(30, 41, 59, 0.35);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.comment-form textarea.form-control {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    transition: all 0.25s ease !important;
}
.comment-form textarea.form-control:focus {
    background: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1) !important;
    outline: none !important;
}
html.dark-theme .comment-form textarea.form-control:focus {
    background: rgba(15, 23, 42, 0.3) !important;
}
.btn-comment-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b8b 100%) !important;
    color: white !important;
    border: none !important;
    padding: 9px 24px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(255, 36, 66, 0.15) !important;
    transition: all 0.25s ease !important;
}
.btn-comment-submit:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 14px rgba(255, 36, 66, 0.25) !important;
}

.comment-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 20px 24px !important;
    border-radius: 14px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.015) !important;
    transition: all 0.25s ease !important;
}
html.dark-theme .comment-item {
    background: rgba(30, 41, 59, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.18) !important;
}
.comment-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.025) !important;
}
html.dark-theme .comment-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22) !important;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px !important;
}
.comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-user strong {
    font-size: 14.5px;
    font-weight: 700;
}
.comment-user strong a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.comment-user strong a:hover {
    color: var(--primary-color) !important;
}
.comment-user .badge,
.reply-user .badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    display: inline-block;
}
.comment-user .badge[style*="#ef4444"],
.reply-user .badge[style*="#ef4444"] {
    background: linear-gradient(135deg, #ef4444 0%, #c026d3 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.15);
}
.comment-user .badge[style*="#f59e0b"],
.reply-user .badge[style*="#f59e0b"] {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.15);
}

.comment-action-bar {
    display: flex;
    align-items: center;
    gap: 15px !important;
}
.comment-date {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
}
.comment-action-bar a {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.comment-action-bar a:hover {
    color: var(--primary-color) !important;
    transform: scale(1.03);
}

.btn-delete-comment {
    background: transparent !important;
    border: none !important;
    color: #ef4444 !important;
    cursor: pointer !important;
    font-size: 12px !important;
    padding: 0 !important;
    font-weight: 600 !important;
    transition: opacity 0.2s ease;
}
.btn-delete-comment:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.comment-content {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    color: var(--text-color) !important;
    opacity: 0.95;
    margin-top: 5px;
    white-space: pre-wrap;
}
html.dark-theme .comment-content {
    opacity: 0.9;
}

.replies-list {
    margin-left: 24px !important;
    border-left: 2px solid rgba(0, 0, 0, 0.05) !important;
    padding-left: 20px !important;
    display: flex;
    flex-direction: column;
    gap: 14px !important;
    margin-top: 18px !important;
}
html.dark-theme .replies-list {
    border-left-color: rgba(255, 255, 255, 0.06) !important;
}

.reply-item {
    background: rgba(0, 0, 0, 0.015) !important;
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}
html.dark-theme .reply-item {
    background: rgba(255, 255, 255, 0.015) !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
}

.reply-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px !important;
}
.reply-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.reply-user strong {
    font-size: 13.5px;
    font-weight: 700;
}
.reply-user strong a {
    color: var(--text-color) !important;
    text-decoration: none !important;
}
.reply-user strong a:hover {
    color: var(--primary-color) !important;
}
.reply-user span {
    color: var(--text-muted);
    margin: 0 4px;
}
.reply-user .reply-target {
    color: var(--primary-color);
}

.reply-action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}
.reply-date {
    font-size: 11px;
    color: var(--text-muted);
}
.reply-action-bar a {
    font-size: 11px;
    color: var(--primary-color);
    text-decoration: none;
}
.reply-action-bar a:hover {
    text-decoration: underline;
}

.reply-content {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    color: var(--text-color) !important;
    opacity: 0.9;
    white-space: pre-wrap;
}

/* SEO 演职人员链接美化 */
.seo-crew-link,
.seo-crew-link:link,
.seo-crew-link:visited {
    color: #334155 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f1f5f9 !important;
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
html.dark-theme .seo-crew-link,
html.dark-theme .seo-crew-link:link,
html.dark-theme .seo-crew-link:visited {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
.seo-crew-link:hover,
.seo-crew-link:active {
    color: #ffffff !important;
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(255, 36, 66, 0.25) !important;
}
html.dark-theme .seo-crew-link:hover,
html.dark-theme .seo-crew-link:active {
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.4) !important;
}

@media (max-width: 768px) {
    .version-item {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 12px;
    }
    
    .version-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
        border-top: 1px solid var(--border-color);
        padding-top: 10px;
        gap: 6px;
    }
    html.dark-theme .version-actions {
        border-top-color: rgba(255, 255, 255, 0.06);
    }
    
    .version-actions .btn-download,
    .version-actions .btn-copy,
    .version-actions .btn-share,
    .version-actions .btn-delete-param {
        padding: 6px 12px !important;
        font-size: 11px !important;
        flex: 1;
        justify-content: center;
        min-width: 80px;
    }

    .comment-item {
        padding: 16px 16px !important;
    }
    
    .replies-list {
        margin-left: 12px !important;
        padding-left: 12px !important;
    }
    
    .reply-item {
        padding: 10px 12px !important;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .comment-action-bar {
        width: 100%;
        justify-content: space-between;
        border-top: 1px dashed var(--border-color);
        padding-top: 8px;
    }
    html.dark-theme .comment-action-bar {
        border-top-color: rgba(255, 255, 255, 0.06);
    }
}

/* ====== Redesigned Search Layout (AJAX) ====== */

/* Hide sidebar & extras in search mode */
.home-layout.search-mode .home-sidebar,
.home-layout.search-mode .home-right-sidebar,
.home-layout.search-mode .mobile-sticky-modules {
    display: none !important;
}

.home-layout.search-mode .home-main {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

.home-layout.search-mode .list-header-controls {
    display: none !important;
}

/* ====== Search Results Area ====== */
#search-results-area {
    margin-top: 20px;
}

/* ====== Main Container ====== */
.search-layout-container {
    display: flex;
    width: 100%;
}

/* Column layout: stacked vertically (default) */
.search-layout-container.column-layout {
    flex-direction: column;
    gap: 32px;
}

.search-layout-container.column-layout .search-left-col,
.search-layout-container.column-layout .search-right-col {
    width: 100%;
}

/* Row layout: side-by-side (when both sections fit) */
.search-layout-container.row-layout {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.search-layout-container.row-layout .search-left-col,
.search-layout-container.row-layout .search-right-col {
    flex: 1 1 0;
    min-width: 0;
}

/* Specific widths for search modes in row layout */
.home-layout.search-narrow-mode .search-layout-container.row-layout .search-left-col,
.home-layout.search-narrow-mode .search-layout-container.row-layout .search-right-col {
    flex: 0 0 calc(50% - 12px);
}

.home-layout.search-hit-mode .search-layout-container.row-layout .search-left-col {
    flex: 0 0 calc(65% - 12px);
}

.home-layout.search-hit-mode .search-layout-container.row-layout .search-right-col {
    flex: 0 0 calc(35% - 12px);
}

/* PC 端搜索页右栏铺满剩余宽度 */
@media (min-width: 901px) {
    .home-layout.search-hit-mode .search-layout-container.row-layout .search-left-col {
        flex: 1;
        min-width: 0;
    }
    .home-layout.search-hit-mode .search-layout-container.row-layout .search-right-col,
    .home-layout.search-narrow-mode .search-layout-container.row-layout .search-right-col {
        flex: 1;
        min-width: 0;
    }
}

/* Portrait cards become a responsive grid in row-layout */
.search-layout-container.row-layout .search-portrait-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
}

.search-layout-container.row-layout .search-portrait-card {
    width: 100%;
}

.search-layout-container.row-layout .search-right-col .search-portrait-card {
    width: 155px;
    flex: 0 0 155px;
}

/* Right column portrait cards wrap naturally (flex with wrap = 平铺全宽) */
.search-right-col .search-portrait-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.search-layout-container.column-layout .search-right-col .search-portrait-card {
    width: 100%;
}

/* Section titles in row layout wrap naturally */
.search-layout-container.row-layout .search-section-title {
    width: 100%;
}

.search-layout-container.row-layout .search-right-col {
    flex-shrink: 0;
}

/* Vertical divider between sections (row layout only) */
.search-divider-vertical {
    width: 1px;
    align-self: stretch;
    background: var(--border-color);
    flex-shrink: 0;
}

/* Section titles */
.search-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section-title .result-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ====== Portrait Card Grid (Results & ≤3 TMDB) ====== */
.search-portrait-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 20px;
}

.search-portrait-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    position: relative;
    transition: transform 0.2s ease;
    cursor: default;
}

.search-portrait-card.is-collected {
    cursor: pointer;
}

.search-portrait-card.is-collected:hover {
    transform: translateY(-4px);
}

.portrait-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.portrait-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portrait-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    margin: 0;
}

.portrait-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.portrait-year {
    color: var(--text-muted);
}

.portrait-type {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.portrait-actions {
    margin-top: 2px;
}

.portrait-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 34px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}
html.dark-theme .portrait-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}
.portrait-btn:hover {
    transform: translateY(-1.5px);
    opacity: 1;
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.4);
}
html.dark-theme .portrait-btn:hover {
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}
.portrait-btn:active {
    transform: translateY(0.5px) scale(0.98);
}
.portrait-btn:hover .btn-icon {
    animation: lightning-wiggle 0.5s ease-in-out infinite alternate;
}

/* ====== Empty State ====== */
.no-results-text {
    font-size: 14px;
    color: var(--text-muted);
    padding: 24px 0;
    text-align: center;
    line-height: 1.6;
}

/* Rich no-results message for search page */
.search-noresults-rich {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 32px;
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
    color: var(--text-color);
}

/* ====== Compact TMDB Cards (>3 local results) ====== */
.tmdb-compact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tmdb-compact-card {
    display: flex;
    gap: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    transition: all 0.2s;
    overflow: hidden;
    min-height: 84px;
}

.tmdb-compact-card:hover {
    background: var(--card-bg);
    border-color: rgba(59, 130, 246, 0.2);
}

.compact-poster {
    width: 56px;
    height: 84px;
    flex-shrink: 0;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.compact-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-rating {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(0, 0, 0, 0.75);
    color: #f59e0b;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.4;
}

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

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.compact-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.compact-year {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.compact-badge {
    font-size: 9px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.compact-overview {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
}

.compact-btn {
    position: relative;
    overflow: hidden;
    height: 28px;
    padding: 0 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white !important;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-self: flex-start;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}
html.dark-theme .compact-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}
.compact-btn:hover {
    transform: translateY(-1px);
    opacity: 1;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}
html.dark-theme .compact-btn:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.45);
}
.compact-btn:active {
    transform: translateY(0.5px) scale(0.97);
}
.compact-btn:hover .btn-icon {
    animation: lightning-wiggle 0.5s ease-in-out infinite alternate;
}

/* ====== Re-search Form ====== */
.search-again-container {
    margin-top: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.search-again-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.search-again-form {
    display: flex;
    gap: 10px;
}

.search-again-input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 13px;
    outline: none;
}

.search-again-input:focus {
    border-color: var(--primary-color);
}

.search-again-btn {
    height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.search-again-btn:hover {
    opacity: 0.9;
}

/* ====== Full TMDB Card (fallback) ====== */
.tmdb-full-card {
    flex: 1;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.tmdb-full-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.full-poster {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #1e293b;
}

.full-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.full-rating {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #FFD700;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.full-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.full-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.full-info-rating {
    font-weight: bold;
    color: #FFD700;
}

.full-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin: 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.full-overview {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 12px 0;
    flex: 1;
}

.full-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 44px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white !important;
    border: none;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    word-break: keep-all;
    white-space: normal;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
html.dark-theme .full-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #06b6d4 100%);
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.4);
}
.full-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: none;
}
.full-btn:hover {
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.5);
}
html.dark-theme .full-btn:hover {
    box-shadow: 0 8px 26px rgba(79, 70, 229, 0.55), 0 0 14px rgba(6, 182, 212, 0.3);
}
.full-btn:hover::after {
    left: 150%;
    transition: left 1s ease-in-out;
}
.full-btn:active {
    transform: translateY(1px) scale(0.98);
}
.full-btn:hover .btn-icon {
    animation: lightning-wiggle 0.5s ease-in-out infinite alternate;
}

/* ====== Dark Mode ====== */
html.dark-theme .search-noresults-rich {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark-theme .search-divider-vertical {
    background: rgba(255, 255, 255, 0.08);
}

html.dark-theme .tmdb-compact-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark-theme .tmdb-compact-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

html.dark-theme .tmdb-full-card {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ====== Responsive ====== */
@media (max-width: 820px) {
    .search-layout-container.column-layout {
        gap: 24px;
    }
    .search-layout-container.row-layout {
        gap: 24px;
    }
    .tmdb-full-card {
        width: 100%;
    }
    .full-poster {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .search-layout-container {
        gap: 20px;
    }

    /* Force column layout on mobile */
    .search-layout-container.row-layout {
        flex-direction: column;
        gap: 20px;
    }
    .search-layout-container.row-layout .search-left-col {
        width: 100%;
    }
    .search-layout-container.row-layout .search-right-col {
        width: 100%;
    }
    .search-layout-container.row-layout .search-divider-vertical {
        display: none;
    }

    .search-portrait-list,
    .search-left-col .search-portrait-list,
    .search-right-col .search-portrait-list,
    .search-layout-container.row-layout .search-portrait-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-bottom: 8px;
    }

    .search-portrait-list::-webkit-scrollbar {
        display: none;
    }

    .search-portrait-card {
        width: 100%;
    }

    .portrait-poster {
        width: 100%;
        aspect-ratio: 2 / 3;
    }

    .tmdb-compact-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
    }

    .tmdb-compact-card {
        flex: 0 0 280px;
    }
}

/* 入库成功提示中的金币高亮 */
.wiki-coin-highlight {
    color: var(--wiki-coin-highlight, #d97706);
    font-weight: 800;
    font-size: 1.1em;
}

/* ====== 更多推荐卡片及动画效果 ====== */
.recommend-more-card {
    width: 100%;
    align-self: stretch;
    cursor: pointer !important;
    border: 2px dashed var(--primary-color, #3b82f6);
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    overflow: hidden;
}

.recommend-more-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(59, 130, 246, 0.12));
    border-color: #6366f1;
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.more-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 15px 10px;
    text-align: center;
    width: 100%;
}

.more-card-icon {
    font-size: 26px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rotatePulse 3s infinite ease-in-out;
}

.more-card-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
    letter-spacing: 1px;
}

.more-card-arrow {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.recommend-more-card:hover .more-card-arrow {
    transform: translateX(5px);
    color: var(--primary-color, #3b82f6);
}

/* 状态提示样式 */
.recommend-status-text {
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    grid-column: 1 / -1;
    animation: slideUpFade 0.4s ease forwards;
}

/* 渐显动画 */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotatePulse {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.12) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.search-portrait-card.animate-fade-in {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 768px) {
    .recommend-more-card {
        width: 100%;
        min-height: 200px;
    }
}


