/* 首页优化样式 - 字体大小、色彩协调、响应式适配 */

/* 1. 字体大小层次优化 */
:root {
    /* 扩展字体尺寸系统 */
    --font-size-xs: 0.75rem;       /* 12px */
    --font-size-sm: 0.875rem;      /* 14px */
    --font-size-base: 1rem;        /* 16px */
    --font-size-lg: 1.125rem;      /* 18px */
    --font-size-xl: 1.25rem;       /* 20px */
    --font-size-2xl: 1.5rem;       /* 24px */
    --font-size-3xl: 1.875rem;     /* 30px */
    --font-size-4xl: 2.25rem;      /* 36px */
    --font-size-5xl: 3rem;         /* 48px */
    
    /* 优化颜色系统 - 更好的对比度和协调性 */
    --hero-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    --hero-title-primary: #0f172a;    /* 深色标题，更好的可读性 */
    --hero-title-accent: #059669;     /* 绿色强调 */
    --hero-subtitle-color: #475569;   /* 中等灰色，良好可读性 */
    --hero-stats-bg: rgba(255, 255, 255, 0.9);
    --hero-stats-border: rgba(5, 150, 105, 0.1);
    
    /* 卡片和区域背景 */
    --feature-bg-primary: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    --feature-bg-secondary: linear-gradient(135deg, #dcfce7 0%, #ecfdf5 100%);
    --feature-bg-accent: linear-gradient(135deg, #fef3c7 0%, #fef7cd 100%);
    --feature-bg-highlight: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%);
    
    /* 按钮优化 */
    --btn-primary-bg: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    --btn-secondary-bg: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

/* 2. 英雄区域优化 */
.hero-section {
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* 3. 标题层次优化 */
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--hero-title-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight-text {
    display: block;
    background: linear-gradient(135deg, var(--hero-title-accent), #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--hero-subtitle-color);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* 4. 权威徽章优化 */
.authority-badge {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hero-title-accent);
}

.authority-badge i {
    font-size: 1rem;
    color: #f59e0b;
}

/* 5. 统计数据优化 */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--hero-stats-bg);
    border: 1px solid var(--hero-stats-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
}

.stat-number {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--hero-title-accent);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--hero-subtitle-color);
    font-weight: 500;
}

/* 6. 按钮优化 */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cta-primary, .cta-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
}

.cta-primary {
    background: var(--btn-primary-bg);
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.cta-secondary {
    background: var(--btn-secondary-bg);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

/* 7. 教授卡片优化 */
.professor-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.professor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hero-title-accent), #10b981, #059669);
}

.professor-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hero-title-primary);
    margin-bottom: 0.5rem;
}

.professor-position {
    font-size: 1rem;
    color: var(--hero-subtitle-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.professor-expertise {
    font-size: 0.875rem;
    color: var(--hero-title-accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* 8. 特色区域优化 */
.features-section {
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    position: relative;
}

.section-header {
    position: relative;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(5, 150, 105, 0.15);
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--hero-title-accent), #10b981);
    border-radius: 2px;
}

.section-header p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #ffffff;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card.primary {
    background: var(--feature-bg-primary);
    border-color: rgba(30, 64, 175, 0.1);
}

.feature-card.secondary {
    background: var(--feature-bg-secondary);
    border-color: rgba(5, 150, 105, 0.1);
}

.feature-card.accent {
    background: var(--feature-bg-accent);
    border-color: rgba(245, 158, 11, 0.1);
}

.feature-card.highlight {
    background: var(--feature-bg-highlight);
    border-color: rgba(124, 58, 237, 0.1);
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--hero-title-primary);
}

.feature-card p {
    font-size: 1rem;
    color: var(--hero-subtitle-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* 9. 响应式优化 */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-primary, .cta-secondary {
        min-width: 200px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .professor-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .authority-badge {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .hero-subtitle br {
        display: none;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .cta-primary, .cta-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        min-width: 160px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .professor-card {
        padding: 1rem;
    }
}

/* 10. 学习路径优化 */
.learning-path-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
}

.path-step {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.path-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.step-number {
    background: linear-gradient(135deg, var(--hero-title-accent), #10b981);
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.step-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hero-title-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--hero-subtitle-color);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.step-duration {
    font-size: 0.875rem;
    color: var(--hero-title-accent);
    font-weight: 600;
    background: rgba(5, 150, 105, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

/* 11. 路径连接线优化 */
.path-connector {
    width: 2px;
    height: 3rem;
    background: linear-gradient(180deg, var(--hero-title-accent), rgba(5, 150, 105, 0.3));
    margin: 1rem auto;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .learning-path {
        padding: 2rem 0;
    }
    
    .path-step {
        padding: 1.5rem;
    }
    
    .path-connector {
        height: 2rem;
        margin: 0.5rem auto;
    }
}

/* 12. 特色卡片图标和内容优化 */
.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.feature-card.primary .feature-icon {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

.feature-card.secondary .feature-icon {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.feature-card.accent .feature-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.feature-card.highlight .feature-icon {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.feature-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-points li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--hero-subtitle-color);
    font-size: 0.875rem;
    line-height: 1.5;
}

.feature-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--hero-title-accent);
    font-weight: bold;
    font-size: 0.875rem;
}

/* 13. 改善可访问性和对比度 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 13. 课程预览模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.course-preview-modal {
    z-index: 10000;
}

.course-preview-modal .modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    max-width: 900px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.course-preview-container {
    padding: 2rem;
}

.preview-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(5, 150, 105, 0.1);
}

.preview-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--hero-title-primary);
    margin-bottom: 0.5rem;
}

.preview-subtitle {
    font-size: 1.125rem;
    color: var(--hero-subtitle-color);
    font-weight: 500;
}

.preview-content {
    margin-bottom: 2rem;
}

.preview-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hero-title-primary);
    margin: 2rem 0 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--hero-title-accent);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(5, 150, 105, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.overview-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hero-title-accent), #10b981);
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

.overview-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hero-title-primary);
    margin-bottom: 0.25rem;
}

.overview-text p {
    font-size: 0.875rem;
    color: var(--hero-subtitle-color);
    margin: 0;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.module-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.module-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.module-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.module-number {
    background: linear-gradient(135deg, var(--hero-title-accent), #10b981);
    color: white;
    font-weight: 800;
    font-size: 0.875rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hero-title-primary);
    margin: 0;
    flex: 1;
}

.module-duration {
    font-size: 0.75rem;
    background: rgba(5, 150, 105, 0.1);
    color: var(--hero-title-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.module-topics {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}

.module-topics li {
    font-size: 0.875rem;
    color: var(--hero-subtitle-color);
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.module-topics li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--hero-title-accent);
    font-weight: bold;
}

.features-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-highlight {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-highlight .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-highlight h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hero-title-primary);
    margin-bottom: 0.5rem;
}

.feature-highlight p {
    font-size: 0.875rem;
    color: var(--hero-subtitle-color);
    margin: 0;
    line-height: 1.4;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--hero-title-accent), #10b981);
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-primary.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--hero-title-primary);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid var(--hero-title-accent);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--hero-title-primary);
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--hero-subtitle-color);
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .course-preview-modal .modal-content {
        width: 95vw;
        max-height: 95vh;
    }
    
    .course-preview-container {
        padding: 1.5rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .module-topics {
        grid-template-columns: 1fr;
    }
    
    .features-highlight {
        grid-template-columns: 1fr;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* 14. 打印样式优化 */
@media print {
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .feature-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .course-preview-modal {
        display: none !important;
    }
}