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, #45e855f2, #62c6e7ce);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.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;
}
.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: #218dff;
    text-decoration: none; /* 去掉原有的下划线 */
}
.info-div a:hover {
    color: #0056b3; /* 鼠标悬停时的颜色 */
    text-decoration: none; /* 鼠标悬停时不显示下划线 */
    border-bottom: 2px solid #0056b3; /* 鼠标悬停时的下划线颜色 */
}
.info-div a:active {
    color: #28a745; /* 鼠标点击时的颜色 */
    border-bottom: 2px solid #28a745; /* 鼠标点击时的下划线颜色 */
}
.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 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;
    }
    .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(135deg, #f8961e 0%, #ff6b6b 100%);
    color: white;
    padding: 1rem;
    z-index: 998;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
}

.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: white;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

/* 弹窗样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.announcement-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
    box-sizing: border-box;
    max-height: 92vh;
    overflow: auto;
    animation: slideIn 0.3s ease-out;
}

.announcement-modal-content {
    max-height: 90vh;
    overflow: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: #ff6b6b;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    color: #555;
    line-height: 1.6;
}

.modal-body p {
    margin: 0.8rem 0;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin: 0.5rem 0;
    color: #666;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.modal-footer .btn {
    min-width: 100px;
}

.copy-btn {
    margin-left: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #f0f0f0;
}

.copy-btn:active {
    background: #e6e6e6;
}

.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-modal {
        background: #2e2e2e;
        color: #fff;
    }
    
    .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%;
    }
}