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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #333647;
    background-color: #F5F7FA;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 核心容器 - 保持精简，无冗余计算 */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部区域 - 简化过渡，避免不必要的GPU消耗 */
.header {
    background-color: #FFFFFF;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    width: 42px;
    height: 42px;
    background-color: #165DFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: #165DFF;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-slogan {
    font-size: 13px;
    color: #86909C;
    margin-top: 2px;
}

/* 搜索框 - 过渡仅指定变化属性，减少计算量 */
.search-wrapper {
    flex: 1;
    min-width: 280px;
}

.search-container {
    width: 100%;
    position: relative;
}

.search-input {
    width: 100%;
    height: 56px;
    padding: 0 20px 0 52px;
    border: 1px solid #E5E6EB;
    border-radius: 12px;
    font-size: 16px;
    color: #333647;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.search-input:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.search-input::placeholder {
    color: #86909C;
    font-weight: 400;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #86909C;
    font-size: 18px;
}

.search-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: 48px;
    width: 110px;
    background: linear-gradient(135deg, #165DFF 0%, #0F48D9 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, #0F48D9 0%, #0A36A8 100%);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.2);
}

.search-button:active {
    transform: translateY(-50%) scale(0.98);
}

/* 搜索信息区 - 保持原字体优化 */
.search-info {
    margin: 32px 0 20px;
    font-size: 14px;
    color: #333647;
    font-weight: 500;
}

.search-info span {
    color: #165DFF;
    font-weight: 600;
}

/* 筛选区 - 过渡精简，去除冗余动画 */
.filter-section {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.filter-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #333647;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-buttons::-webkit-scrollbar {
    display: none;
}

.filter-button {
    padding: 8px 18px;
    border: 1px solid #E5E6EB;
    background-color: #FFFFFF;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #333647;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .filter-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

.filter-button:hover:not(.active) {
    border-color: #165DFF;
    color: #165DFF;
    background-color: rgba(22, 93, 255, 0.03);
}

.filter-button.active {
    background-color: #165DFF;
    color: #FFFFFF;
    border-color: #165DFF;
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.15);
}

/* 排序下拉框 - 过渡精简 */
.sort-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid #E5E6EB;
    border-radius: 8px;
    background-color: #FFFFFF;
    font-size: 13px;
    color: #333647;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 768px) {
    .sort-select {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .filter-label {
        font-size: 12px;
    }
}

.sort-select:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

/* 结果列表区 - 保持布局精简 */
.results-section {
    flex: 1;
}

.results-list {
    display: grid;
    gap: 18px;
}

/* 资源卡片 - 核心优化：去除上浮特效，精简过渡 */
.resource-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #F0F1F3;
}

.resource-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #E5E6EB;
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.resource-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    margin-right: 16px;
}

.resource-title a {
    color: #333647;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-title a:hover {
    color: #165DFF;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 网盘徽章样式 - 保持原设计 */
.disk-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.disk-badge.baidu { background-color: #37A0FF; color: #FFFFFF; }
.disk-badge.quark { background-color: #722ED1; color: #FFFFFF; }
.disk-badge.xunlei { background-color: #FF4D4F; color: #FFFFFF; }
.disk-badge.uc { background-color: #FF9F1C; color: #FFFFFF; }
.disk-badge.default { background-color: #6B7280; color: #FFFFFF; }

/* 资源描述 - 保持原字体优化 */
.resource-description {
    color: #86909C;
    font-size: 13px;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* 资源元数据 - 保持原字体优化 */
.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 12px;
    color: #86909C;
    border-top: 1px solid #F0F1F3;
    padding-top: 16px;
    margin-bottom: 16px;
}

.resource-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resource-meta-item i {
    font-size: 13px;
}

/* 资源底部 - 核心优化：去除按钮上浮 */
.resource-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.disk-badge-container {
    margin-right: auto;
}

.desktop-disk-badge {
    display: inline-block;
}

.mobile-disk-badge {
    display: none;
}

.view-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #165DFF 0%, #0F48D9 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.15);
    white-space: nowrap;
    margin-left: auto;
}

.view-button:hover {
    background: linear-gradient(135deg, #0F48D9 0%, #0A36A8 100%);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.2);
}

.view-button:active {
    transform: translateY(0);
}

/* 响应式适配 - 保持字体优化，无冗余样式 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .search-wrapper {
        width: 100%;
        min-width: unset;
    }

    .filter-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .resource-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .desktop-disk-badge {
        display: none;
    }

    .mobile-disk-badge {
        display: inline-block;
        font-size: 10px;
        padding: 3px 8px;
    }

    .resource-meta {
        gap: 12px;
        font-size: 11px;
    }

    .resource-description {
        font-size: 12px;
    }

    .view-button {
        padding: 6px 14px;
        font-size: 12px;
    }

    .resource-title {
        font-size: 15px;
    }

    .resource-footer {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
}

/* 电脑端样式调整 - 每条记录高度减少五分之一 */
@media (min-width: 769px) {
    .resource-card {
        padding: 19px; /* 原24px减少五分之一 */
    }
    
    .resource-header {
        margin-bottom: 13px; /* 原16px减少五分之一 */
    }
    
    .resource-description {
        margin-bottom: 16px; /* 原20px减少五分之一 */
    }
    
    .resource-meta {
        padding-top: 13px; /* 原16px减少五分之一 */
        margin-bottom: 13px; /* 原16px减少五分之一 */
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 20px;
    }

    .search-input {
        height: 52px;
        font-size: 15px;
        padding: 0 18px 0 48px;
    }

    .search-button {
        width: 90px;
        height: 44px;
        font-size: 14px;
    }

    .search-info {
        font-size: 13px;
    }

    .filter-section {
        padding: 16px 20px;
    }

    .resource-card {
        padding: 20px;
    }

    .resource-title {
        font-size: 14px;
    }
}

/* 空结果页面 - 核心优化：去除按钮上浮 */
.no-results {
    text-align: center;
    padding: 60px 30px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    margin-top: 24px;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #E5E6EB;
}

.no-results-title {
    font-size: 20px;
    font-weight: 600;
    color: #333647;
    margin-bottom: 12px;
}

.no-results-description {
    color: #86909C;
    font-size: 14px;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-button {
    padding: 12px 32px;
    background: linear-gradient(135deg, #165DFF 0%, #0F48D9 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.15);
}

.no-results-button:hover {
    background: linear-gradient(135deg, #0F48D9 0%, #0A36A8 100%);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.2);
}

/* 分页 - 过渡精简，无上浮特效 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 48px 0 60px;
    flex-wrap: wrap;
}

.pagination-button {
    padding: 10px 16px;
    border: 1px solid #E5E6EB;
    background-color: #FFFFFF;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    color: #333647;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pagination-button:hover:not(:disabled):not(.active) {
    border-color: #165DFF;
    color: #165DFF;
    background-color: rgba(22, 93, 255, 0.03);
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #F5F7FA;
    border-color: #E5E6EB;
    color: #86909C;
}

.pagination-button.active {
    background-color: #165DFF;
    color: #FFFFFF;
    border-color: #165DFF;
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.15);
}

/* 底部 - 保持原字体优化 */
.footer {
    background-color: #FFFFFF;
    border-top: 1px solid #F0F1F3;
    padding: 40px 0 24px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-link {
    color: #86909C;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #165DFF;
}

.copyright {
    color: #86909C;
    font-size: 12px;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #F0F1F3;
}

@keyframes fadeIn {
    from { opacity: 0; } 
    to { opacity: 1; }
}

.resource-card {
    animation: fadeIn 0.3s ease forwards; 
}
