/* =========================================
   毕业季网页 · 样式表
   青春不散场 · 不说再见
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   顶部导航
   ========================================= */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.6rem 0;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, rgba(102,126,234,0.97) 0%, rgba(118,75,162,0.97) 100%);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.7rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.scrolled .logo {
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 2rem;
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.05rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffd700;
    transition: width 0.3s ease;
}

nav a:hover {
    color: #ffd700;
}

nav a:hover::after {
    width: 100%;
}

/* =========================================
   Hero 封面区
   ========================================= */
.hero {
    height: 100vh;
    background: url('封面.jpg') no-repeat center center / cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

/* 叠加层：渐变 + 噪点质感 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(15, 12, 41, 0.55) 0%,
            rgba(36, 36, 62, 0.35) 40%,
            rgba(15, 12, 41, 0.65) 100%
        );
    z-index: 1;
}

/* 底部渐变遮罩 */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, transparent, #f8f9fa);
    pointer-events: none;
    z-index: 2;
}

/* 内容层级 */
.hero h1,
.hero p,
.hero .btn,
.hero .hero-countdown,
.hero .hero-scroll-hint {
    position: relative;
    z-index: 3;
}

/* 光晕装饰 */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.18;
    z-index: 1;
    pointer-events: none;
}

.hero-glow.glow-1 {
    width: 500px;
    height: 500px;
    background: #667eea;
    top: -10%;
    right: -8%;
    animation: glowFloat1 8s ease-in-out infinite;
}

.hero-glow.glow-2 {
    width: 400px;
    height: 400px;
    background: #ffd700;
    bottom: 5%;
    left: -6%;
    animation: glowFloat2 10s ease-in-out infinite;
}

@keyframes glowFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(-30px, 25px); }
}

@keyframes glowFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(25px, -20px); }
}

.hero h1 {
    font-size: 4.2rem;
    margin-bottom: 1rem;
    animation: heroFadeUp 1s ease both;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 6px;
    font-weight: 800;
}

/* 标题下装饰线 */
.hero h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    margin: 16px auto 0;
    border-radius: 2px;
}

.hero p {
    font-size: 1.35rem;
    margin-bottom: 2.2rem;
    max-width: 650px;
    animation: heroFadeUp 1.4s ease both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    line-height: 2;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* 倒计时/计时器 */
.hero-countdown {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    animation: heroFadeUp 1.7s ease both;
}

.countdown-block {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 12px 18px;
    text-align: center;
    min-width: 72px;
}

.countdown-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
    line-height: 1;
}

.countdown-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    letter-spacing: 1px;
}

.countdown-sep {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.btn {
    padding: 1rem 2.8rem;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
    border: none;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: heroFadeUp 2s ease both;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
    display: inline-block;
    z-index: 3;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #ffe033, #ffbb11);
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(255, 215, 0, 0.5);
}

.btn:hover::before {
    left: 100%;
}

/* 向下滚动提示 */
.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
    cursor: pointer;
}

.hero-scroll-hint .scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* =========================================
   通用区块标题
   ========================================= */
.section-title {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    color: #667eea;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #ffd700);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 140px;
}

/* =========================================
   照片墙
   ========================================= */
.photo-wall {
    padding: 70px 20px 80px;
    background: linear-gradient(180deg, #f0f2ff 0%, #f8f9ff 100%);
    text-align: center;
    overflow: hidden;
}

.photo-slider {
    overflow: hidden;
    width: 100%;
    margin: 36px auto 0;
    cursor: grab;
}

.photo-slider:active {
    cursor: grabbing;
}

.photo-track {
    display: flex;
    width: max-content;
}

/* 第一行：从左到右 → */
.photo-track-forward {
    animation: photoScrollRight 30s linear infinite;
}

/* 第二行：从右到左 ← */
.photo-track-backward {
    animation: photoScrollLeft 34s linear infinite;
}

.photo-track:hover,
.photo-slider:hover .photo-track {
    animation-play-state: paused;
}

/* 向右滚动：从 -50% 位移到 0 */
@keyframes photoScrollRight {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* 向左滚动：从 0 位移到 -50% */
@keyframes photoScrollLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 第二行与第一行间距 */
.photo-slider-reverse {
    margin-top: 24px;
}

.photo-card {
    flex: 0 0 auto;
    width: 285px;
    margin: 0 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 32px rgba(102, 126, 234, 0.12),
                0 4px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.08);
    overflow: hidden;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.photo-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 22px 50px rgba(102, 126, 234, 0.22),
                0 8px 20px rgba(0, 0, 0, 0.1);
}

.photo-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-info {
    padding: 16px 18px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* =========================================
   音乐控制按钮
   ========================================= */
.music-control {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
    z-index: 99;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.music-control.playing {
    animation: musicPulse 2s ease-in-out infinite;
}

.music-control:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 28px rgba(102, 126, 234, 0.6);
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45); }
    50%       { box-shadow: 0 6px 30px rgba(102, 126, 234, 0.75), 0 0 0 8px rgba(102,126,234,0.1); }
}

/* =========================================
   页脚
   ========================================= */
footer {
    background: linear-gradient(135deg, #2d2d3a 0%, #1a1a2e 100%);
    color: #ccc;
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: 0.95rem;
}

footer p {
    margin-bottom: 8px;
    line-height: 1.8;
}

.icp-link {
    color: #aaa !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: color 0.3s ease;
    margin: 0 6px;
}

.icp-link:hover {
    color: #ffd700 !important;
}

/* =========================================
   动画关键帧
   ========================================= */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   滚动入场动画
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.4rem;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-countdown {
        gap: 8px;
    }

    .countdown-block {
        padding: 8px 12px;
        min-width: 56px;
    }

    .countdown-num {
        font-size: 1.3rem;
    }

    .hero {
        background-attachment: scroll;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.6rem;
    }

    nav ul {
        margin-top: 0.5rem;
    }

    nav li {
        margin: 0 0.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .photo-card {
        width: 240px;
    }
}
