
:root {
    --tsinghua-purple: #6610f2;
    --deep-purple: #590098;
    --accent-gold: #d4af37;
    --text-main: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
body { 
    width: 100%;
    background: linear-gradient(to bottom, 
        var(--deep-purple) 0, var(--deep-purple) 70px, 
        var(--tsinghua-purple) 70px, var(--tsinghua-purple) 100%);
    color: var(--text-main); 
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden;
}
img{
    max-width: 100%;
}

/* --- 加载动画 --- */

.loader-overlay {
    position: fixed; /* 固定在视口，不随滚动变化 */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, #412b8a, #4b1b99); /* 和页面背景一致 */
    z-index: 9999; /* 最高层级，遮挡所有内容 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease; /* 平滑隐藏动画 */
    visibility: visible;
    opacity: 1;
}

/* 加载完成后隐藏遮罩 */
.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* 隐藏后不阻挡交互 */
}

/* 星空风格加载动画（旋转星星） */
.loader {
    width: 60px;
    height: 60px;
    position: relative;
    animation: rotate 2s linear infinite; /* 旋转动画 */
}

.loader::before, .loader::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.8); /* 发光效果，贴合星空 */
}

.loader::before {
    top: 0;
    left: 0;
}

.loader::after {
    bottom: 0;
    right: 0;
    background: #a855f7; 
    box-shadow: 0 0 15px rgba(168,85,247,0.9);
}

/* 旋转动画关键帧 */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 高级导航栏 --- */
nav {
    position: fixed; top: 0; width: 100%; height: 70px;
    background-color: var(--deep-purple);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; z-index: 1000;
}

.logo { 
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800; 
    font-size: 1.4rem; 
    color: #ffffff; 
    letter-spacing: 1px; 
}

.separator {
    vertical-align: middle;
    width: 1px;           
    height: 2.8rem;         
    background: linear-gradient(to bottom, transparent, white, transparent);
    opacity: 0.5;
    margin: 0 10px;       
}

.nav-links { display: flex; list-style: none; }
.nav-item { position: relative; margin-left: 35px; cursor: pointer; }
.nav-item a { text-decoration: none; color: #ffffff; font-weight: 500; transition: 0.3s; }
.nav-item:hover > a { color: var(--accent-gold); }

/* 下拉菜单样式 */
.dropdown {
    position: absolute; top: 100%; left: 0;
    background: #4b0082;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 8px; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all 0.3s ease;
    padding: 10px 0;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li { list-style: none; }
.dropdown a {
    display: block; padding: 12px 20px; font-size: 0.9rem;
    border-left: 3px solid transparent;
    color: #ffffff;
}
.dropdown a:hover { background: #7a28f5; border-left: 3px solid var(--accent-gold); }

/* 回顶 */
#backup{
    position: fixed;
    top: 80%;
    right: 3%;
    height: 4rem;
    width: 4rem;
    text-align: center;
    line-height: 50px;
    border-radius: 10px;
    background-color: var(--deep-purple);
    opacity: 0.5;
    cursor: pointer;
    pointer-events: auto;
    display: none;
    padding: 10px;
    transition: all 0.3s;
    z-index: 3;
}

#backup:hover{
    transform: translateY(-5px);
}

#backup.show{
    display: block;
}

/* --- Hero 院标背景区域 --- */
.hero {
    height: 80vh; 
    background: linear-gradient(to bottom, var(--deep-purple),var(--tsinghua-purple));
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: white; text-align: center; padding-top: 70px;
    margin: 70px 0;
    position: relative;
}
/* 院标 */
.hero-logo {
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
    top: 50%;
    left: 49%; /* 别问，问就是硬对齐的 */
    transform: translate(-50%, -50%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}
#compass{
    width: 40rem;
    top: 100%;
    left: 3%;
    transform: rotate(30deg) translate(-25rem, -10rem);
    z-index: 1;
}
#map{
    width: 45rem;
    top: 10%;
    left: 85%;
    z-index: 1;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; letter-spacing: 4px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { font-size: 1.2rem; opacity: 0.9; max-width: 600px; line-height: 1.8; text-shadow: 0 1px 5px rgba(0,0,0,0.3); }

.maintitle{
    position: relative;
}

.maintitle::after{
    content: "";
    position: absolute;
    bottom: -5px;
    left: -25%;
    width: 150%;
    height: 1px;
    background: linear-gradient(to right, transparent, white, white, transparent);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.6);
    animation: blink 2s infinite alternate; 
    animation-delay: calc(var(--delay) * 1s);
}
.star.dense{
    left: calc(var(--x) * 100%);
    top: calc(var(--y) * 20%);
    opacity: calc(0.2 + var(--alpha)); /* 更亮 */
    width: calc(2px + var(--size) * 1px); /* 更小 */
    height: calc(2px + var(--size) * 1px);
}

.star.sparse {
    left: calc(var(--x) * 100%);
    top: calc(20% + var(--y) * 80%);
    opacity: calc(0.1 + var(--alpha) * 0.5); /* 更暗 */
    width: calc(2px + var(--size) * 2px);    /* 更大 */
    height: calc(2px + var(--size) * 2px);
}

@keyframes blink {
    0% { opacity: calc(0.2 + var(--alpha) * 0.3); }
    100% { opacity: calc(0.8 + var(--alpha) * 0.2); }
}

/* --- 通用容器样式 --- */
.container { 
    position: relative;
    padding: 80px 10%; 
    z-index: 2;
}
.section-title { font-size: 2.2rem; margin-bottom: 50px; text-align: center; position: relative; color: #ffffff; }
.section-title::after {
    content: ''; display: block; width: 50px; height: 4px; 
    background: var(--accent-gold); margin: 15px auto;
}

/* --- 核心调研方向卡片 --- */
.card-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}

.ai-card {
    background: rgba(255, 255, 255, 0.8); border-radius: 15px; padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer; border: 1px solid #eee; position: relative; overflow: hidden;
    color: var(--deep-purple);
    backdrop-filter: blur(10px);
}
.ai-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); border-color: var(--accent-gold); }
.ai-card h3 { margin-bottom: 15px; color: var(--tsinghua-purple); }
.ai-card p { font-size: 0.95rem; color: #333; transition: 0.3s; }
.ai-card a {
    display: inline-block; font-size: 0.9rem;
    text-decoration: none;
    color: #333;
}
.ai-card a:hover{
    color: var(--tsinghua-purple);
}

/* --- 新增：支队概况和成果收获样式 --- */
.overview-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 60px 5%;
    margin: 40px 0;
}
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
    scroll-margin-top: 80px;
}
.overview-text h3 {
    font-size: 1.8rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}
.overview-text h4 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
}
.secondarytitle{
    position: relative;
    display: inline-block;
    margin-left: auto;
    margin-right: 0;
}
.secondarytitle::after{
    content: "";
    position: absolute;
    bottom: -5px;
    left: -10%;
    width: 120%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}
.overview-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}
.achievement-list {
    list-style: none;
}
.achievement-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}
.achievement-list li::before {
    content: "✓";
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-right: 10px;
}

/* --- 新增：支队员感想样式 --- */
.feedback-section {
    margin: 60px 0;
}
.feedback-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    column-count: 4;
    column-gap: 30px;
    align-items: start;
}
.feedback-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    color: var(--deep-purple);
    position: relative;
    border-left: 5px solid var(--tsinghua-purple);
    break-inside: avoid;
    margin-bottom: 30px;
    height: fit-content;
}
.feedback-card p {
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 20px;
}
.feedback-author {
    display: flex;
    align-items: center;
    color: var(--tsinghua-purple);
    font-weight: 600;
}
.feedback-author::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tsinghua-purple);
    margin-right: 15px;
    background: linear-gradient(45deg, var(--tsinghua-purple), var(--accent-gold));
}

/* 底部 */
footer { 
    display: flex;
    justify-content: space-between;
    background: #4b0082; 
    color: #ffffff; 
    padding: 60px 10%; 
    margin-top: 80px; 
    z-index: 2;
}