/* ========================================
   虫虫下载站 - 新版主题样式
   创建日期：2025-10-17
   ======================================== */

/* CSS变量定义 */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --hot: #FF4757;
    --new: #FFA502;
    --vip: #F39C12;
    --success: #27AE60;
    --dark: #2C3E50;
    --dark-light: #34495E;
    --light: #ECF0F1;
    --light-bg: #F8F9FA;
    --gray: #7F8C8D;
    --gray-light: #BDC3C7;
    --white: #FFFFFF;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
    line-height: 1.65;
    color: var(--dark);
    background: var(--light-bg);
    min-height: 100vh;
    font-size: 14px;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航
   ======================================== */

.header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.top-bar {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 10px 0;
    font-size: 12px;
    color: #fff;
}

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

.top-bar a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.top-bar a:hover {
    color: var(--vip);
}

/* Logo区域 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.logo-slogan {
    font-size: 12px;
    color: var(--gray);
    margin-top: -3px;
}

/* 主导航菜单 */
.nav-menu {
    display: flex;
    gap: 0;
    list-style: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 16px 32px;
    display: block;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.15);
    font-size: 15px;
}

.nav-menu li:last-child a {
    border-right: none;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 -3px 0 rgba(255,255,255,0.5);
}

.nav-actions {
    display: flex;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, #2980B9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.35);
    background: linear-gradient(135deg, #2980B9 0%, #2471A3 100%);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.25);
}

/* ========================================
   主内容区
   ======================================== */

.main-content {
    background: #F5F5F5;
    padding: 30px 20px;
    min-height: 60vh;
}

/* 页面标题 */
.page-header {
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-left: 5px solid var(--primary);
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.page-header .breadcrumb {
    font-size: 13px;
    color: var(--gray);
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 资源列表卡片 */
.resource-section {
    background: white;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 3px solid transparent;
    background: linear-gradient(to right, var(--primary), transparent) bottom left / 60px 3px no-repeat;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--vip));
    border-radius: 3px;
}

/* 资源列表 */
.resource-list {
    list-style: none;
}

.resource-item {
    padding: 18px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 10px;
    margin: 0 -10px;
}

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

.resource-item:hover {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFAF0 100%);
    padding-left: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateX(5px);
    border-bottom-color: transparent;
}

.resource-item::before {
    content: '►';
    position: absolute;
    left: 8px;
    top: 18px;
    opacity: 0;
    color: var(--primary);
    font-size: 12px;
    transition: all 0.3s;
}

.resource-item:hover::before {
    left: 12px;
    opacity: 1;
}

.resource-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    line-height: 1.6;
    transition: all 0.3s;
}

.resource-title:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.resource-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--gray);
    flex-wrap: wrap;
}

.resource-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.resource-desc {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.6;
    margin: 10px 0;
    padding-left: 5px;
}

.resource-tags {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 3px 10px;
    background: linear-gradient(135deg, #FFE5E5, #FFF0F0);
    border-radius: 4px;
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid #FFE0E0;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* HOT和NEW徽章 */
.hot-badge {
    background: linear-gradient(135deg, #FF4757, #C0392B);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 8px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
    animation: pulse 2s infinite;
    letter-spacing: 0.5px;
}

.new-badge {
    background: linear-gradient(135deg, #F39C12, #E67E22);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 8px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.85;
        transform: scale(1.05);
    }
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.pagination-wrapper li {
    display: inline-block;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 10px 16px;
    background: white;
    border: 2px solid var(--light);
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 44px;
    text-align: center;
    display: inline-block;
}

.pagination-wrapper a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-wrapper .active a,
.pagination-wrapper .active span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: var(--primary);
}

.pagination-wrapper .disabled a,
.pagination-wrapper .disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-wrapper .disabled a:hover {
    background: white;
    color: var(--dark);
    transform: none;
    box-shadow: none;
}

/* ========================================
   页脚
   ======================================== */

.footer {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: white;
    padding: 50px 20px 30px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 14px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   侧边栏
   ======================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 25px 22px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.sidebar-widget:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.widget-title {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 22px;
    color: var(--dark);
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

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

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.rank-item:hover {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF8F0 100%);
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    background: var(--light);
    color: var(--gray);
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rank-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #FFD700 0%, #F39C12 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.rank-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #E8E8E8 0%, #BDC3C7 100%);
    color: #34495E;
    box-shadow: 0 4px 12px rgba(189, 195, 199, 0.4);
}

.rank-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #CD853F 0%, #8B4513 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(205, 133, 63, 0.4);
}

.rank-title {
    flex: 1;
    font-size: 14px;
    text-decoration: none;
    color: var(--dark);
    line-height: 1.5;
    transition: all 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-title:hover {
    color: var(--primary);
    transform: translateX(3px);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 65% 33%;
        gap: 2%;
    }
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu a {
        padding: 16px 20px;
    }
}

/* 顶部工具栏改进样式 */
.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.top-bar a {
    transition: all 0.3s ease;
}

.top-bar a:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* 登录注册按钮特殊样式 */
#loginButton, #signupButton {
    padding: 5px 15px !important;
    border-radius: 15px;
    background: rgba(255,255,255,0.2);
    display: inline-block;
    transition: all 0.3s ease;
    margin-left: 10px;
}

#loginButton:hover, #signupButton:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none !important;
    transform: translateY(-2px);
}

/* VIP徽章样式 */
.vip-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 模态框居中对齐 */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    margin: auto;
}

/* 模态框动画 */
.modal.fade .modal-dialog {
    transform: translate(0, -50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-bar-container {
        flex-direction: column;
        gap: 10px;
    }
    
    #loginButton, #signupButton {
        margin-left: 5px;
    }
}

