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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    /* 移动端优化 */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 移动端触摸优化 */
a, button, .nav-toggle, .category-item, .resource-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 防止移动端缩放 */
input, textarea, select {
    font-size: 16px;
}

/* 移动端滚动优化 */
.sidebar, .content-area {
    -webkit-overflow-scrolling: touch;
}

/* 移动端按钮优化 */
.nav-toggle, .sidebar-toggle, .resource-btn {
    min-height: 44px;
    min-width: 44px;
}

/* 移动端文本选择优化 */
.nav-toggle, .category-title, .resource-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 导航栏样式 */
#navbar {
    background: white;
    color: #333;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e9ecef;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    padding: 0 20px;
}

.nav-brand a {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-link:hover,
.nav-link.active {
    background: #f8f9fa;
    color: #2c3e50;
    transform: translateY(-1px);
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.theme-toggle svg,
.share-website-btn svg {
    width: 16px;
    height: 16px;
}

/* 移动端导航切换按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 主容器 */
.main-container {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    width: 100%;
    max-width: 100vw;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e9ecef;
    padding: 0;
    position: fixed;
    height: calc(100vh - 60px);
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    transition: width 0.3s ease;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    margin: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-toggle:hover {
    background-color: #e9ecef;
}

.sidebar-content {
    padding: 20px 0;
    transition: all 0.3s ease;
}

.sidebar-content.collapsed {
    display: none;
}

.category-group {
    margin-bottom: 15px;
}

.category-title {
    padding: 12px 20px;
    font-weight: 600;
    color: #495057;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.category-title.collapsible {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title.collapsible:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.category-items {
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-items.collapsed {
    max-height: 0;
    padding: 0;
}

.category-item {
    display: block;
    padding: 10px 20px 10px 40px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.category-item:hover,
.category-item.active {
    background-color: #f8f9fa;
    color: #2c3e50;
    border-left-color: #2c3e50;
}

/* 侧边栏收起状态 */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-content {
    display: none;
}

.sidebar.collapsed + .content-area {
    margin-left: 60px;
}

/* 内容区域 */
.content-area {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    width: calc(100% - 250px);
    max-width: calc(100vw - 250px);
    overflow-x: hidden;
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #00b4db 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hero-btn.primary {
    background: #fff;
    color: #0ea5e9;
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

.hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.4);
}

.hero-btn.secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}

.hero-btn.secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* 快速导航区域样式 */


/* 核心分类区域样式 */
/* 场景导航区域 */
.scenario-nav-section {
    margin-bottom: 50px;
}

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

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.scenario-card {
    background: #fff;
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #2dd4bf);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.scenario-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #0ea5e9;
}

.scenario-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.scenario-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.scenario-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.scenario-tag {
    background: linear-gradient(135deg, #0ea5e9, #2dd4bf);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .scenario-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .scenario-card {
        padding: 25px 20px;
    }
    
    .scenario-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .scenario-card h3 {
        font-size: 1.2rem;
    }
    
    .scenario-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .scenario-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 0 15px;
        margin: 0 -15px;
    }
    
    .scenario-card {
        min-width: 260px;
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .scenario-grid::-webkit-scrollbar {
        display: none;
    }
    
    .scenario-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* 保留原有分类样式以兼容其他页面 */
.core-categories-section {
    margin-bottom: 50px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: #fff;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #2dd4bf);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #0ea5e9;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.category-stats {
    background: linear-gradient(135deg, #0ea5e9, #2dd4bf);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* 欢迎区域 */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.2);
}

.welcome-section h1 {
    font-size: 48px;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 统计数据样式 */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 150px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    color: #fff;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    flex-wrap: wrap;
    position: relative;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    min-width: 200px;
    max-width: 100%;
}

#searchInput {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

#searchInput:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

#searchBtn {
    padding: 12px 25px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

#searchBtn:hover {
    background: rgba(255,255,255,0.3);
}

/* 搜索建议 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.search-suggestions.show {
    display: block;
}

.search-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 14px;
}

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

.search-suggestion-item:hover,
.search-suggestion-item.highlighted {
    background: #f8f9fa;
    color: #0ea5e9;
}

.search-suggestion-item strong {
    color: #0ea5e9;
    font-weight: 600;
}

.suggestion-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.suggestion-text {
    flex: 1;
}

.suggestion-category {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 8px;
}

/* 资源区域 */
.resources-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    color: #495057;
    font-size: 28px;
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 5px;
}

.view-btn.active,
.view-btn:hover {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* 资源网格布局 - 优化间距和响应式 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 资源卡片 - 参考jitomz.top简洁设计 */
.resource-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.06);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.1);
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9 0%, #2dd4bf 100%);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-card:hover::before {
    opacity: 1;
}

.resource-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.resource-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    transition: all 0.3s ease;
}

.resource-card:hover .resource-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.resource-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.resource-category {
    font-size: 11px;
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.resource-description {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.resource-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resource-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.btn-outline:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: #0ea5e9;
    transform: translateY(-1px);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* 页脚 */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

/* 热门关键词标签样式 */
.footer-section a[style*="background: #f0f0f0"] {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    transition: all 0.3s;
    display: inline-block;
}

.footer-section a[style*="background: #f0f0f0"]:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #495057;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: #2c3e50;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.8);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #34495e;
    transform: translateY(-2px);
}

/* 响应式设计 */
/* 大屏幕 (1200px+) */
@media (min-width: 1200px) {
    .nav-container {
        max-width: 1400px;
    }
    
    .content-area {
        max-width: calc(100% - 250px);
        padding: 40px;
    }
    
    .welcome-section {
        padding: 60px 40px;
    }
    
    .welcome-section h1 {
        font-size: 56px;
    }
    
    .subtitle {
        font-size: 20px;
    }
    
    .stats-container {
        gap: 60px;
    }
    
    .stat-item {
        min-width: 180px;
        padding: 25px;
    }
    
    .resources-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .resource-card {
        padding: 30px;
    }
}

/* 中等屏幕 (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .sidebar {
        width: 220px;
    }
    
    .content-area {
        margin-left: 220px;
        padding: 25px;
        width: calc(100% - 220px);
        max-width: calc(100vw - 220px);
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .welcome-section h1 {
        font-size: 44px;
    }
    
    .stats-container {
        gap: 30px;
        flex-wrap: wrap;
    }
}

/* 平板横屏 (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .content-area {
        margin-left: 200px;
        padding: 25px;
        width: calc(100% - 200px);
        max-width: calc(100vw - 200px);
    }
    
    .welcome-section {
        padding: 40px 25px;
    }
    
    .welcome-section h1 {
        font-size: 36px;
    }
    
    .nav-brand a {
        font-size: 22px;
    }
    
    .stats-container {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }
    
    .resource-card {
        padding: 20px;
    }
    
    .stat-item {
        min-width: 130px;
        padding: 15px;
        flex: 1;
    }
}

/* 平板竖屏和大屏手机 (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .main-container {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .content-area {
        margin-left: 0;
        padding: 20px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* 英雄区域移动端适配 */
    .hero-section {
        padding: 50px 20px;
        margin-bottom: 30px;
        border-radius: 15px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .hero-stat {
        justify-content: center;
        padding: 10px 15px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    

    /* 核心分类移动端适配 */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .category-card {
        padding: 25px 20px;
    }
    
    .category-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    .welcome-section {
        padding: 30px 20px;
    }
    
    .welcome-section h1 {
        font-size: 32px;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .resource-card {
        padding: 18px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    #searchInput {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    #searchBtn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-top: 1px solid #e9ecef;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu .nav-link {
        padding: 15px 0;
        text-align: center;
        border-bottom: 1px solid #e9ecef;
        color: #333;
    }
    
    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }
    
    .theme-toggle {
        margin: 10px 0;
        width: 80%;
        justify-content: center;
    }
    
    .bookmark-btn {
        margin: 10px 0;
        width: 80%;
        justify-content: center;
    }
    
    .nav-container {
        padding: 0 20px;
        position: relative;
        height: 60px;
    }
    
    .nav-brand a {
        font-size: 20px;
    }
    
    .stats-container {
        gap: 15px;
        justify-content: space-around;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 15px 10px;
    }
    
    .resource-actions {
        justify-content: center;
    }
}

/* 小屏手机 (最大575px) */
@media (max-width: 575px) {
    .main-container {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .content-area {
        margin-left: 0;
        padding: 15px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .welcome-section {
        padding: 25px 15px;
    }
    
    .welcome-section h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
    }
    
    .resource-card {
        padding: 18px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
        margin: 20px 0;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    #searchInput {
        font-size: 16px;
        padding: 14px 18px;
        border-radius: 20px;
    }
    
    #searchBtn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-top: 1px solid #e9ecef;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu .nav-link {
        padding: 12px 0;
        text-align: center;
        border-bottom: 1px solid #e9ecef;
        color: #333;
    }
    
    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-container {
        padding: 0 15px;
        position: relative;
        height: 55px;
    }
    
    .nav-brand a {
        font-size: 18px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .stat-item {
        min-width: 200px;
        padding: 15px;
    }
    
    .resource-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .resource-icon {
        margin: 0 auto 10px;
    }
    
    .resource-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .resource-btn {
        justify-content: center;
        width: 100%;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* 超小屏幕 (最大375px) */
@media (max-width: 375px) {
    html {
        font-size: 14px;
    }
    
    .nav-container {
        height: 50px;
        padding: 0 10px;
    }
    
    .nav-brand a {
        font-size: 16px;
    }
    
    .content-area {
        padding: 10px;
        width: 100%;
        max-width: 100vw;
    }
    
    .welcome-section {
        padding: 20px 10px;
        margin: 0 -5px 20px;
    }
    
    .welcome-section h1 {
        font-size: 24px;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .resource-card {
        padding: 15px;
        margin: 0;
    }
    
    .resource-title {
        font-size: 18px;
        line-height: 1.3;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 12px;
        flex: 1;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    #searchInput {
        padding: 12px 15px;
        font-size: 16px;
        min-width: 180px;
    }
    
    #searchBtn {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px;
    }
    
    .resource-btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .stats-container {
        gap: 10px;
        margin: 20px 0;
    }
    
    .theme-card {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    .theme-card h3 {
        font-size: 16px;
    }
    
    .scenario-card {
        padding: 12px;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .share-option {
        padding: 12px;
    }
    
    .bookmark-btn,
    .share-btn,
    .theme-toggle {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .theme-header {
        padding: 20px;
    }
    
    .theme-header h2 {
        font-size: 24px;
    }
    
    .theme-resources {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 18px;
    color: #6c757d;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主题卡片样式 */
.theme-card {
    background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.theme-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.theme-card p {
    margin: 0 0 15px 0;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.5;
}

.theme-card .theme-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.8;
}

.theme-card .theme-tools {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
}

/* 场景卡片样式 */
.scenario-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scenario-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.scenario-card h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.scenario-card p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.scenario-card .scenario-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scenario-card .scenario-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 分享按钮样式 */
.share-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.share-btn svg {
    width: 14px;
    height: 14px;
}

/* 书签按钮样式 */
.bookmark-btn {
    background: linear-gradient(45deg, #feca57, #ff9ff3);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bookmark-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 202, 87, 0.3);
}

.bookmark-resource-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bookmark-resource-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 分享模态框样式 */
.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.share-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.share-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.share-modal-close:hover {
    background-color: #f8f9fa;
}

.share-modal-body {
    text-align: left;
}

.share-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-resource-preview,
.share-theme-preview {
    width: 100%;
}

.resource-preview-header,
.theme-preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.resource-preview-icon,
.theme-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #007bff;
    color: white;
    flex-shrink: 0;
}

.resource-preview-info,
.theme-preview-info {
    flex: 1;
    min-width: 0;
}

.resource-preview-info h4,
.theme-preview-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-preview-info p,
.theme-preview-info p {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-preview-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.theme-preview-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.preview-tag {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.share-options h4,
.share-card-options h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.share-buttons .share-btn {
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
}

.card-templates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.template-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #333;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.template-btn:hover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: translateY(-2px);
}

.template-btn:active {
    transform: translateY(0);
}

.template-btn.selected {
    background: #007bff;
    color: white;
    border-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.template-btn.selected:hover {
    background: #0056b3;
    border-color: #004085;
    transform: translateY(-2px);
}

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.share-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.share-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.share-option-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.share-option-text {
    font-size: 14px;
    font-weight: 500;
}

/* 主题切换按钮 */
.theme-toggle {
    background: linear-gradient(45deg, #0ea5e9, #2dd4bf);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 主题视图样式 */
 .theme-view {
     margin-top: 20px;
 }
 
 .theme-section {
     margin-bottom: 40px;
 }
 
 .theme-section h3 {
     color: #333;
     font-size: 20px;
     margin-bottom: 20px;
     padding-bottom: 10px;
     border-bottom: 2px solid #e9ecef;
 }
 
 .theme-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
     gap: 20px;
     margin-bottom: 30px;
 }
 
 .scenario-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
     gap: 15px;
 }

.theme-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.theme-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.theme-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    line-height: 1.5;
}

.theme-resources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 24px;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.6;
}

/* 场景卡片样式 */
.scenario-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.scenario-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.scenario-header h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.scenario-header p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.scenario-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.scenario-theme {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid currentColor;
}

.scenario-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scenario-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* 导航栏移动端响应式样式 */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        margin: 10px 0;
        font-size: 18px;
        padding: 15px 30px;
        width: 80%;
        text-align: center;
        border-radius: 10px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-brand a {
        font-size: 20px;
    }
}