/* 全局样式 Global Styles */
:root {
    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text: #fff;
    --dark-bg: #1a1a2e;
    --light-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.en {
    display: none;
}

.highlight {
    color: var(--accent-color);
}

/* 按钮样式 Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(78, 84, 200, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(78, 84, 200, 0.6);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent-color), #ff9a9e);
    color: var(--light-text);
    padding: 15px 30px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-login, .btn-register {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--light-text);
    color: var(--light-text);
    margin-right: 10px;
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background-color: var(--accent-color);
    color: var(--light-text);
}

.btn-register:hover {
    background-color: #ff5252;
}

/* 导航栏样式 Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
}

.logo span {
    color: var(--accent-color);
}

.nav-links ul {
    display: flex;
}

.nav-links ul li {
    margin: 0 15px;
}

.nav-links ul li a {
    color: var(--light-text);
    font-weight: 500;
    position: relative;
}

.nav-links ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links ul li a:hover::after,
.nav-links ul li a.active::after {
    width: 100%;
}

.language-switch button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--light-text);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.language-switch button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 用户菜单样式 User Menu Styles */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu-toggle i:first-child {
    font-size: 1.2rem;
}

.user-menu-toggle i:last-child {
    font-size: 0.8rem;
    transition: var(--transition);
}

.user-menu.active .user-menu-toggle i:last-child {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 5px 0;
}

#showMenu, #hideMenu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 英雄区域样式 Hero Section Styles */
.hero {
    background: linear-gradient(rgba(26, 26, 46, 0.8), rgba(26, 26, 46, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    padding: 150px 0 100px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* 特性区域样式 Features Section Styles */
.features {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--light-text);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: #666;
}

/* 竞赛预览区域样式 Competitions Preview Styles */
.competitions-preview {
    padding: 80px 0;
    background-color: #f0f2f5;
}

.competition-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.competition-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.competition-image {
    height: 200px;
    overflow: hidden;
}

.competition-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.competition-card:hover .competition-image img {
    transform: scale(1.05);
}

.competition-info {
    padding: 20px;
}

.competition-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.competition-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.deadline {
    color: var(--accent-color);
    font-weight: 600;
}

.view-all {
    text-align: center;
}

/* 用户反馈区域样式 Testimonials Section Styles */
.testimonials {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.testimonial-content {
    margin-bottom: 20px;
    position: relative;
}

.testimonial-content::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -20px;
    left: -10px;
}

.testimonial-content p {
    font-style: italic;
    color: #555;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.author-info h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.author-info p {
    font-size: 0.9rem;
    color: #666;
}

/* 行动号召区域样式 CTA Section Styles */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 页脚样式 Footer Styles */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--accent-color);
}

.footer-logo p {
    color: #aaa;
}

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

.footer-links-column h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-links-column h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
}

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

.footer-links-column ul li a {
    color: #aaa;
    transition: var(--transition);
}

.footer-links-column ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.social-icons i {
    color: var(--light-text);
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* 响应式设计 Responsive Design */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-logo {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-logo h3 {
        margin-bottom: 10px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--dark-bg);
        padding: 50px 0;
        z-index: 1001;
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links ul li {
        margin: 15px 0;
    }
    
    #showMenu {
        display: block;
    }
    
    #hideMenu {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        margin-bottom: 15px;
        width: 80%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-social {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .feature-cards, .competition-cards, .testimonial-slider {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}