

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 主内容区域 */
.main-container {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-login {
    background: transparent;
    color: #667eea;
    margin-right: 10px;
    text-decoration: none;
}

.btn-login:hover {
    color: #764ba2;
}

.btn-register {
    background: #667eea;
    color: white;
}

.btn-register:hover {
    background: #764ba2;
}

/* 响应式按钮设计 */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 24px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .btn-login,
    .btn-register {
        min-height: 44px;
        min-width: 120px;
    }
}

/* 导航栏样式 */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
    width: 100%;
    position: relative;
}

/* 汉堡菜单样式 */
.hamburger {
    display: none;
    font-size: 1.5rem;
    color: #0066cc;
    cursor: pointer;
    z-index: 1001;
}

/* 响应式导航菜单 */
@media (max-width: 992px) {
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: left 0.3s ease;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 15px 30px;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: #f0f0f5;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066cc;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    flex-shrink: 0;
    min-width: 150px;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
    color: #0066cc;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: auto;
}

.nav-item {
    margin: 0 15px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

.nav-auth {
    display: flex;
    align-items: center;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 30px;
}

.hero .container {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

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

/* 主内容区域 */
.main-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

/* 资源推荐区域 */
.resources {
    flex: 1;
}

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

.section-subtitle {
    font-size: 1rem;
    color: #667eea;
    font-weight: 500;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
}

.resource-card-link {
    display: flex;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.resource-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    height: auto;
}

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

.resource-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

/* 移除了未使用的资源logo特定样式，保留基础样式 */

.resource-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 12px 15px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-section:hover {
    background-color: #f0f0f5;
    color: #667eea;
}

.sidebar-section.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}



.sidebar-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.sidebar-section h3 i {
    margin-right: 10px;
    color: #667eea;
}

.sidebar-section.active h3 i {
    color: white;
}

/* 可切换内容区域样式 */
.content-area {
    flex: 1;
}

.content-panel {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.content-panel.active {
    display: block;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

.footer .container {
    display: flex;
    flex-direction: column;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

.footer-info p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-copyright p {
    opacity: 0.7;
    font-size: 14px;
    text-align: center;
}

/* 页脚响应式设计 */
@media (max-width: 768px) {
    .footer {
        padding: 20px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 0 10px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-copyright p {
        font-size: 12px;
    }
}



/* 响应式设计 */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-top: 30px;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 15px 0;
    }
    
    .sidebar-section {
        display: inline-block;
        margin-right: 15px;
        margin-bottom: 0;
        padding: 15px 25px;
        border-radius: 25px;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-auth {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .resource-card {
        padding: 20px 15px;
    }
    
    .resource-card h3 {
        font-size: 1rem;
    }
    
    .resource-card p {
        font-size: 13px;
    }
    
    .consent-content {
        margin: 10px;
        margin-top: 50px;
    }
    
    .consent-body {
        padding: 20px;
    }
    
    .consent-footer {
        flex-direction: column;
    }
    
    .consent-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding: 0 10px;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }
    
    .resource-card {
        padding: 20px 15px;
        aspect-ratio: 1.2 / 1;
        max-width: 100%;
        min-height: 200px;
        justify-content: flex-start;
    }
    
    .resource-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .resource-card h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        padding: 0 5px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.3;
    }
    
    .resource-card p {
        font-size: 0.85rem;
        line-height: 1.5;
        -webkit-line-clamp: 3;
        padding: 0 5px;
    }
    
    .policy-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .policy-item i {
        margin-bottom: 10px;
    }
    
    .policy-link {
        margin-left: 0;
        margin-top: 10px;
    }
}