/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #3a3a4a;
    overflow-x: hidden;
    background: #f3f0f7;
}

/* ===== 浅色柔和渐变动画背景 ===== */
.bg {
    position: fixed;
    inset: -10%;
    z-index: -1;
    background: linear-gradient(120deg, #fdeef0, #eef3fb, #eef7f0, #f3eefb, #fbeef4, #eaf0fb);
    background-size: 300% 300%;
    animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 叠加多个柔和光斑，缓慢漂浮 —— 让背景明显有动感 */
.bg::before,
.bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.6;
}

.bg::before {
    width: 45vmax;
    height: 45vmax;
    left: -5%;
    top: -5%;
    background: radial-gradient(circle, rgba(170, 200, 255, 0.55), transparent 60%);
    animation: float1 20s ease-in-out infinite alternate;
}

.bg::after {
    width: 40vmax;
    height: 40vmax;
    right: -5%;
    bottom: -5%;
    background: radial-gradient(circle, rgba(255, 195, 220, 0.5), transparent 60%);
    animation: float2 24s ease-in-out infinite alternate;
}

@keyframes float1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(15vw, 12vh) scale(1.25); }
}

@keyframes float2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-12vw, -10vh) scale(1.2); }
}

/* ===== 布局：真垂直居中，页脚贴底不抢空间 ===== */
.wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 2rem;
    text-align: center;
}

.header,
.links {
    flex: 0 0 auto;
}

/* ===== 内容入场动画 ===== */
.header { animation: rise 0.9s ease-out both; }
.links  { animation: rise 0.9s ease-out 0.15s both; }
.footer { animation: rise 0.9s ease-out 0.3s both; }

@keyframes rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 头部 ===== */
.header h1 {
    font-size: clamp(2.4rem, 8vw, 4rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #2a2a3a;
    margin-bottom: 0.7rem;
}

.tagline {
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    color: #6c6c7e;
    font-weight: 400;
}

.motto {
    margin-top: 0.6rem;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #9a9aab;
    font-style: italic;
}

/* ===== 链接 ===== */
.links {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2.5rem;
}

.links a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 1.1rem 1.5rem;
    border-radius: 16px;
    color: #5a5a6e;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 18px rgba(120, 140, 200, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
}

.links a:hover,
.links a:focus-visible {
    transform: translateY(-5px);
    color: #2a2a3a;
    box-shadow: 0 14px 30px rgba(120, 140, 200, 0.2);
}

.links a:focus-visible {
    outline: 2px solid #8aa8d8;
    outline-offset: 2px;
}

.links svg {
    color: #7a8ab0;
    transition: color 0.28s ease, transform 0.28s ease;
}

.links a:hover svg {
    color: #5a6fa0;
    transform: scale(1.1);
}

/* ===== 页脚 ===== */
.footer {
    margin-top: 4rem;
}

.beian {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.8rem;
    color: #a0a0b0;
}

.beian a {
    color: #a0a0b0;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.beian a:hover {
    color: #6a6a7e;
    text-decoration: underline;
}

.beian-icon {
    color: #8a8a9a;
    flex: 0 0 auto;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .links { gap: 1rem; margin-top: 2rem; }
    .links a { padding: 0.85rem 1.1rem; }
    .footer { margin-top: 3rem; }
}

@media (max-width: 380px) {
    .links a span { font-size: 0.8rem; }
    .beian { gap: 0.6rem; font-size: 0.72rem; }
}

/* ===== 减弱动画（无障碍） ===== */
@media (prefers-reduced-motion: reduce) {
    .bg, .bg::before, .bg::after { animation: none; }
    .header, .links, .footer { animation: none; }
    .links a, .links svg { transition: none; }
}
