/* --- 基础重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; min-width: 0; position: relative; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    /* 装饰元素 B: 波点背景 */
    background-image: radial-gradient(#e0e0e0 2px, transparent 2px);
    background-size: 24px 24px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; }
img { max-width: 100%; display: block; }
input, button { outline: none; border: none; background: none; }
/* --- 主导航 (补充) --- */
.g-nav {
    background: #fff;
    margin-bottom: 20px;
    /* 保持头部和导航分离，导航也有轻微浮起质感 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
}

.g-nav-in {
    display: flex;
    overflow-x: auto; /* 移动端横向滚动 */
    -webkit-overflow-scrolling: touch;
    padding: 10px 15px;
    /* 隐藏滚动条 */
    scrollbar-width: none; 
}
.g-nav-in::-webkit-scrollbar { display: none; }

.u-nav-item {
    flex: 0 0 auto; /* 防止压缩 */
    font-size: 15px;
    color: #555;
    font-weight: 500;
    padding: 6px 20px;
    border-radius: 20px; /* DNA: 大圆角 */
    transition: all 0.2s;
}

/* 选中状态：主色背景 + 投影 */
.u-nav-item.active {
    background: var(--c-main);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.u-nav-item:hover {
    color: var(--c-main);
}
.u-nav-item.active:hover {
    color: #fff;
}

/* PC端调整：居中显示 */
@media (min-width: 769px) {
    .g-nav { position: relative; top: 0; z-index: 10; } /* PC端不需要吸顶，或者保持吸顶看需求，这里取消吸顶防止遮挡 */
    .g-nav-in { justify-content: center; overflow: visible; }
    .u-nav-item { font-size: 16px; padding: 8px 30px; }
}
/* --- 原子化/缩写命名 (结构DNA-1-C) --- */
/* 主色调 A: 活力橙红 */
:root {
    --c-main: #ff6b6b;
    --c-sub: #ff8e8e;
    --r-lg: 20px; /* 圆角 C: 大圆角 */
    --shadow: 0 10px 25px -5px rgba(255, 107, 107, 0.15), 0 8px 10px -6px rgba(0,0,0,0.05); /* 质感 B: 浮起 */
}

/* 布局容器 */
.g-wrap { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.g-head { background: #fff; padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.g-head-in { display: flex; justify-content: space-between; align-items: center; }

/* 头部元素 */
.u-logo { display: block; height: 40px; }
.u-logo img { height: 100%; width: auto; }

/* 搜索框 */
.m-search { 
    display: flex; align-items: center; 
    background: #f5f5f5; border-radius: 50px; 
    padding: 5px 15px; width: 180px; 
}
.m-search input { width: 100%; font-size: 13px; color: #666; }
.m-search button { color: var(--c-main); font-weight: bold; cursor: pointer; }

/* 模块通用 */
.g-sect { margin-bottom: 30px; }
.m-tit { 
    font-size: 18px; font-weight: 700; color: #000; 
    margin-bottom: 15px; padding-left: 10px; 
    border-left: 5px solid var(--c-main); 
    display: flex; justify-content: space-between; align-items: center;
}
.m-tit a { font-size: 13px; color: #999; font-weight: normal; }

/* 列表容器 (结构DNA-2-B: 纯Div Grid) */
.g-grid-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 卡片样式 (结构DNA-3-A: 上图下文) */
.m-card {
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow); /* 质感 B */
    overflow: hidden;
    transition: transform 0.2s;
}
.m-card:hover { transform: translateY(-5px); }

.m-card figure {
    width: 100%; aspect-ratio: 1/1;
    background: #f9f9f9; padding: 15px;
    display: flex; align-items: center; justify-content: center;
}
.m-card figure img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

.m-card .m-info { padding: 10px; text-align: center; }
.m-card .u-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.m-card .u-size { font-size: 12px; color: #999; margin-bottom: 8px; }
.m-card .u-down-btn {
    display: inline-block; background: var(--c-main); color: #fff;
    font-size: 12px; padding: 4px 12px; border-radius: 20px;
}

/* 首页排行榜专用简略样式 */
.m-rank-home {
    background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow);
    padding: 0 15px;
}
.m-rank-row {
    display: flex; align-items: center; padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}
.m-rank-row:last-child { border-bottom: none; }
.m-rank-row .u-num {
    font-size: 18px; font-weight: bold; color: #ddd; width: 30px; text-align: center; margin-right: 10px;
}
.m-rank-row:nth-child(1) .u-num { color: #f1c40f; }
.m-rank-row:nth-child(2) .u-num { color: #95a5a6; }
.m-rank-row:nth-child(3) .u-num { color: #e67e22; }
.m-rank-row img { width: 40px; height: 40px; border-radius: 8px; margin-right: 10px; }
.m-rank-row .u-t { flex: 1; font-size: 14px; font-weight: 600; }
.m-rank-row .u-b { 
    font-size: 12px; color: var(--c-main); border: 1px solid var(--c-main);
    padding: 2px 10px; border-radius: 20px;
}

/* Swiper */
.swiper-container { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.swiper-slide img { width: 100%; height: auto; object-fit: cover; }

/* =========================================
   【强制】分页美化 (覆盖内联样式)
   Visual DNA: 圆角 + 橙色激活态 + 阴影
   ========================================= */
.tspage {
    background-color: transparent !important; /* 去除灰色背景，融入页面 */
    height: auto !important;
    line-height: normal !important;
    padding: 20px 0 !important;
    text-align: center !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    align-items: center;
}
.tspage .tsp_count {
    display: none; /* 移动端隐藏统计文字，保持界面清爽，PC端可按需显示 */
}
.tspage .tsp_nav {
    float: none !important;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}
/* 覆盖 i 标签 (首页/上一页等文字) */
.tspage i {
    font-style: normal;
    color: #666;
    font-size: 13px;
}
/* 美化链接按钮 */
.tspage a, .tspage b {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px !important;
    border-radius: 8px; /* 大圆角 DNA */
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* 浮起质感 */
    color: #333 !important;
    font-size: 13px;
    text-decoration: none !important;
    transition: all 0.2s;
}
/* 激活状态 */
.tspage b {
    background: var(--c-main) !important;
    color: #fff !important;
    font-weight: bold;
}
/* 悬停状态 */
.tspage a:hover {
    background: #ffecec;
    color: var(--c-main) !important;
    transform: translateY(-2px);
}
/* 更多按钮 */
.tsp_more { display: none !important; /* 隐藏"更多"文字以免布局错乱，或保留并美化 */ }
/* 下拉选框美化 */
.tsp_change {
    height: 32px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    margin-left: 5px;
    outline: none;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .g-grid-box { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .m-search { width: 140px; }
    .m-card figure { padding: 8px; }
    .m-card .m-info { padding: 8px 5px; }
    .m-card .u-name { font-size: 13px; }
}
@media (max-width: 480px) {
    .g-grid-box { grid-template-columns: repeat(3, 1fr); } 
}
@media (min-width: 769px) {
    .g-grid-box { grid-template-columns: repeat(6, 1fr); }
    .m-search { width: 300px; }
    .tspage .tsp_count { display: block; margin-right: 15px; } /* PC端显示统计 */
}