/*-----------------------------------------
  仿 ddys.forum 风格 · 苹果CMS (AppleCMS) 样式表
  版本: 1.1 | 更新: 2026-05-18
-----------------------------------------*/

/* ================= 全局变量与重置 ================= */
:root {
    --primary-color: #e21216;      /* ddys 标志红 */
    --secondary-color: #2c3e50;    /* 深色背景 */
    --text-color: #212529;
    --text-muted: #6c757d;
    --bg-gray: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --container-width: 1400px;
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-gray);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}
a {
    color: var(--text-color);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover {
    color: var(--primary-color);
}
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
ul, ol {
    list-style: none;
}

/* ================= 布局容器 ================= */
.layout, .marg, .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* ================= 头部样式 ================= */
.header {
    background-color: var(--secondary-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header .layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.logo img {
    height: 42px;
}
/* 搜索框优化 */
#searchbar {
    flex: 1;
    max-width: 480px;
}
.ui-search {
    background: white;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
}
.search-input {
    flex: 1;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    background: transparent;
}
.search-input:focus {
    outline: none;
}
.search-button {
    background: transparent;
    border: none;
    padding: 0 20px;
    font-weight: 500;
    color: var(--secondary-color);
    cursor: pointer;
    transition: color .2s;
}
.search-button:hover {
    color: var(--primary-color);
}
/* 右侧图标 */
#qire-plus {
    display: flex;
    gap: 18px;
    margin: 0;
}
#qire-plus li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #adb5bd;
}
#qire-plus .ui-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
}

/* ================= 导航栏 (菜单) ================= */
#navbar {
    background-color: var(--secondary-color);
    border-top: 1px solid rgba(255,255,255,.08);
}
#navbar .layout {
    display: flex;
    justify-content: space-between;
}
.ui-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nav-link {
    display: inline-block;
    padding: 10px 18px;
    color: #e9ecef;
    font-weight: 500;
    border-radius: var(--radius-sm);
}
.nav-link:hover,
.nav-item.current .nav-link {
    background-color: var(--primary-color);
    color: white;
}

/* ================= 首页热门筛选标签 ================= */
.latest-tab-nav {
    background: white;
    border-radius: var(--radius-md);
    display: inline-flex;
    padding: 4px;
    margin: 30px 0 20px;
    box-shadow: var(--shadow-sm);
}
.latest-tab-nav li {
    padding: 8px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: background .2s;
}
.latest-tab-nav li.current {
    background-color: var(--primary-color);
    color: white;
}

/* ================= 卡片网格布局 ================= */
.img-list, .box_con > ul, .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
    margin: 0 0 30px;
}
.img-list li, .box_con > ul > li, .video-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    box-shadow: var(--shadow-sm);
}
.img-list li:hover, .box_con > ul > li:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
/* 海报图片统一比例 (2:3) */
.img-list li a img, .box_con > ul > li a img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #f1f3f5;
}
/* 卡片文字内容 */
.img-list li a h2, .box_con > ul > li a h2 {
    padding: 12px 12px 4px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.img-list li a p, .box_con > ul > li a p {
    padding: 0 12px 12px;
    font-size: 12px;
    color: var(--text-muted);
}
.img-list li a i, .box_con > ul > li a i {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    color: #fbbf24;
}

/* ================= 视频详情页 ================= */
.detail-cols {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}
.detail-pic img {
    width: 280px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.detail-info {
    flex: 1;
}
.detail-title h1 {
    font-size: 26px;
    margin-bottom: 12px;
}
.info dl {
    display: flex;
    margin-bottom: 10px;
}
.info dt {
    width: 80px;
    font-weight: 600;
    color: var(--text-muted);
}
.info dd {
    flex: 1;
}
.video_list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.video_list a {
    background: #f1f3f5;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
}
.video_list a:hover,
.video_list a.cur {
    background: var(--primary-color);
    color: white;
}

/* ================= 分页样式 ================= */
.mac_pages, .member-page {
    text-align: center;
    margin: 40px 0;
}
.page_link, .member-page a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}
.page_link:hover, .member-page a:hover,
.page_current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ================= 底部 Footer ================= */
.footer {
    background: var(--secondary-color);
    color: #adb5bd;
    padding: 40px 0 20px;
    margin-top: 50px;
    font-size: 13px;
}
.foot-nav {
    text-align: center;
    margin-bottom: 15px;
}
.foot-nav a {
    color: #ced4da;
    margin: 0 12px;
}
.copyright {
    text-align: center;
}

/* ================= 响应式 (移动端适配) ================= */
@media (max-width: 768px) {
    .img-list, .box_con > ul {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    .detail-cols {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .info dl {
        justify-content: center;
    }
    .detail-pic img {
        width: 220px;
    }
    .latest-tab-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .header .layout {
        flex-direction: column;
        text-align: center;
    }
}
@media (min-width: 1400px) {
    .layout, .container {
        max-width: 1600px;
    }
}