/* =========================
   站点基础配色 & 基础排版
   ========================= */
:root {
    --primary: #1a3a5f;
    --secondary: #2d6b9a;
    --accent: #41b883;
    --accent-dark: #359e6d;
    --light: #e8f4fc;
    --lighter: #f5fbff;
    --dark: #0a1e33;
    --text: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

body {
    background-color: var(--lighter);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    padding: 0;
}

/* ===============================
雪花动画
============================== */

.snow-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    /* 不拦截点击 */
    z-index: 950;
    /* 低于导航(1000)与预加载(10000) */
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10vh;
    /* 从视口上方进入 */
    left: var(--x, 0%);
    width: var(--size, 8px);
    height: var(--size, 8px);
    border-radius: 50%;
    opacity: var(--opacity, .85);
    background: radial-gradient(closest-side,
            rgba(255, 255, 255, .95),
            rgba(255, 255, 255, .55) 60%,
            rgba(255, 255, 255, 0) 70%);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6));
    will-change: transform;
    animation: snow-fall var(--dur, 14s) linear var(--delay, 0s) infinite;
}

/* 雪花下落关键帧：加入 '--wind' 横向风 */
@keyframes snow-fall {
    to {
        transform: translate3d(calc(var(--drift, 0px) + var(--wind, 0px)), 110vh, 0) rotate(360deg);
    }
}

/* 表情雪花（可选样式） */
.snowflake--emoji {
    background: none;
    width: auto;
    height: auto;
    line-height: 1;
    font-size: var(--size, 14px);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6));
}

/* 关怀设置：系统“减少动效”时自动关闭 */
@media (prefers-reduced-motion: reduce) {
    .snow-layer {
        display: none;
    }
}


/* =========================
     Preloader（加载动画）
     ========================= */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #e6f2ff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-image {
    width: 200px;
    height: 200px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
     顶部导航栏（含下拉/移动端）
     ========================= */
nav {
    /* 初始：极轻微的玻璃态（给个很小的透明度，便于看到 blur 质感） */
    background: rgba(224, 237, 255, .12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* Safari */
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
    transition: background .5s ease, box-shadow .5s ease, transform .5s ease;
}

/* 向下滚动隐藏导航（平滑上移） */
nav.nav-hide {
    transform: translateY(-110%);
}

/* 滚动后样式（JS 给 <nav id="navbar"> 添加 .scrolled） */
/* 滚动后：出现浅色半透明背景与阴影 */
nav.scrolled {
    background: rgba(224, 237, 255, .92);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

/* 如果之前有 transform: translateY(-100%) 逻辑隐藏导航，可用 JS 再叠加一个类控制，这里移除默认上移 */

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

.logo .logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo .logo-link:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.logo img {
    width: 280px;
    height: 90px;
    margin-top: 15px;
    /* 控制 LOGO 垂直视觉位置 */
    margin-bottom: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* 顶部导航链接 */
.nav-links a {
    color: #5ea1fc;
    /* 顶部链接为蓝色 */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: #5ea1fc;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #5ea1fc;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
}

/* 移动端菜单按钮（汉堡） */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* 下拉菜单（桌面端悬停展开） */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.dropdown-menu li {
    padding: 0;
    list-style: none;
}

.dropdown-menu a {
    display: inline-block;
    padding: 10px 20px;
    color: #5ea1fc !important;
    transition: background-color 0.3s ease;
    border-radius: 0;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 0;
    height: 2px;
    background: #5ea1fc;
    transition: width 0.3s ease;
}

.dropdown-menu a:hover::after {
    width: calc(100% - 20px);
}

/* 移动端导航（≤768px：覆盖为全屏抽屉） */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        inset: 0 0 0 0;
        width: 100%;
        height: 100vh;
        background: rgba(26, 58, 95, 0.95);
        flex-direction: column;
        justify-content: center;
        padding: 20px 5%;
        gap: 25px;
        z-index: 999;
        backdrop-filter: blur(5px);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* 移动端下拉：点击展开 */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin-left: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding: 8px 15px;
        font-size: 1rem;
    }

    .dropdown-toggle .fa-chevron-down {
        transition: transform 0.3s ease;
    }

    .dropdown.active .dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* =========================
     返回顶部按钮
     ========================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #5ea1fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(94, 161, 252, 0.4);
    transition: var(--transition);
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    border: none;
    outline: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #4a8ef7;
    transform: translateY(-5px);
}

/* =========================
     Footer
     ========================= */

/* —— 容器：满幅、三段高度：top 45% / bottom 45% / copyright 10% —— */
.site-footer {
    height: 53vh;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    /* 全幅出血 */
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background-color: transparent;
    /* 如需白底可改成 #fff */
}

/* ========== 顶部（透明） ========== */
.footer-top {
    height: 18vh;
    margin: 0;
    width: 100%;
    /* 无间隙 */
    border-radius: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.gif-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.full-height-gif {
    height: 100%;
    width: auto;
    min-width: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
}




/* ========== 中部（赞助商 / 学校） ========== */
.footer-bottom {
    height: 30vh;
    position: relative;
    /* 用绝对定位摆放两个 1/3 宽的区块 */
    padding: 0;
    overflow: hidden;
    background-color: #08284d;
}

/* 两个区块：宽 1/3 屏，高度占满 footer-bottom，垂直居中 */
.sponsors-section,
.school-section {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 33.333vw;
    height: 35vh;
    min-width: 300px;
    overflow: hidden;
}

/* sponsors-section：中心对齐左侧三等分线（33.333%）→ left = 16.666% */
.sponsors-section {
    left: 16.666vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* sponsor-title：上半区；sponsor-slider：下半区，宽 80% 居中 */
.sponsor-title {
    height: 9vh;
    margin-bottom: 3vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-size: 2.2rem;
    letter-spacing: 4px;
    color: #4fc3f7;
    position: relative;
}

.sponsor-title::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4fc3f7, transparent);
}

.sponsor-slider {
    --dist: 0px;
    /* 一次动画应滚动的真实距离（JS写入） */
    --dur: 18s;
    /* 动画时长（JS按距离自适应写入） */
    height: 15vh;
    width: 45vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 57, 102, .4);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(79, 195, 247, .2);
    border: 1px solid rgba(79, 195, 247, .1);
}

.slider-track {
    display: flex;
    align-items: center;
    gap: 28px;
}

/* 统一每张卡片的盒子尺寸 */
.sponsor-slide {
    flex: 0 0 auto;
    width: 200px;
    /* 你想要的统一宽度 */
    height: 15vh;
    /* 你想要的统一高度 */
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    /* 背景垫底可选 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    /* 留点内边距避免贴边 */
    box-sizing: border-box;
}

/* 图片在盒子内等比缩放，完整显示 */
.sponsor-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 关键：不裁剪，等比缩放 */
    image-rendering: auto;
}

/* 开启动画的状态（由JS加上） */
.sponsor-slider.is-animating .slider-track {
    animation: scroll var(--dur) linear infinite;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-1 * var(--dist)));
    }

    /* 精确滚动“前半段”的总宽 */
}

/* 交互细节：悬停暂停（可选） */
.sponsor-slider:hover .slider-track {
    animation-play-state: paused;
}

/* 无障碍：尊重系统“减少动效” */
@media (prefers-reduced-motion: reduce) {
    .sponsor-slider.is-animating .slider-track {
        animation: none;
    }
}

/* .sponsor-logo{
    max-height: 15vh;
    transition: transform .3s, filter .3s;
  } */
.sponsor-logo:hover {
    filter: grayscale(0) brightness(100%);
    transform: scale(1.05);
}


/* school-section：中心对齐右侧三等分线（66.666%）→ left = 50% */
.school-section {
    left: 50vw;
}

.school-title {
    height: 5vh;
    text-transform: uppercase;
    font-size: 1.6rem;
    letter-spacing: 3px;
    margin-top: 3vh;
    margin-bottom: 1vh;
    color: #4fc3f7;
    text-align: center;
}

.school-logos,
.qrcodes {
    display: flex;
    justify-content: space-around;
}

.school-logos {
    height: 10vh;
    align-items: center;
}

.qrcodes {
    height: 10vh;
    align-items: center;
}

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

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(79, 195, 247, 0.8));
}

.logo-img {
    width: 9vh;
    height: 9vh;
    background: rgba(16, 57, 102, .4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(79, 195, 247, .3);
    box-shadow: 0 0 20px rgba(79, 195, 247, .2);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo-img:hover {
    background: rgba(16, 57, 102, .6);
    border-color: rgba(79, 195, 247, .5);
    box-shadow: 0 0 30px rgba(79, 195, 247, .4);
}

.logo-img i {
    font-size: 50px;
    color: #4fc3f7;
    transition: color 0.3s ease;
}

.logo-img:hover i {
    color: #81d4fa;
}

.qrcode-img {
    width: 7vh;
    height: 7vh;
    background: rgba(255, 255, 255, .9);
    border-radius: 8px;
    margin: 0 auto 10px;
    box-shadow: 0 0 15px rgba(79, 195, 247, .3);

    /* 为放大做准备 */
    position: relative;
    /* 形成层叠上下文，配合 z-index 控制层级 */
    overflow: visible;
    /* 允许放大后超出容器显示 */
    display: block;
    /* 不需要再用 flex 居中 */
}

/* 图片填满容器 + 平滑放大 */
.qrcode-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    /* 二维码不变形 */
    image-rendering: pixelated;
    /*（可选）二维码边缘更清晰 */
    transform-origin: center center;
    transition: transform 240ms ease, filter 240ms ease, box-shadow 240ms ease;
    will-change: transform;
    position: relative;
    z-index: 2;
    border-radius: 5px;
    /* 盖过容器背景 */
}

/* 悬停/键盘聚焦/按下：放大 3 倍并加阴影 */
.qrcode-img:hover img,
.qrcode-img:focus-within img,
.qrcode-img:active img {
    transform: scale(2);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .25));
}

/* 放大时提高整体层级，避免被周围元素遮住 */
.qrcode-img:hover,
.qrcode-img:focus-within,
.qrcode-img:active {
    z-index: 9999;
}


/* ========== 底部版权（贴底 10%） ========== */
.copyright {
    background-color: #08284d;
    overflow: hidden;
    height: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
    padding: 0 16px;
    margin: 0%;
}

.copyright a {
    color: #ffffff;
    text-decoration: underline;
}

/* ========== 响应式：小屏回落 ========== */
@media (max-width: 1024px) {
    .site-footer {
        height: auto;
        min-height: 60vh;
    }

    .footer-top {
        height: 40vh;
    }

    .footer-bottom {
        height: auto;
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 20px;
    }

    .sponsors-section,
    .school-section {
        position: static;
        transform: none;
        width: min(92vw, 900px);
        height: auto;
        min-width: unset;
    }



    .sponsor-slider {
        width: 100%;
        min-height: 120px;
    }

}



/* 为 Chrome、Safari 和 Opera 隐藏滚动条 */
html::-webkit-scrollbar {
    display: none;
    width: 0px;
}

/* 为 IE、Edge 和 Firefox 隐藏滚动条 */
html {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}