/* 基础样式 */
:root {
    --primary: #7f25d2;
    --secondary: #4ecdc4;
    --dark: #1a1a2e;
    --darker: #0d0d1a;
    --light: #f8f9fa;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--darker);
    color: var(--light);
    overflow-x: hidden;
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.hexagon {
    position: relative;
    width: 60px;
    height: 34.64px;
    background-color: var(--primary);
    margin: 17.32px 0;
    animation: rotate 2s infinite linear;
}

.hexagon:before,
.hexagon:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
}

.hexagon:before {
    bottom: 100%;
    border-bottom: 17.32px solid var(--primary);
}

.hexagon:after {
    top: 100%;
    border-top: 17.32px solid var(--primary);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 导航栏 */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 1rem 5%;
    background: rgba(10, 10, 20, 0.95);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover:after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--light);
    margin: 5px;
    transition: all 0.3s ease;
}

/* 英雄区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background: linear-gradient(135deg, var(--darker) 0%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
    transform: translateY(50px);
    opacity: 0;
    animation: fadeUp 1s forwards 0.5s;
}

.animated-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.highlight:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(255, 107, 107, 0.3);
    z-index: -1;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--gray);
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.cta-button:hover {
    background: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.2);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(50px);
    opacity: 0;
    animation: fadeUp 1s forwards 0.8s;
}

.robot {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #6d3bc9, #4ecdc4);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

.robot:before {
    content: '';
    position: absolute;
    top: 20%;
    left: 15%;
    width: 70%;
    height: 40%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.robot:after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 30%;
    width: 40%;
    height: 20%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* 通用部分样式 */
.section {
    padding: 8rem 5%;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

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

.dark {
    background: rgba(10, 10, 20, 0.6);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 队伍简介 */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
    opacity: 0;
    transform: translateX(-50px);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateX(50px);
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
}

.hexagon-grid {
    width: 300px;
    height: 300px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    transform: rotate(30deg);
}

.hexagon-grid div {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.hexagon-grid div:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
}

.hexagon-grid div:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.hexagon-grid div:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.hexagon-grid div:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

.hexagon-grid div:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
}

.hexagon-grid:hover div {
    opacity: 1;
    transform: scale(1.05);
}


.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.sponsor-card {
    background: rgba(12, 75, 236, 0.432);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    transform: translateY(50px);
    opacity: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sponsor-card:hover {
    transform: translateY(-10px);
    background: rgba(12, 150, 236, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sponsor-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit:scale-down; /* 确保图片填充但不变形 */
    border: 3px solid var(--primary); /* 添加边框 */
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-image:hover .member-image {
    transform: scale(1.1); /* 悬停时放大效果 */
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5); /* 悬停发光效果 */
}


.sponsor-image:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--darker);
    border-radius: 50%;
}

.sponsor-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.sponsor-card p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 成就部分 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem;
    opacity: 0;
    transform: translateY(50px);
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-date {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 600;
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -80px;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -80px;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: #ccc;
    line-height: 1.6;
}

/* 相册部分 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 170px;
    padding: 10px; /* 增加内边距避免溢出 */
}

.gallery-item {
    height: 250px;
    border-radius: 10px;
    overflow: hidden; /* 确保内容不溢出 */
    position: relative;
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 300px;
    height: 300px;
    object-fit: fill; /* 填充但不变形 */
    border-radius: inherit; /* 继承父元素的圆角 */
    display: block; /* 消除图片底部间隙 */
}

.gallery-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.3);
}

.gallery-item:hover:before {
    background: rgba(0, 0, 0, 0.1);
}

/* 联系我们 */
.contact-content {
    display: flex;
    gap: 4rem;
}

.contact-info {
    flex: 1;
    opacity: 0;
    transform: translateX(-50px);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.contact-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #ccc;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    opacity: 0;
    transform: translateX(50px);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.contact-form textarea {
    height: 150px;
    resize: none;
}

.contact-form button {
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: #7852ff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 82, 82, 0.2);
}

/* 页脚 */
footer {
    background: var(--dark);
    padding: 3rem 5%;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

footer p {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

/* 动画类 */
.animate {
    animation: fadeUp 0.8s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translate(0);
    }
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .about-content,
    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .subtitle {
        margin: 0 auto 2rem;
    }
    
    .timeline:before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        padding-right: 0;
        padding-left: 70px;
    }
    
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        left: 0;
        right: auto;
    }
}

@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 80px;
        height: calc(100vh - 80px);
        background: var(--dark);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 3rem;
    }
    
    .nav-links.active {
        transform: translateX(0%);
    }
    
    .nav-links li {
        margin: 2rem 0;
    }
    
    .burger {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 5rem 5%;
    }
}

/* Repos部分 */
#repos {
    background: rgba(10, 10, 20, 0.6);
    padding: 5rem 5%;
}

.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.repo-block {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.repo-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.repo-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.repo-block a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.repo-block p {
    color: #ccc;
    line-height: 1.6;
}