/* 优化后的统一样式 */
:root {
    --primary: #2c7de6;
    --primary-light: #d4e6ff;
    --primary-dark: #0d4a9c;
    --nav-hover: #0d4a9c;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e4e7ed;
    --bg-gray: #f5f7fa;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #f5222d;
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --radius: 8px;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
    text-decoration: none;
}

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

/* 顶部导航栏 */
.topbar-bg {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #666;
    font-size: 13px;
}

/* 主导航 */
.header {
    background-color: #fff;
}

.header-container {
    display: flex;
    flex-direction: column;
    padding: 15px 0 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    height: 50px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 100%;
    width: auto;
}

/* 搜索框样式 */
.search-area {
    flex: 1;
    max-width: 480px;
    margin-left: 20px;
}

.search-box {
    width: 100%;
}

.search-form {
    display: flex;
    position: relative;
    width: 100%;
}

.search-select {
    position: relative;
    background: var(--primary-light);
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    padding: 0 15px;
    height: 48px;
    display: flex;
    align-items: center;
    font-size: 14px;
    min-width: 100px;
    transition: all 0.3s;
    justify-content: center;
}

.search-select:hover {
    background: #d4e5ff;
}

.search-select::after {
    content: "▼";
    font-size: 10px;
    margin-left: 8px;
}

.search-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    display: none;
    z-index: 10;
}

.search-select-options a {
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    text-align: center;
}

.search-select-options a:hover {
    background: var(--primary-light);
}

.search-input {
    flex: 1;
    height: 48px;
    padding: 0 15px;
    border: 2px solid var(--border-color);
    border-left: none;
    border-right: none;
    outline: none;
    font-size: 16px;
    transition: all 0.3s;
}

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

.search-button {
    height: 48px;
    padding: 0 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
}

.search-button:hover {
    background: #1a68cc;
}

.nav-container {
    background-color: var(--primary-light);
    border-radius: var(--radius);
    margin-top: 10px;
}

.navbar {
    display: flex;
    list-style: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

.navbar li {
    padding: 0;
}

.navbar li a {
    font-weight: 500;
    font-size: 16px;
    padding: 15px 18px;
    position: relative;
    display: block;
    color: #1a68cc;
    transition: all 0.3s;
}

.navbar li a:hover {
    color: var(--nav-hover);
    background: rgba(255,255,255,0.2);
}

.navbar li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--nav-hover);
    transition: width 0.3s ease;
}

.navbar li a:hover:after {
    width: 100%;
}

/* 修复SVG图片显示问题 */
.site-thumb img[src$=".svg"],
.recommended-thumb img[src$=".svg"] {
    object-fit: contain !important;
    width: 80% !important;
    height: 80% !important;
}

/* VIP标签样式 */
.vip-label {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1.4;
    position: relative;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.vip-label.vip {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #fff;
    border: 1px solid #e65100;
}

.vip-label.svip {
    background: linear-gradient(135deg, #ffd700, #ff9800);
    color: #fff;
    border: 1px solid #e65100;
    padding-left: 24px;
}

.vip-label.svip:before {
    content: "👑";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}

/* 网站统计区 */
.stats-bar {
    background-color: var(--primary-light);
    padding: 8px 0;
    margin: 15px 0;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-info {
    font-size: 14px;
    color: var(--text-light);
}

.stats-info strong {
    color: var(--primary);
    font-weight: bold;
    padding: 0 3px;
}

.quick-links {
    font-size: 14px;
}

.quick-links a {
    margin-left: 10px;
    color: var(--primary);
    font-weight: 500;
    position: relative;
}

.quick-links a:hover:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary);
}

/* 版块通用样式 */
.section {
    margin: 30px 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--text-color);
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    margin: 0 5px;
}

.breadcrumb a:first-child {
    margin-left: 0;
}

.breadcrumb span {
    margin: 0 5px;
    color: #999;
}

/* 网站目录页特定样式 */
.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.subcategory-item {
    background: var(--bg-gray);
    padding: 8px 15px;
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s;
}

.subcategory-item:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.subcategory-item em {
    color: var(--primary);
    margin-left: 5px;
}

/* 归档页面特定样式 */
.archive-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.archive-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
}

.archive-years {
    margin-bottom: 30px;
}

.archive-year {
    background: var(--bg-gray);
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.archive-months {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.archive-month {
    background: #fff;
    padding: 12px 15px;
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.archive-month:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: rgba(44,125,230,0.3);
}

.archive-month a {
    display: block;
    color: var(--text-light);
    transition: color 0.3s;
}

.archive-month a:hover {
    color: var(--primary);
}

.month-count {
    display: block;
    font-size: 12px;
    color: #fff;
    background: var(--primary);
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 5px;
}

/* 时间范围筛选 */
.time-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.time-filter a {
    padding: 8px 15px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s;
}

.time-filter a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.time-filter a.active {
    background: var(--primary);
    color: #fff;
}

/* 网站列表样式 */
.site-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.site-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.site-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: rgba(44,125,230,0.2);
}

.site-thumb {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.site-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.site-content {
    flex: 1;
}

.site-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.site-name a {
    color: var(--text-color);
    transition: all 0.3s;
}

.site-name a:hover {
    color: var(--primary);
}

.badge-group {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.badge {
    height: 20px;
}

.site-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* 新添加的网站信息样式 */
.site-info {
    display: flex;
    gap: 20px;
}

.site-info-item {
    display: flex;
    align-items: center;
}

.site-info-item .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    fill: var(--text-light);
}

.site-info-label {
    margin-right: 4px;
    color: var(--text-light);
}

.site-info-value {
    font-weight: 500;
    color: var(--primary);
}

.add-fav {
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(44,125,230,0.08);
}

.add-fav:hover {
    background: rgba(44,125,230,0.15);
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
}

.pagination a:hover, 
.pagination a.current, 
.pagination span.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    cursor: pointer;
}

.pagination .prev, 
.pagination .next {
    padding: 0 15px;
}

.pagination .ellipsis {
    border: none;
    background: transparent;
    pointer-events: none;
    min-width: auto;
    padding: 0 5px;
}

.pagination .disabled {
    color: #ccc;
    pointer-events: none;
    background: #f8f8f8;
    border-color: #eee;
}

/* 侧边栏 */
.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary);
    display: flex;
    align-items: center;
}

.sidebar-title svg {
    margin-right: 8px;
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.ranking-item:hover {
    background: rgba(44,125,230,0.03);
}

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

.ranking-item span {
    font-weight: bold;
    width: 25px;
    flex-shrink: 0;
}

.ranking-item a {
    flex: 1;
    font-size: 15px;
    transition: all 0.3s;
}

.ranking-item em {
    color: var(--text-light);
    font-size: 13px;
    margin-left: 10px;
    font-style: normal;
}

.ranking-item a:hover {
    color: var(--primary);
}

.article-list {
    list-style: none;
}

.article-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.3s;
}

.article-item:hover {
    background: rgba(44,125,230,0.03);
}

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

.article-item a {
    display: block;
    font-size: 15px;
    transition: all 0.3s;
    padding-left: 28px;
    position: relative;
    color: #444;
    line-height: 1.6;
}

.article-item a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.article-item a:hover {
    color: var(--primary);
    padding-left: 30px;
}

.recommended-sites {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.recommended-card {
    text-align: center;
    transition: all 0.3s;
    display: block;
    text-decoration: none;
}

.recommended-card:hover {
    transform: translateY(-5px);
}

.recommended-thumb {
    width: 100%;
    height: 90px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.recommended-thumb img {
    max-width: 90%;
    max-height: 90%;
}

.recommended-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

/* 广告位 */
.sidebar-ad {
    margin-bottom: 30px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 16px;
}

.sidebar-ad img {
    max-width: 100%;
    max-height: 100%;
}

/* 双列布局 */
.dual-column {
    display: grid;
    gap: 30px;
}

@media (min-width: 992px) {
    .dual-column {
        grid-template-columns: 3fr 1fr;
    }
}

/* 主内容区域 */
.main-content {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

/* 页脚 */
.footer {
    margin-top: 40px;
    padding: 50px 0 30px;
    background: #fff;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

.footer-menu {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-menu a {
    margin: 0 15px 10px;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.3s;
}

.footer-menu a:hover {
    color: var(--primary);
}

.footer-copyright {
    font-size: 13px;
    margin-top: 15px;
    line-height: 1.6;
}

/* SVG图标 */
.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-right: 8px;
}

.btn-icon {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* 移动端调整 */
@media (max-width: 991px) {
    .topbar {
        display: none;
    }
    
    .header-container {
        padding: 10px 0 0;
    }
    
    .header-top {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 10px;
    }
    
    .logo {
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .search-area {
        margin: 0 0 15px;
        max-width: 100%;
    }
    
    .navbar {
        margin: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar li {
        padding: 0;
        flex: 1 0 auto;
        text-align: center;
    }
    
    .navbar li a {
        padding: 12px 10px;
        font-size: 14px;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-select {
        min-width: 80px;
        padding: 0 5px;
        font-size: 13px;
        height: 40px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-select::after {
        font-size: 8px;
        margin-left: 4px;
    }
    
    .search-input {
        border-left: 2px solid var(--border-color);
        border-right: 2px solid var(--border-color);
        height: 40px;
        font-size: 14px;
    }
    
    .search-button {
        height: 40px;
        padding: 0 15px;
        font-size: 14px;
    }
    
    .search-select-options {
        width: 80px;
        left: 0;
    }
    
    .search-select-options a {
        text-align: center;
        padding: 10px 5px;
        font-size: 13px;
    }
    
    .stats-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quick-links {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
    }
    
    .quick-links a {
        margin: 5px 10px 5px 0;
    }
    
    .dual-column {
        grid-template-columns: 1fr;
    }
    
    /* 移动端隐藏广告位 */
    .sidebar-ad {
        display: none !important;
    }
    
    /* 移动端隐藏网站统计 */
    .stats-bar {
        display: none !important;
    }
    
    .archive-months {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    /* 移动端VIP标签调整 */
    .vip-label {
        margin: 0 0 0 6px !important;
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .vip-label.svip {
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 20px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .time-filter {
        flex-direction: column;
    }
    
    .time-filter a {
        width: 100%;
    }
    
    .subcategory-list {
        flex-direction: column;
    }
    
    .subcategory-item {
        width: 100%;
    }
    
    /* 移动端网站列表优化 */
    .site-item {
        flex-direction: column;
        padding: 15px;
    }
    
    .site-thumb {
        width: 100%;
        height: 160px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .site-name {
        flex-wrap: wrap;
    }
    
    .site-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* 移动端网站信息样式调整 */
    .site-info {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .site-info-item {
        width: 100%;
        justify-content: space-between;
        padding: 4px 0;
        border-bottom: 1px dashed #eee;
    }
    
    .add-fav {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination a, .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
    
    .archive-year {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .archive-month {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .vip-label {
        margin-left: 4px !important;
        padding: 1px 4px;
        font-size: 10px;
    }
    
    .vip-label.svip {
        padding-left: 18px;
    }
    
    .vip-label.svip:before {
        left: 4px;
    }
}