/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #e0e0e0; text-decoration: none; transition: all 0.3s ease; }
a:hover { color: #f0a0b0; }
img { max-width: 100%; vertical-align: middle; }

/* ===== 容器 ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== 头部 ===== */
.header {
    background: linear-gradient(135deg, #141414, #1f1a1e);
    border-bottom: 2px solid #f0a0b0;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    position: relative; 
}
.header .container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 顶行布局 */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.logo {
    flex-shrink: 0;
}
.logo a {
    font-size: 24px;
    font-weight: 800;
    color: #f0a0b0;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(240,160,176,0.2);
}
.logo a:hover { color: #ffc0d0; }

/* 搜索框 */
.search-form {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 400px;
    min-width: 120px;
}
.search-form input[type="text"] {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #444;
    border-radius: 20px 0 0 20px;
    background: #1a1a1a;
    color: #e0e0e0;
    outline: none;
    font-size: 14px;
}
.search-form input[type="text"]:focus { border-color: #f0a0b0; }
.search-form button {
    padding: 6px 16px;
    border: none;
    border-radius: 0 20px 20px 0;
    background: #f0a0b0;
    color: #1a1a1a;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.search-form button:hover { background: #ffc0d0; }

/* 汉堡菜单按钮（默认隐藏，手机端显示） */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin-left: 8px;
}
.menu-toggle span {
    display: block;
    height: 2px;
    background: #f0a0b0;
    border-radius: 2px;
    transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* 导航菜单（桌面端） */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid transparent;
}
.nav a {
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding-bottom: 3px;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #f0a0b0;
    transition: width 0.3s;
}
.nav a:hover::after,
.nav a.active::after { width: 100%; }

/* ===== 轮播 ===== */
.slide-box {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.slide-box img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* ===== 模块标题 ===== */
.section-title {
    font-size: 22px;
    margin: 30px 0 16px;
    padding-left: 14px;
    border-left: 4px solid #f0a0b0;
    color: #f0a0b0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.section-title .more {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}
.section-title .more:hover { color: #f0a0b0; }

/* ===== 视频网格 ===== */
.vod-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.vod-item {
    background: #161616;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.vod-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(240,160,176,0.15);
}
.vod-item .poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
}
.vod-item .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.vod-item:hover .poster img { transform: scale(1.06); }
.vod-item .poster .score {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #f0a0b0;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}
.vod-item .poster .remarks {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(240,160,176,0.9);
    color: #1a1a1a;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.vod-item .info {
    padding: 12px 14px 14px;
}
.vod-item .info .title {
    font-size: 15px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vod-item .info .title:hover { color: #f0a0b0; }
.vod-item .info .actor {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 统计 ===== */
.site-stats {
    text-align: center;
    padding: 18px;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #2a2a2a;
    margin-top: 10px;
}
.site-stats strong { color: #f0a0b0; }

/* ===== 底部 ===== */
.footer {
    background: #111;
    border-top: 1px solid #2a2a2a;
    padding: 30px 0 20px;
    margin-top: 40px;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: #888;
    font-size: 14px;
}
.footer-links a:hover { color: #f0a0b0; }
.footer-copy {
    color: #666;
    font-size: 13px;
}
.footer-friend {
    color: #666;
    font-size: 13px;
}
.footer-friend a {
    color: #888;
    margin: 0 6px;
}
.footer-friend a:hover { color: #f0a0b0; }

/* ===== 筛选栏 ===== */
.filter-bar {
    background: #161616;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
}
.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}
.filter-label {
    color: #888;
    font-size: 14px;
}
.filter-bar a {
    color: #aaa;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}
.filter-bar a:hover,
.filter-bar a.active {
    color: #f0a0b0;
    background: rgba(240,160,176,0.1);
}
.filter-bar a.active {
    background: #f0a0b0;
    color: #1a1a1a;
}

/* ===== 子分类（桌面端：横排 flex） ===== */
.sub-category {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #2a2a2a;
}
.sub-category a {
    color: #aaa;
    font-size: 14px;
    padding: 3px 0;
    border-bottom: 2px solid transparent;
}
.sub-category a:hover,
.sub-category a.active {
    color: #f0a0b0;
    border-bottom-color: #f0a0b0;
}

/* ===== 分页 ===== */
.mac_pages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #161616;
    border-radius: 10px;
    margin: 20px 0;
    gap: 10px;
}
.page_tip { color: #888; font-size: 14px; }
.page_info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.page_info a,
.page_info span {
    display: inline-block;
    padding: 4px 12px;
    background: #252525;
    border-radius: 4px;
    color: #aaa;
    font-size: 14px;
}
.page_info a:hover,
.page_info .current {
    background: #f0a0b0;
    color: #1a1a1a;
}

/* ===== 详情页 ===== */
.detail-box {
    background: #161616;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.detail-box .poster {
    flex: 0 0 220px;
}
.detail-box .poster img {
    width: 100%;
    border-radius: 10px;
}
.detail-box .detail-info { flex: 1; }
.detail-box .detail-info h1 {
    font-size: 26px;
    color: #f0a0b0;
    margin-bottom: 12px;
}
.detail-box .detail-info p {
    color: #aaa;
    margin-bottom: 6px;
    font-size: 15px;
}
.detail-box .detail-info .play-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 36px;
    background: linear-gradient(135deg, #f0a0b0, #e88090);
    color: #1a1a1a;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(240,160,176,0.3);
}
.detail-box .detail-info .play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(240,160,176,0.5);
}
.detail-box .detail-info .play-btn.disabled {
    background: #444;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== 播放列表 ===== */
.play-list { margin-bottom: 30px; }
.play-group {
    background: #161616;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
.play-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.play-group-header h3 { color: #f0a0b0; font-size: 16px; }
.play-tip { color: #888; font-size: 13px; }
.play-urls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.play-urls a {
    padding: 4px 14px;
    background: #252525;
    border-radius: 4px;
    color: #aaa;
    font-size: 13px;
    transition: all 0.3s;
}
.play-urls a:hover,
.play-urls a.active {
    background: #f0a0b0;
    color: #1a1a1a;
}
.play-urls a.active { font-weight: 700; }

/* ===== 播放控制 ===== */
.play-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    margin: 10px 0;
}
.control-btn {
    padding: 8px 24px;
    border-radius: 30px;
    background: #252525;
    color: #e0e0e0;
    font-size: 15px;
    transition: all 0.3s;
}
.control-btn:hover {
    background: #f0a0b0;
    color: #1a1a1a;
}
.control-btn.disabled {
    background: #1a1a1a;
    color: #555;
    cursor: not-allowed;
}
.control-current {
    color: #aaa;
    font-size: 15px;
    padding: 0 10px;
}

/* ===== 播放器 ===== */
.player-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
    aspect-ratio: 16 / 9;
}
.player-wrapper iframe,
.player-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
}
.player-error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: #1a1a1a;
    color: #888;
    font-size: 16px;
}

/* ===== 播放页信息 ===== */
.play-info {
    background: #161616;
    padding: 16px 20px;
    border-radius: 10px;
    margin: 10px 0;
}
.play-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.play-title h1 {
    font-size: 20px;
    color: #f0a0b0;
}
.play-remarks {
    background: rgba(240,160,176,0.15);
    color: #f0a0b0;
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 14px;
}
.play-meta {
    color: #888;
    font-size: 14px;
    margin-top: 6px;
}
.play-meta a { color: #aaa; }
.play-meta a:hover { color: #f0a0b0; }

/* ===== 空结果 ===== */
.empty-result {
    text-align: center;
    padding: 50px 0;
    color: #666;
    font-size: 18px;
}

/* ============================================
   响应式设计 (移动优先)
   ============================================ */

/* 平板及以下 */
@media (max-width: 992px) {
    .container { padding: 0 7px; }
    .search-form { max-width: 300px; }
    .detail-box .poster { flex: 0 0 180px; }
}

/* 手机 */
@media (max-width: 768px) {
    /* 显示汉堡按钮 */
    .menu-toggle {
        display: flex;
    }

    /* 顶行：logo + 搜索 + 按钮 占一行 */
    .header-top {
        gap: 8px;
        flex-wrap: nowrap;
    }
    .logo a {
        font-size: 20px;
    }
    .search-form {
        max-width: none;
        flex: 1;
    }
    .search-form input[type="text"] {
        font-size: 13px;
        padding: 5px 10px;
    }
    .search-form button {
        font-size: 13px;
        padding: 5px 12px;
    }

    /* 导航默认折叠，悬浮显示 */
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #1a1a1a;
        box-shadow: 0 8px 20px rgba(0,0,0,0.6);
        border-radius: 0 0 12px 12px;
        z-index: 999;
        display: none;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px 12px;
        padding: 16px 12px;
        margin: 0;
        border-top: 1px solid #2a2a2a;
        justify-items: center;
        align-items: center;
        max-height: 70vh;
        overflow-y: auto;
    }
    .nav.show {
        display: grid;
    }
    .nav a {
        font-size: 14px;
        padding: 6px 4px;
        white-space: nowrap;
    }

    /* 手机端子分类网格：一排4个，最多4排 */
    .sub-category {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 12px;
        border-bottom: 1px solid #2a2a2a;
        max-height: calc( (1.2em + 16px) * 4 );  /* 限制4行高度 */
        overflow-y: auto;                       /* 超出可滚动 */
    }
    .sub-category a {
        text-align: center;
        font-size: 13px;
        padding: 6px 4px;
        white-space: nowrap;
        border-bottom: 2px solid transparent;
    }
    .sub-category a:hover,
    .sub-category a.active {
        color: #f0a0b0;
        border-bottom-color: #f0a0b0;
    }

    /* 视频网格：手机2列 */
    .vod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .vod-item .info .title { font-size: 14px; }
    .vod-item .info .actor { font-size: 12px; }

    .section-title { font-size: 18px; margin: 20px 0 12px; }

    .slide-box img { max-height: 200px; }

    .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .filter-group { justify-content: center; }

    .detail-box { flex-direction: column; align-items: center; text-align: center; }
    .detail-box .poster { flex: 0 0 auto; max-width: 200px; }
    .detail-box .detail-info h1 { font-size: 22px; }

    .play-control { flex-wrap: wrap; }
    .control-btn { padding: 6px 18px; font-size: 14px; }
    .control-current { font-size: 14px; }

    .mac_pages { flex-direction: column; align-items: center; }
    .page_tip { margin-bottom: 6px; }
    .page_info a, .page_info span { padding: 4px 10px; font-size: 13px; }

    .footer-content { gap: 10px; }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .logo a { font-size: 18px; }
    .search-form input[type="text"] {
        font-size: 12px;
        padding: 4px 4px;
    }
    .search-form button {
        font-size: 12px;
        padding: 4px 10px;
    }
    .nav a {
        font-size: 15px;
    }
    .vod-grid { gap: 8px; }
    .vod-item .info { padding: 8px 10px; }
    .vod-item .info .title { font-size: 13px; }
    .vod-item .poster .score { font-size: 11px; padding: 1px 8px; }
    .vod-item .poster .remarks { font-size: 10px; padding: 1px 8px; }
}