/* ============================================================
   仿爱奇艺 maccms10 模板 - 核心样式
   路径：template/iqiyi/css/style.css
   ============================================================ */

:root {
    --iqiyi-green: #00be06;
    --iqiyi-green-dark: #00a305;
    --bg-dark: #f5f5f5;
    --text-main: #333;
    --text-sub: #999;
    --border-color: #e8e8e8;
    --card-radius: 8px;
    --card-bg: #fff;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg-dark);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul, ol { list-style: none; }
img { max-width: 100%; border: 0; display: block; }
input, button, select, textarea { font-family: inherit; font-size: inherit; outline: none; }
button { cursor: pointer; }

/* ---------- 顶部导航 ---------- */
.iq-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.iq-nav-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 30px;
}
.iq-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--iqiyi-green);
    letter-spacing: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.iq-logo img { height: 32px; width: auto; display: inline-block; vertical-align: middle; }

.iq-nav {
    display: flex;
    gap: 20px;
    font-size: 15px;
    font-weight: 500;
    flex-shrink: 0;
}
.iq-nav a { color: var(--text-main); }
.iq-nav a:hover { color: var(--iqiyi-green); }

/* 搜索框 */
.iq-search {
    flex: 1;
    max-width: 500px;
    position: relative;
    margin-left: auto;
}
.iq-search input {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    padding: 0 45px 0 20px;
    background: #f8f8f8;
    transition: border-color 0.3s, background 0.3s;
}
.iq-search input:focus {
    border-color: var(--iqiyi-green);
    background: #fff;
}
.iq-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 30px;
    width: 30px;
    border: none;
    background: var(--iqiyi-green);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.iq-search button:hover { background: var(--iqiyi-green-dark); }

/* ---------- 内容容器 ---------- */
.iq-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ---------- 模块标题 ---------- */
.iq-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0 15px;
}
.iq-section-title h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
}
.iq-section-title h2 span {
    color: var(--iqiyi-green);
    margin-right: 8px;
    font-weight: bold;
}
.iq-more {
    font-size: 14px;
    color: var(--text-sub);
    transition: color 0.2s;
}
.iq-more:hover { color: var(--iqiyi-green); }

/* ---------- 视频卡片网格 ---------- */
.iq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.iq-card {
    display: block;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.iq-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.iq-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #eee;
}
.iq-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.iq-card:hover .iq-card-img img { transform: scale(1.05); }

.iq-card-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

.iq-card-info { padding: 10px; }
.iq-card-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: var(--text-main);
}
.iq-card-desc {
    font-size: 12px;
    color: var(--text-sub);
    display: flex;
    justify-content: space-between;
    gap: 6px;
}
.iq-card-desc span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 筛选条 ---------- */
.iq-filter-bar {
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--card-radius);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.iq-filter-bar > span:first-child {
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
    margin-right: 4px;
}
.iq-filter-bar a {
    padding: 4px 12px;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
    white-space: nowrap;
}
.iq-filter-bar a:hover {
    background: #eafbea;
    color: var(--iqiyi-green);
}
.iq-filter-active {
    background: var(--iqiyi-green) !important;
    color: #fff !important;
}
.iq-filter-active:hover {
    background: var(--iqiyi-green-dark) !important;
    color: #fff !important;
}

/* ---------- 详情页 ---------- */
.iq-detail-box {
    display: flex;
    gap: 30px;
    background: #fff;
    padding: 20px;
    border-radius: var(--card-radius);
}
.iq-detail-poster {
    width: 200px;
    flex-shrink: 0;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: #eee;
}
.iq-detail-poster img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.iq-detail-info { flex: 1; min-width: 0; }
.iq-detail-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}
.iq-detail-info p {
    color: var(--text-sub);
    margin-bottom: 8px;
    font-size: 14px;
}
.iq-detail-info p.iq-blurb {
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.8;
}
.iq-play-btn {
    display: inline-block;
    background: var(--iqiyi-green);
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}
.iq-play-btn:hover { background: var(--iqiyi-green-dark); color: #fff; }

/* 播放列表区块 */
.iq-playlist-box {
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--card-radius);
    margin-bottom: 16px;
}
.iq-playlist-box h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}
.iq-playlist-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.iq-playlist-links a {
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
}
.iq-playlist-links a:hover {
    background: #eafbea;
    color: var(--iqiyi-green);
}
.iq-playlist-links a.iq-current {
    background: var(--iqiyi-green);
    color: #fff;
}

/* ---------- 播放页 ---------- */
.iq-player-box {
    background: #000;
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 16 / 9;
    position: relative;
}
.iq-player-box iframe,
.iq-player-box video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ---------- 搜索页 ---------- */
.iq-search-panel {
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--card-radius);
    margin-bottom: 20px;
}
.iq-search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}
.iq-search-form input {
    flex: 1;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 0 20px;
    background: #f8f8f8;
}
.iq-search-form input:focus {
    border-color: var(--iqiyi-green);
    background: #fff;
}
.iq-search-form button {
    height: 40px;
    padding: 0 24px;
    background: var(--iqiyi-green);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
}
.iq-search-form button:hover { background: var(--iqiyi-green-dark); }

.iq-search-hot {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-sub);
}
.iq-search-hot a {
    margin: 0 6px;
    color: var(--iqiyi-green);
}
.iq-search-hot a:hover { color: var(--iqiyi-green-dark); }

.iq-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--text-sub);
    background: #fff;
    border-radius: var(--card-radius);
    font-size: 15px;
}

/* ---------- 分页 ---------- */
.mac_pages {
    text-align: center;
    padding: 30px 0;
}
.mac_pages .page_tip {
    color: var(--text-sub);
    font-size: 13px;
    margin-bottom: 12px;
}
.mac_pages .page_info {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.mac_pages .page_link {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
}
.mac_pages .page_link:hover {
    background: #eafbea;
    color: var(--iqiyi-green);
}
.mac_pages .page_current {
    background: var(--iqiyi-green);
    color: #fff;
}
.mac_pages .page_current:hover {
    background: var(--iqiyi-green);
    color: #fff;
}
.mac_pages .page_input {
    width: 40px;
    height: 32px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    margin-left: 4px;
}
.mac_pages .page_btn {
    height: 32px;
    padding: 0 12px;
    background: var(--iqiyi-green);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 4px;
}
.mac_pages .page_btn:hover { background: var(--iqiyi-green-dark); }

/* ---------- 底部 ---------- */
.iq-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-sub);
    font-size: 12px;
    margin-top: 40px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}
.iq-footer p { margin-bottom: 8px; }
.iq-footer p:last-child { margin-bottom: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .iq-nav-wrap { gap: 18px; }
    .iq-nav { gap: 14px; font-size: 14px; }
    .iq-search { max-width: 360px; }
}

@media (max-width: 768px) {
    .iq-nav-wrap {
        height: auto;
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    .iq-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        font-size: 14px;
    }
    .iq-nav::-webkit-scrollbar { display: none; }
    .iq-search {
        order: 2;
        max-width: none;
        width: 100%;
        margin-left: 0;
    }
    .iq-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .iq-section-title h2 { font-size: 18px; }
    .iq-detail-box {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    .iq-detail-poster { width: 140px; }
    .iq-detail-info h3 { font-size: 20px; }
    .iq-container { padding: 0 16px; }
    .iq-filter-bar { padding: 12px 14px; gap: 8px; }
    .iq-filter-bar a { padding: 3px 10px; font-size: 13px; }
    .mac_pages .page_link { padding: 5px 10px; font-size: 13px; }
}