
/* 全局变量 */
:root {
    --primary-color: #2997ff;
    --secondary-color: #1d1d1f;
    --background-color: #ffffff;
    --text-color: #1d1d1f;
    --nav-text-color: #ffffff;
    --hover-color: #0071e3;
    --section-padding: 80px 20px;
    --transition: all 0.3s ease;
}

/* 深色模式 */
[data-theme="dark"] {
    --background-color: #000000;
    --text-color: #f5f5f7;
    --secondary-color: #f5f5f7;
    --nav-text-color: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: var(--transition);
}

/* 导航栏样式 */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--nav-text-color);
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--nav-text-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
    opacity: 0.9;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--nav-text-color);
    cursor: pointer;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 移动端导航栏样式 */
@media (max-width: 768px) {
    .nav-content {
        height: auto;
        padding: 10px 20px;
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
        background: rgba(0, 0, 0, 0.9);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 10px;
    }

    .nav-links li {
        margin: 5px;
    }

    .nav-links a {
        padding: 8px 12px;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        display: block;
        text-align: center;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

    .theme-toggle {
        order: 2;
        margin-left: auto;
    }
}

/* 英雄区域样式 - 现代化升级 */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--section-padding);
    position: relative;
    color: #ffffff;
    overflow: hidden;
    background-color: #0a0a12;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg, 
        #0a0a12 0%, 
        #101035 25%, 
        #0f2a4a 50%, 
        #0a3a5e 65%, 
        #0f2a4a 80%, 
        #101035 100%);
    background-size: 400% 400%;
    opacity: 0.85;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(41, 151, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(94, 23, 235, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 199, 190, 0.08) 0%, transparent 60%);
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(to right, #2997ff, #5e17eb, #00C7BE);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradient 5s linear infinite alternate;
    text-shadow: 0 0 20px rgba(41, 151, 255, 0.2);
}

@keyframes textGradient {
    0% { background-position: 0% center; }
    100% { background-position: 100% center; }
}

.hero h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(90deg, var(--primary-color), #5e17eb);
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(41, 151, 255, 0.3);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #5e17eb, var(--primary-color));
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(41, 151, 255, 0.4);
}

.cta-button:hover::before {
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s infinite;
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    position: relative;
    margin-bottom: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(41, 151, 255, 0.2);
}

.mouse::before {
    content: '';
    width: 6px;
    height: 10px;
    background: linear-gradient(to bottom, rgba(41, 151, 255, 0.8), rgba(94, 23, 235, 0.8));
    border-radius: 3px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* 特色课程样式 */
.featured-courses {
    padding: var(--section-padding);
    background-color: var(--background-color);
}

.section-title {
    text-align: center;
    font-size: 40px;
    margin-bottom: 60px;
}

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

.course-card {
    background: var(--background-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-10px);
}

.course-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-info {
    padding: 30px;
}

.course-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    margin-top: 20px;
    font-weight: 500;
}

.learn-more i {
    margin-left: 8px;
    transition: var(--transition);
}

.learn-more:hover i {
    transform: translateX(5px);
}

/* 学习路径样式 */
.learning-path {
    padding: var(--section-padding);
    background-color: var(--secondary-background);
}

.path-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.path-item {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.path-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
}

/* 社区展示样式 */
.community {
    padding: var(--section-padding);
}

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

.community-card {
    text-align: center;
    padding: 40px;
    background: var(--background-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.community-card:hover {
    transform: translateY(-10px);
}

.community-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 联系我样式 */
.contact {
    padding: var(--section-padding);
    background-color: var(--secondary-background);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-social {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.contact-social a {
    color: var(--text-color);
    font-size: 24px;
    transition: var(--transition);
}

.contact-social a:hover {
    color: var(--primary-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--background-color);
    padding: 60px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
}

.footer-logo h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
}

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

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

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(var(--text-color), 0.1);
}

/* 动画 */
@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero h2 {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* 新闻板块样式 */
.news-section {
    padding: var(--section-padding);
    background-color: var(--background-color);
}

.news-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background: var(--background-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
}

.main-news {
    height: 100%;
}

.main-news .news-image {
    height: 400px;
}

.main-news .news-content {
    padding: 30px;
}

.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-sidebar .news-card {
    display: flex;
    height: calc((100% - 60px) / 3);
}

.news-sidebar .news-image {
    width: 35%;
    min-width: 120px;
}

.news-sidebar .news-content {
    flex: 1;
    padding: 20px;
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.main-news .news-content h3 {
    font-size: 32px;
}

.news-content p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 20px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* 响应式设计 */
@media (max-width: 968px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .main-news .news-image {
        height: 300px;
    }

    .news-sidebar .news-card {
        height: auto;
    }

    .news-sidebar .news-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .news-sidebar .news-card {
        flex-direction: column;
    }

    .news-sidebar .news-image {
        width: 100%;
        height: 200px;
    }

    .main-news .news-content h3 {
        font-size: 24px;
    }
}

/* 响应式设计增强 */
@media (max-width: 1024px) {
    .section-content {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .course-grid {
        gap: 20px;
    }

    .news-grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* 导航栏移动端样式 */
    .nav-content {
        padding: 0 15px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        background: var(--background-color);
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .mobile-menu.active {
        transform: translateY(0);
    }

    .mobile-menu .nav-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .mobile-menu .nav-links a {
        font-size: 16px;
        padding: 10px 0;
    }

    /* 英雄区域移动端优化 */
    .hero {
        height: 90vh;
        padding: 100px 20px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero h2 {
        font-size: 18px;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 16px;
    }

    /* 课程区域移动端优化 */
    .course-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .course-card {
        margin-bottom: 20px;
    }

    /* 新闻区域移动端优化 */
    .news-grid {
        grid-template-columns: 1fr;
    }

    .main-news .news-image {
        height: 250px;
    }

    .news-sidebar .news-card {
        flex-direction: column;
        height: auto;
    }

    .news-sidebar .news-image {
        width: 100%;
        height: 200px;
    }

    .news-content h3 {
        font-size: 20px;
    }

    /* 学习路径移动端优化 */
    .path-timeline {
        padding: 0 15px;
    }

    .path-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .path-icon {
        margin: 0 auto;
    }

    /* 社区展示移动端优化 */
    .community-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .community-card {
        padding: 30px 20px;
    }

    /* 联系我们移动端优化 */
    .contact-content {
        padding: 0 15px;
    }

    .contact-social {
        justify-content: center;
    }

    /* 页脚移动端优化 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 15px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-logo {
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕设备优化 */
    .hero h1 {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .main-news .news-image {
        height: 200px;
    }

    .news-sidebar .news-image {
        height: 180px;
    }

    .course-card {
        margin: 0;
    }

    .path-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* 横屏模式优化 */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 80px 20px;
    }

    .scroll-indicator {
        display: none;
    }

    .mobile-menu {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* 平板设备优化 */
@media (min-width: 768px) and (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-sidebar .news-card {
        flex-direction: row;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 高分辨率设备优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 深色模式额外优化 */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --background-color: #000000;
        --text-color: #f5f5f7;
        --secondary-color: #f5f5f7;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 维护公告条样式 */
.maintenance-notice {
    background-color: rgba(255, 59, 48, 0.1);
    border-left: 4px solid #ff3b30;
    padding: 15px 20px;
    margin: 20px 0 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulse 2s infinite;
}

.maintenance-notice i {
    color: #ff3b30;
    font-size: 1.2rem;
}

.maintenance-notice span {
    color: #ff3b30;
    font-weight: 500;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 59, 48, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

/* 暗色模式适配 */
body.dark-mode .maintenance-notice {
    background-color: rgba(255, 59, 48, 0.15);
    border-left-color: #ff453a;
}

body.dark-mode .maintenance-notice i,
body.dark-mode .maintenance-notice span {
    color: #ff453a;
} 