html,
body {
    max-width: 100%;
    overflow-x: hidden;
    height: 100%;
}

body {
    position: relative;
    box-sizing: border-box;
    background-color: #fafafa;
    font-family: Arial, sans-serif;
    justify-content: center;
    align-items: center;
    margin: 0;
}
.main-div {
    height: 100dvh;
    scroll-snap-type: y mandatory; /* 启用垂直滚动捕捉 */
    overflow-y: scroll; /* 启用垂直滚动 */
    scroll-behavior: smooth; /* 平滑滚动效果 */
    scroll-snap-align: start;
    overflow: auto;
}

.avatar-area-div {
    display: flex;
    flex-direction: column;
    height: 100vh;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    justify-content: center;
}
.ava-div {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.myname-text {
    font-size: 3.5rem;
}
.myname-text .gradient-text {
    background-image: linear-gradient(to right, #8baaf0 0%, #a2d9f5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1));
}
.ava-img-round {
    border-radius: 50%;
    margin-block: 0;
    max-width: 240px;
    max-height: 240px;
}
.info-text-div {
    font-size: 1.2rem;
    text-align: center;
    max-width: 25rem;
}

.hero-tagline {
    max-width: 44rem;
    padding-inline: 1rem;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.65;
}

.hero-tagline span {
    display: block;
}

.hero-tagline span + span {
    margin-top: 0.2rem;
}
.info-area-div {
    margin: 0 auto 0 auto; /* 水平居中 */
    padding-left: 2vw; /* 左侧弹性空距，vw为视口宽度百分比 */
    padding-right: 2vw; /* 右侧留点空间，防止溢出 */
    scroll-snap-align: start;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中 */
}
.info-div {
    display: flex;

    flex-direction: row; /* 横向排列 */
    flex-wrap: wrap;
    align-items: flex-start; /* 顶部对齐 */

    justify-content: center; /* 主轴居中 */

    max-height: max-content; /* 根据内容自动调整高度 */
    /* 让盒子相较于info-area居中 */
    margin-left: 8rem; /* 左侧空距，防止贴边 */
    margin-right: 8rem;
    text-align: left; /* 左对齐 */
    padding-bottom: 10vh; /* 底部留点空间，防止溢出 */
}
.info-box-div {
    margin-right: 4rem; /* 每个信息块之间的间距 */
    max-width: 20rem; /* 限制信息块的最大宽度 */
    max-height: max-content; /* 根据内容自动调整高度 */
    min-width: 6rem; /* 限制信息块的最小宽度 */
    margin-inline: 2.5rem;
}
.info-div a {
    color: #8baaf0;
    text-decoration: none; /* 去掉原有的下划线 */
}
.info-div a:hover {
    color: #78b2ec; /* 鼠标悬停时的颜色 */
    text-decoration: none; /* 鼠标悬停时不显示下划线 */
    border-bottom: 2px solid #8baaf0; /* 鼠标悬停时的下划线颜色 */
}
.info-div a:active {
    color: #2d527a; /* 鼠标点击时的颜色 */
    border-bottom: 2px solid #2d527a; /* 鼠标点击时的下划线颜色 */
}
.info-div ul li {
    margin-top: 0.8em; /* 调整这个值来改变空行的大小 */
}
.info-div ul {
    padding-left: 0em; /* 调整这个值来改变列表项的缩进 */
    list-style: none;
}

.footer-div {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #6c757d;
    scroll-snap-align: end; /* 底部吸附 */
    padding: 5vh;
}
.footer-div a {
    color: #6c757d;
    text-decoration: none;
}
.footer-div a:hover,
.footer-div a:active,
.footer-div a:focus {
    text-decoration: none;
    border-bottom: none;
}
.footer-div p {
    margin-block: 0.5em;
}

/* 添加深色模式样式 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #2e2e2e;
        color: #fff;
    }
}

/* 添加小设备样式 */
@media (max-width: 480px) {
    .myname-text {
        font-size: 2.5rem;
        margin-top: 0.8rem;
    }
    .ava-div {
        align-items: center;
    }
    .info-text-div {
        font-size: 1rem;
        max-width: 90vw;
    }
    .hero-tagline {
        max-width: 92vw;
        padding-inline: 0.75rem;
        font-size: 0.92rem;
        line-height: 1.5;
    }
    .info-div {
        margin-left: 1.6rem;
        font-size: 1rem;
        padding-bottom: 7dvh;
    }
    .ava-img-round {
        width: 40vw;
        height: 40vw;
    }
}

@media (orientation: landscape) {
    .ava-img-round {
        width: 38vh;
        height: 38vh;
    }
}

@media (max-height: 480px) {
    .myname-text {
        font-size: 2.5rem;
        margin-block: 0.8rem;
    }
    .ava-div {
        align-items: center;
    }
    .info-text-div {
        font-size: 1rem;
        max-width: 90vw;
    }
}

/* ============ 公告样式 ============ */

/* 公告横幅 */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #8baaf0 0%, #a2d9f5 100%);
    color: #f2f8ff;
    padding: 1rem;
    z-index: 998;
    box-shadow: 0 4px 15px rgba(139, 170, 240, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    max-width: 900px;
    flex-wrap: wrap;
    justify-content: center;
}

.announcement-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.announcement-content span {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.close-btn {
    background: none;
    border: none;
    color: #f2f8ff;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #f8961e 0%, #ff6b6b 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9e9e9;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    .announcement-banner {
        color: #2c3e50;
    }
    .announcement-modal {
        background: #2e2e2e;
        color: #fff;
    }
    .close-btn {
        color: #2c3e50;;
    }

    .modal-header {
        border-bottom-color: #444;
    }

    .modal-header h2 {
        color: #fff;
    }

    .modal-body {
        color: #ddd;
    }

    .modal-body li {
        color: #ccc;
    }

    .modal-footer {
        border-top-color: #444;
    }

    .btn-secondary {
        background: #444;
        color: #fff;
        border-color: #555;
    }

    .btn-secondary:hover {
        background: #555;
    }
}

/* 移动端响应式 */
@media (max-width: 480px) {
    .announcement-banner {
        padding: 0.8rem;
    }

    .announcement-content {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .announcement-content span {
        min-width: 150px;
    }

    .announcement-modal {
        max-width: 95%;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-footer {
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .announcement-modal {
        width: 94%;
        max-width: 480px;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-footer .btn {
        width: 100%;
    }
}


/* 滚动动画辅助类 */
.scroll-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}
