/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    margin: 0 auto;
    padding: 0 20px;
}

/* 统一所有页面的主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 统一页面头部容器 */
.page-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: visible;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.85;
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.2;
    align-self: flex-end;
    margin-bottom: 0.2rem;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav {
    position: relative;
    z-index: 1001;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::after {
    width: 60%;
}

/* 下拉菜单 */
.nav > ul > li.dropdown {
    position: relative;
}

.nav > ul > li.dropdown > a.dropdown-toggle::after {
    content: ' ▼' !important;
    font-size: 0.6em !important;
    margin-left: 2px !important;
    display: inline !important;
    vertical-align: middle !important;
    position: static !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    left: auto !important;
    bottom: auto !important;
}

.nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 8px;
    background: white;
    min-width: 110px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding-bottom: 4px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: none !important;
}

.nav > ul > li.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block !important;
}

.nav .dropdown-menu li {
    margin: 0;
    padding: 0;
    display: block !important;
    width: 100%;
}

.nav .dropdown-menu a {
    display: block !important;
    color: #2c3e50;
    padding: 8px 16px;
    white-space: nowrap;
    border-radius: 0;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

.nav .dropdown-menu a:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: none;
}

.nav .dropdown-menu a::after {
    display: none;
}

/* 主要内容区域 */
.main {
    min-height: calc(100vh - 140px);
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 2rem;
}

/* 首页全屏样式 - 通过存在.hero元素来识别首页 */
.hero ~ .content-wrapper {
    max-width: none;
    padding: 0 2rem;
}

.hero ~ .content-wrapper .tools-sections .container {
    max-width: none;
    padding: 0;
}

/* 确保首页的侧边栏在全屏模式下仍然保持合适的宽度 */
.hero ~ .content-wrapper .sidebar-nav {
    width: 250px;
    flex-shrink: 0;
}

.hero ~ .content-wrapper .tools-sections {
    flex: 1;
    min-width: 0;
}

/* 左侧固定导航 */
.sidebar-nav {
    position: sticky;
    top: 20px;
    width: 250px;
    height: fit-content;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    flex-shrink: 0;
}

.nav-container {
    position: relative;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
    text-align: center;
}

.category-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-nav li {
    margin-bottom: 0.5rem;
}

.category-nav a {
    display: block;
    padding: 0.8rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.category-nav a:hover {
    background: #f8f9fa;
    color: #333;
    transform: translateX(5px);
}

.category-nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 右侧主要内容区域 */
.tools-sections {
    flex: 1;
    min-width: 0;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 0rem;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.85;
    line-height: 1.5;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 特色栏目区域 */
.featured-sections {
    padding: 0;
    background: #f8f9fa;
}

.featured-sections .container {
    max-width: none;
    margin: 0;
    padding: 0 2rem;
}

.featured-section {
    margin-bottom: 3rem;
}

.featured-section:last-child {
    margin-bottom: 0;
}

.featured-header {
    margin: 0 0 1rem 0;
    padding: 0 2rem 1rem 2rem;
    border-bottom: 2px solid #e9ecef;
}

/* 最近更新特殊布局 - 标题和项目在同一行 */
#recentUpdatesSection .featured-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    border-bottom: none;
    padding: 0 2rem 0.5rem 2rem;
}

#recentUpdatesSection .featured-title {
    margin: 0;
    flex-shrink: 0;
    width: 140px;
}

.featured-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.title-icon {
    font-size: 1.8rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 0;
}

/* 最近更新栏目样式 - 与标题同行显示 */
#recentUpdatesGrid {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    padding: 0;
}

/* 最近更新栏目容器布局 */
#recentUpdatesSection {
    margin-bottom: 1rem;
}

#recentUpdatesSection .featured-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding: 1rem 2rem;
    justify-content: flex-start;
}

/* 本周推荐特殊布局 - 标题和项目在同一行 */
/* 本周推荐栏目容器布局 */
#weeklyRecommendationsSection {
    margin-bottom: 0rem;
}

#weeklyRecommendationsSection .featured-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 2rem;
    justify-content: flex-start;
}

#weeklyRecommendationsSection .featured-title {
    margin: 0;
    flex-shrink: 0;
    width: 140px;
}

/* 本周推荐栏目样式 - 与标题同行显示 */
#weeklyRecommendationsGrid {
    display: flex;
    justify-content: flex-start;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    padding: 0;
}

.featured-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.featured-card:hover::before {
    transform: scaleX(1);
}

.featured-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0rem;
}

.featured-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #f8f9fa;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.featured-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    align-self: flex-start;
    margin-top: auto;
}

/* 加载和错误状态样式 */
.loading-placeholder,
.error-placeholder,
.empty-placeholder {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    grid-column: 1 / -1;
}

.error-placeholder {
    color: #dc3545;
    border-color: #f5c6cb;
    background: #f8d7da;
}

.empty-placeholder {
    color: #6c757d;
    border-color: #ced4da;
}

/* 最近更新网站卡片样式 - 弱化版本 */
.new-site-card {
    border-radius: 8px;
    padding: 0.3rem 0;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(233, 236, 239, 0.6);
    text-align: center;
    width: 100px; /* 桌面端固定宽度 */
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.new-site-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(233, 236, 239, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.new-site-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
}

.new-site-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #f8f9fa;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.new-site-name {
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    text-align: center;
    word-wrap: break-word;
}

/* 本周推荐网站卡片样式 */
.hot-site-card {
    background: white;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
    width: 220px; /* 减小基础宽度以显示更多项目 */
    flex-shrink: 0;
}

.hot-site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.hot-site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hot-site-card:hover::before {
    transform: scaleX(1);
}

.hot-site-card {
    position: relative;
    overflow: hidden;
}

.hot-site-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hot-site-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.hot-site-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #f8f9fa;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}


.hot-site-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-site-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0;
    word-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em; /* 固定2行高度 (1.3 * 2 = 2.6em) */
    min-height: 2.6em;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #007bff;
}

.search-box button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background: #0056b3;
}

/* 分类区域 */
.categories {
    padding: 4rem 0;
    background: white;
}

.categories h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.category-card p {
    color: #666;
    margin-bottom: 1rem;
}

.category-count {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
}

/* 工具区域 */
.tools {
    padding: 4rem 0;
    background: #f8f9fa;
}

.tools h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 1rem;
    object-fit: cover;
}

.tool-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.tool-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.tool-link {
    display: inline-block;
    background: #667eea;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    transition: background 0.3s;
}

.tool-link:hover {
    background: #5a6fd8;
}

/* 底部样式 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}
.footer a {
    color: #a1a1a1;
    text-decoration: none;
}

/* 响应式设计 */
/* 工具分类区域样式 */
.tools-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 2rem; 
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-buttons-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 15px;
}

.more-links-container {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.more-link:hover {
    color: #5a6fd8;
    background: #f8f9fa;
    text-decoration: underline;
}

.filter-button {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-button:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.filter-button.active:hover {
    background: #5a6fd8;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    cursor: pointer;
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.tool-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tool-tag {
    padding: 4px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 12px;
    font-size: 0.8rem;
}



.free-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端主容器padding为0 */
    .main-container {
        padding: 0;
    }

    /* 特色栏目响应式 */
    .featured-sections {
        padding: 0rem 0;
    }

    .featured-sections .container {
        padding: 0 15px;
    }

    .featured-section {
        margin-bottom: 2rem;
    }

    .featured-header {
        margin-bottom: 1.5rem;
        padding: 0 15px 1rem 15px;
    }

    /* 隐藏最近更新区域 */
    #recentUpdatesSection {
        display: none;
    }

    /* 移动端本周推荐布局 */
    #weeklyRecommendationsSection .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem 15px;
    }

    #weeklyRecommendationsSection .featured-grid {
        width: 100%;
        padding: 0.3rem 0;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .title-icon {
        font-size: 1.5rem;
    }

    /* 移动端特色栏目样式 */
    #recentUpdatesGrid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.8rem;
    }

    #weeklyRecommendationsGrid {
        padding: 0.3rem 15px;
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
        gap: 1rem;
    }

    /* 隐藏本周推荐中的描述 */
    .hot-site-description {
        display: none;
    }

    .featured-card {
        padding: 1.2rem;
    }

    .featured-header {
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .featured-logo {
        width: 32px;
        height: 32px;
        padding: 3px;
    }

    .featured-title {
        font-size: 1rem;
    }

    .featured-description {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
        -webkit-line-clamp: 2;
    }

    /* 移动端新卡片样式 */
    .new-site-card {
        padding: 0.5rem;
        width: 80px; /* 移动端固定宽度 */
    }

    .new-site-logo {
        width: 28px;
        height: 28px;
        padding: 3px;
    }

    .new-site-name {
        font-size: 0.7rem;
    }

    .hot-site-card {
        padding: 0;
        width: 108px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 1px solid #e1e4e8;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .hot-site-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15), transparent);
        transition: left 0.5s ease;
    }

    .hot-site-card:hover::before {
        left: 100%;
    }

    .hot-site-card:hover {
        background: linear-gradient(135deg, #ffffff 0%, #fff9e6 100%);
        border-color: #ffc107;
        box-shadow: 0 4px 16px rgba(255, 193, 7, 0.25);
        transform: translateY(-2px) scale(1.02);
    }

    .hot-site-content {
        padding: 8px;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: relative;
        z-index: 1;
    }

    .hot-site-logo {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        margin-bottom: 6px;
        object-fit: cover;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }

    .hot-site-card:hover .hot-site-logo {
        transform: scale(1.1) rotate(2deg);
    }

    .hot-site-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
        margin-bottom: 0;
    }

    .hot-site-title {
        font-size: 0.65rem;
        font-weight: 600;
        color: #2c3e50;
        line-height: 1.2;
        margin: 0;
        letter-spacing: 0.01em;
        text-shadow: 0 1px 2px rgba(255,255,255,0.5);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    
    .hot-site-description {
        font-size: 0.8rem;
        line-height: 1.3;
        height: 2.6em; /* 移动端2行高度 (1.3 * 2 = 2.6em) */
        min-height: 2.6em;
    }

    .content-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 0 15px;
    }
    
    .sidebar-nav {
        position: static;
        width: 100%;
        order: 2;
    }
    
    .tools-sections {
        order: 1;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-buttons-container {
        gap: 8px;
        row-gap: 12px;
        justify-content: flex-start;
    }
    
    .more-links-container {
        margin-left: 0;
    }
    
    .filter-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .filter-buttons {
        margin-bottom: 1rem;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .tools-section {
        margin-bottom: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tool-card {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 0;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-left {
        flex-direction: row;
        gap: 1rem;
        text-align: left;
        align-items: center;
    }

    .logo {
        font-size: 1.8rem;
        line-height: 1;
    }

    .header-title {
        font-size: 1rem;
        margin: 0;
        opacity: 0.9;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
        line-height: 1.2;
    }

    /* 超小屏幕进一步优化 */
    @media (max-width: 480px) {
        .header-left {
            gap: 0.75rem;
        }

        .header-title {
            font-size: 0.9rem;
            max-width: 150px;
        }

        .logo {
            font-size: 1.6rem;
        }
    }

    /* 极小屏幕隐藏副标题 */
    @media (max-width: 380px) {
        .header-title {
            display: none;
        }
    }
    
    .nav ul {
        gap: 1.5rem;
    }
    
    .nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* 移动端下拉菜单 */
    .nav .dropdown-menu {
        min-width: 140px;
        font-size: 0.9rem;
    }

    .nav .dropdown-menu a {
        padding: 8px 16px;
    }

    .nav ul {
        gap: 1rem;
    }
    
    .search-box {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        max-width: none;
        margin: 0 0 1rem 0;
    }

    .search-box input {
        flex: 1;
        min-width: 0;
        font-size: 16px; /* 防止iOS缩放 */
    }

    .search-box button {
        flex-shrink: 0;
        padding: 12px 20px;
        font-size: 14px;
    }

    .hero p {
        font-size: 0.85rem;
    }

  .hero {
        padding: 1rem 0;
    }

    /* 超小屏幕优化 */
    @media (max-width: 480px) {
        .search-box {
            gap: 6px;
        }

        .search-box input {
            padding: 10px 12px;
            font-size: 16px;
        }

        .search-box button {
            padding: 10px 16px;
            font-size: 13px;
        }

        /* 超小屏幕统一网站卡片宽度 */
        .featured-grid {
            grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
            gap: 0.8rem;
        }

        #recentUpdatesGrid {
            grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
        }
    }
    
    .category-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .category-tags {
        gap: 6px;
    }

    /* 隐藏more链接 */
    .more-link {
        display: none !important;
    }
    
    .category-tag {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    /* 首页全屏样式的移动端适配 */
    .hero ~ .content-wrapper {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero ~ .content-wrapper .sidebar-nav {
        width: 100%;
        position: static;
        order: 2;
    }
    
    .hero ~ .content-wrapper .tools-sections {
        order: 1;
    }
    
    /* 移动端分类和标签优化 */
    .result-categories,
    .result-tags {
        padding: 10px 10px;
        gap: 6px;
    }
    
    .result-category {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .result-tag {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* 统一的分类和标签样式 - 适用于所有页面 */
.result-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
    margin-top: auto;
    /* CSS省略号处理 - 限制最多显示2行 */
    max-height: 40px;
    overflow: hidden;
    line-height: 1.2;
    align-items: flex-start;
}

.result-category { 
    display: inline-block; 
    background: #e9ecef; 
    color: #666; 
    padding: 4px 12px; 
    border-radius: 6px; 
    font-size: 12px; 
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.result-category:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* 标签样式 */
.result-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.result-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f0;
    color: #666;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
    white-space: nowrap;
    flex-shrink: 0;
}

.result-tag:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
    transform: translateY(-1px);
} 