/* 全局变量 */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #4fc3f7;
    --secondary-color: #03a9f4;
    --accent-color: #ff9800;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #e1e5ee;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
    padding-top: 80px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 10px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 导航栏样式 */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 滚动时导航栏样式 */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
}

/* Logo图片样式 */
.logo-image {
    height: 50px;
    margin-right: 15px;
    object-fit: contain;
    vertical-align: middle;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--text-light);
    font-size: 0.9rem;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.1);
}

.menu-toggle {
    display: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--primary-color);
    background: none;
    border: none;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(26, 115, 232, 0.1);
    transform: scale(1.05);
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.menu-toggle:hover .hamburger-icon {
    color: var(--primary-dark);
}

/* 菜单打开时的汉堡图标动画 */
header.menu-open .hamburger-icon {
    transform: rotate(90deg);
}

/* 移动端菜单样式 */
@media (max-width: 768px) {
    /* 确保header容器在移动端正确布局 */
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: relative;
    }

    /* Logo区域在移动端保持不变 */
    .logo {
        display: flex;
        align-items: center;
        flex-direction: row;
        z-index: 1001;
    }

    .logo h1 {
        font-size: 0.9rem;
        margin: 0;
    }

    .logo-image {
        height: 40px;
        margin-right: 10px;
    }

    /* 显示汉堡菜单按钮 */
    .menu-toggle {
        display: block;
        z-index: 1001;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary-color);
        background: none;
        border: none;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    .menu-toggle:hover {
        transform: scale(1.1);
        background-color: rgba(26, 115, 232, 0.1);
    }

    .menu-toggle .hamburger-icon {
        width: 28px;
        height: 28px;
    }

    /* 隐藏桌面端导航菜单 */
    nav ul {
        position: fixed;
        top: 0; 
        left: 0; 
        right: 0;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 120px 20px 40px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);

        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;

        /* 初始状态：隐藏 */
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;

        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    /* menu-open 时显示菜单 */
    header.menu-open nav ul {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* 移动端菜单项样式 */
    nav ul li {
        margin: 20px 0;
        text-align: center;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 15px 20px;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-color);
        border-radius: 8px;
        transition: all 0.3s ease;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    nav ul li a:hover, 
    nav ul li a.active {
        color: white;
        background-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    }

    /* 汉堡菜单动画 */
    .menu-toggle i {
        transition: transform 0.3s ease;
    }

    header.menu-open .menu-toggle i {
        transform: rotate(90deg);
    }
}

/* 更小屏幕的适配 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 0.8rem;
    }

    .logo-image {
        height: 35px;
        margin-right: 8px;
    }

    nav ul {
        padding: 100px 15px 30px;
    }

    nav ul li a {
        font-size: 1.1rem;
        padding: 12px 15px;
    }
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 120px 0 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* 添加背景图案 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="10" y="30" font-family="monospace" font-size="10" fill="rgba(255,255,255,0.05)">{code}</text><text x="5" y="50" font-family="monospace" font-size="10" fill="rgba(255,255,255,0.05)">function()</text><text x="15" y="70" font-family="monospace" font-size="10" fill="rgba(255,255,255,0.05)">while(true)</text></svg>');
    opacity: 0.2;
    z-index: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* 英雄区域中的按钮样式覆盖 */
.hero .btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.hero .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.hero-content {
    text-align: left;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    margin-top: 30px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* 添加英雄区域右侧图像 */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeIn 1s ease-out;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 700px;
}

.hero-image-main {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-image-container:hover .hero-image-main {
    transform: perspective(1000px) rotateY(0deg);
}

.floating-code {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: bold;
    color: #000;
    z-index: 2;
    max-width: 220px;
}

.floating-code-1 {
    top: -20px;
    right: 20%;
    animation: float 4s ease-in-out infinite;
}

.floating-code-2 {
    bottom: 10%;
    left: -30px;
    animation: float 5s ease-in-out infinite 1s;
}

.floating-code-3 {
    top: 40%;
    right: -20px;
    animation: float 6s ease-in-out infinite 2s;
}

@media (max-width: 992px) {
    .floating-code {
        max-width: 200px;
    }
    
    .floating-code-1 {
        right: 15%;
    }
    
    .floating-code-2 {
        left: -20px;
    }
}

@media (max-width: 768px) {
    .floating-code {
        max-width: 180px;
    }
    
    .floating-code-1 {
        right: 10%;
    }
    
    .floating-code-2 {
        left: -15px;
    }
    
    .floating-code-3 {
        right: -15px;
    }
}

@media (max-width: 576px) {
    .floating-code {
        display: none;
    }
}

.dots-container {
    text-align: center;
    margin-top: 15px;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 特色内容样式 */
.features {
    padding: 80px 0;
    background-color: var(--bg-color);
    position: relative;
    z-index: 1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

/* 关于我们预览样式 */
.about-preview {
    padding: 80px 0;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-preview::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(79, 195, 247, 0.1);
    z-index: 0;
}

.about-preview::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(255, 152, 0, 0.1);
    z-index: 0;
}

.about-preview .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-content {
    padding-right: 20px;
}

.about-content .section-title {
    text-align: left;
}

.about-content .section-title::after {
    margin-left: 0;
}

.about-content p {
    margin-bottom: 20px;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

.image-placeholder {
    width: 100%;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.image-placeholder:hover img {
    transform: scale(1.05);
}

.image-placeholder i {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(26, 115, 232, 0.8);
    padding: 10px;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.image-placeholder:hover i {
    transform: scale(1.1);
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 关于我们特性样式 */
.about-features {
    margin-top: 30px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateX(5px);
}

.feature-icon {
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.feature:hover .feature-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.feature-content h3 {
    text-align: left;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.feature-content p {
    text-align: left;
    color: var(--text-light);
    margin-bottom: 0;
}

/* 竞赛Logo样式 */
.contest-logos {
    margin-top: 40px;
    padding: 20px 40px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.contest-logos h3 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.logo-stack {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 50px;
    padding: 30px 0;
}

.logo-item {
    position: relative;
    width: 100%;
    max-width: 220px;
    height: auto;
    background-color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1;
    margin: auto;
    justify-self: center;
}

/* 为每个logo-item设置特定的样式 */
.logo-item-1 {
    transform: rotate(-5deg);
    grid-column: 1;
    grid-row: 1;
}

.logo-item-2 {
    transform: rotate(3deg);
    grid-column: 2;
    grid-row: 1;
}

.logo-item-3 {
    transform: rotate(-2deg);
    grid-column: 3;
    grid-row: 1;
}

.logo-item-4 {
    transform: rotate(4deg);
    grid-column: 1;
    grid-row: 2;
}

.logo-item-5 {
    transform: rotate(-3deg);
    grid-column: 2;
    grid-row: 2;
}

.logo-item-6 {
    transform: rotate(2deg);
    grid-column: 3;
    grid-row: 2;
}

.logo-item-7 {
    transform: rotate(-1deg);
    grid-column: 1;
    grid-row: 3;
}

.logo-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-item:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 最新动态样式 */
.news {
    min-height: auto;
    padding: 80px 0;
    background-color: var(--bg-light);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    z-index: 1;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    justify-items: center;
}

.news-card {
    background-color: white;
    overflow: hidden;
    display: flex;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-date {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.news-date .day {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    font-size: 0.9rem;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
}

.news-content h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.news-content p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
}

.read-more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    background: linear-gradient(to bottom, var(--primary-dark), #0a2942);
    color: white;
    padding: 30px 0 20px;
    position: relative;
}

.footer-content {
    padding-top: 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 向下箭头样式 */
.scroll-down-arrow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

.arrow-link {
    display: block;
    color: var(--primary-color);
    font-size: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.arrow-link:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .contest-logos {
        max-width: 1000px;
        padding: 35px 50px;
    }

    .logo-stack {
        max-width: 900px;
        gap: 40px;
    }

    .logo-item {
        max-width: 200px;
    }
}

@media (max-width: 992px) {
    .about-preview .container {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding-right: 0;
        text-align: center;
    }

    .about-image {
        order: 0;
        max-width: 600px;
        margin: 0 auto 30px;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-content .section-title::after {
        margin: 10px auto;
    }

    .about-content .btn {
        margin: 0 5px 10px;
    }

    .contest-logos {
        max-width: 900px;
        padding: 30px 40px;
    }

    .logo-stack {
        max-width: 800px;
        gap: 35px;
    }

    .logo-item {
        max-width: 180px;
    }
}

/* 平板端适配 */
@media (max-width: 1000px) {
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block;
        font-size: 1.3rem;
        color: var(--primary-color);
        cursor: pointer;
        z-index: 1001;
        background: none;
        border: none;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    .menu-toggle .hamburger-icon {
        width: 26px;
        height: 26px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .logo-image {
        height: 45px;
    }

    /* 平板端也使用汉堡菜单 */
    nav ul {
        position: fixed;
        top: 0; 
        left: 0; 
        right: 0;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 100px 20px 40px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);

        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;

        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;

        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    header.menu-open nav ul {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    nav ul li {
        margin: 15px 0;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 12px 20px;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-color);
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    nav ul li a:hover, 
    nav ul li a.active {
        color: white;
        background-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    }
}

@media (max-width: 768px) {
    /* 英雄区域移动端适配 */
    .hero {
        padding: 80px 0 60px;
        min-height: auto;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        order: 1;
    }

    .hero h2 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    .hero-image {
        order: 2;
        margin-top: 20px;
    }

    /* 新闻网格移动端适配 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card {
        max-width: 100%;
    }

    /* 竞赛logo移动端适配 */
    .contest-logos {
        padding: 25px 30px;
        width: 95%;
    }

    .logo-stack {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 30px;
        max-width: 600px;
    }

    .logo-item {
        max-width: 160px;
        padding: 20px;
    }

    /* 重新排列logo项目 */
    .logo-item-1 {
        grid-column: 1;
        grid-row: 1;
    }

    .logo-item-2 {
        grid-column: 2;
        grid-row: 1;
    }

    .logo-item-3 {
        grid-column: 1;
        grid-row: 2;
    }

    .logo-item-4 {
        grid-column: 2;
        grid-row: 2;
    }

    .logo-item-5 {
        grid-column: 1;
        grid-row: 3;
    }

    .logo-item-6 {
        grid-column: 2;
        grid-row: 3;
    }

    /* 特性区域移动端适配 */
    .feature {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .feature-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .feature-content h3,
    .feature-content p {
        text-align: center;
    }
}

@media (max-width: 576px) {
    /* 小屏幕设备适配 */
    body {
        padding-top: 70px;
    }

    /* Header适配 */
    header .container {
        padding: 12px 15px;
    }

    .logo h1 {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .logo-image {
        height: 32px;
        margin-right: 8px;
    }

    .menu-toggle {
        font-size: 1.4rem;
        padding: 6px;
    }

    .menu-toggle .hamburger-icon {
        width: 24px;
        height: 24px;
    }

    /* 英雄区域适配 */
    .hero {
        padding: 50px 0 40px;
        min-height: auto;
    }

    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .hero-buttons {
        margin-top: 20px;
    }

    .btn {
        display: block;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 10px;
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* 区域标题适配 */
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }

    /* 关于我们区域适配 */
    .about-preview {
        padding: 60px 0;
    }

    .about-image {
        max-width: 100%;
    }

    .image-placeholder {
        aspect-ratio: 4/3;
    }

    .image-placeholder i {
        font-size: 1.2rem;
        padding: 8px;
    }

    /* 竞赛logo适配 */
    .contest-logos {
        padding: 20px 15px;
        border-radius: 15px;
        margin-top: 30px;
    }

    .contest-logos h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .logo-stack {
        gap: 20px;
        padding: 20px 0;
    }

    .logo-item {
        max-width: 130px;
        padding: 12px;
    }

    /* 新闻区域适配 */
    .news {
        padding: 60px 0;
    }

    .news-card {
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .news-date {
        min-width: 70px;
        padding: 12px;
    }

    .news-date .day {
        font-size: 1.5rem;
    }

    .news-date .month {
        font-size: 0.8rem;
    }

    .news-content {
        padding: 15px;
    }

    .news-content h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
        line-height: 1.4;
    }

    .news-content p {
        font-size: 0.9rem;
        margin-bottom: 12px;
        line-height: 1.5;
    }

    /* 页脚适配 */
    footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 30px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }
}
