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

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

/* Header 样式 */
.header {
    position: relative;
    width: 100%;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 首页 header 背景 */
.header.home {
    background-image: url('./images/homepagebg.jpg');
}

/* Learning页面 header 背景 */
.header.learning {
    background-image: url('./images/learning.png');
}

/* About页面 header 背景 */
.header.about {
    background-image: url('./images/aboutpage.jpg');
}

/* 导航栏样式 */
.navbar {
    position: relative;
    width: 100%;
    padding: 20px 0;
    background-color: transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Contact页面导航栏背景 */
.navbar.contact {
    background-color: #4472C4;
    position: relative;
}

.navbar.contact .mobile-menu-toggle {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar.contact .mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

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

/* Logo 样式 */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    margin-right: auto;
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 12px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* 导航菜单样式 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ff9f43;
}

/* 右侧按钮样式 */
.nav-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-left: auto;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-signin {
    background-color: #4472C4;
    color: white;
    border: 1px solid #4472C4;
}

.btn-signin:hover {
    background-color: #ff9f43;
    color: #4472C4;
    border-color: #ff9f43;
}

.btn-join {
    background-color: #4472C4;
    color: white;
    border: 1px solid #4472C4;
}

.btn-join:hover {
    background-color: #ff9f43;
    color: #4472C4;
    border-color: #ff9f43;
}

/* Hero 区域样式 */
.hero {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: black;
    z-index: 100;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
   
    color: black;
}

.hero p {
    font-size: 20px;
    font-weight: 400;
    color: black;
}

/* 汉堡菜单样式 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2.5px;
    background-color: white;
    margin: 2.5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 汉堡菜单动画 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

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

/* 移动端菜单样式 */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    width: 250px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
    padding: 15px 0;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    margin: 0;
}

.mobile-nav-menu .nav-link {
    display: block;
    padding: 15px 25px;
    color: #4472C4;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
}

.mobile-nav-menu .nav-link:hover,
.mobile-nav-menu .nav-link.active {
    background-color: #4472C4;
    color: white;
}

.mobile-nav-buttons {
    padding: 15px 25px 5px 25px;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}

.mobile-nav-buttons .btn {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 12px 20px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 15px;
        justify-content: flex-start;
    }
    
    /* 隐藏桌面端导航菜单和按钮 */
    .nav-menu {
        display: none;
    }
    
    .nav-buttons {
        display: none;
    }
    
    /* 显示汉堡菜单 */
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 20px;
    }
    
    /* Logo 调整 */
    .logo-text {
        font-size: 16px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 10px;
    }
    
    .mobile-menu-toggle {
        right: 15px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo img {
        height: 30px;
    }
    
    .hero h1 {
        font-size: 28px;
        padding: 0 20px;
    }
    
    .hero p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .mobile-nav-menu {
        top: 70px;
        right: 15px;
        width: 220px;
    }
    
    .mobile-nav-menu .nav-link {
        font-size: 15px;
        padding: 12px 20px;
    }
    
    .mobile-nav-buttons {
        padding: 12px 20px 5px 20px;
    }
    
    .mobile-nav-buttons .btn {
        font-size: 13px;
        padding: 10px 15px;
    }
}

/* Footer 样式 */
.footer {
    background-color: #4472C4;
    padding: 60px 0 30px 0;
    color: white;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 60px;
}

.footer-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-icon {
    height: 300px;
    width: auto;
}

.footer-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 40px;
    text-align: left;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

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

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #ff9f43;
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
}

/* Back to top 按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: transparent;
    color: white;
    border: none;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover .back-to-top-arrow {
    color: #FF8C42;
}

.back-to-top-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: white;
}

.back-to-top-arrow {
    font-size: 25px;
    line-height: 1;
    color: white;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Footer 响应式设计 */
@media (max-width: 768px) {
    .footer {
        padding: 50px 0 25px 0;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 35px;
        text-align: center;
        padding: 0 15px;
    }
    
    .footer-left {
        justify-content: center;
    }
    
    .footer-icon {
        height: 150px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-column a {
        font-size: 14px;
        padding: 3px 0;
    }
    
    .footer-title {
        font-size: 18px;
        margin-bottom: 25px;
        text-align: center;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding-top: 15px;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        padding: 6px 10px;
    }
    
    .back-to-top-text {
        font-size: 12px;
    }
    
    .back-to-top-arrow {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 40px 0 20px 0;
    }
    
    .footer-container {
        gap: 25px;
        padding: 0 10px;
    }
    
    .footer-icon {
        height: 120px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .footer-column a {
        font-size: 14px;
        display: block;
        padding: 4px 0;
    }
    
    .footer-title {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .footer-bottom {
        margin-top: 25px;
        padding-top: 12px;
    }
    
    .footer-bottom p {
        font-size: 12px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .footer-container {
        padding: 0 5px;
    }
    
    .footer-icon {
        height: 100px;
    }
    
    .footer-title {
        font-size: 15px;
    }
    
    .footer-column h3 {
        font-size: 15px;
    }
    
    .footer-column a {
        font-size: 13px;
    }
} 