* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    display: flex;
    justify-content: center;
    height: 100vh;
    padding-top: 76px;
    background-image: url('/src/bg01.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 悬浮顶部导航栏 */
#nav {
    position: fixed;
    top: 16.18px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 1000;
    border: none;
    border-radius: 10em;
    display: flex;
    list-style: none;
    background-color: #f5f5f5;
    box-shadow: 20px 40px 40px #00000033;
    padding: 10px;
    max-width: 75%; /* 新增：限制最大宽度 */
    width: 90vw;      /* 新增：自适应宽度 */
    justify-content: center; /* 新增：居中内容 */
}

#nav .icon {
    height: 40px;
}

#nav > a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}


#nav2 {
    position: fixed;
    top: 16.18px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 1000;
    border-radius: 10em;
    background-color: #f5f5f5;
    box-shadow: 20px 40px 40px #00000033;
    max-width: 90%;
    width: 90vw;
    display: none; /* 默认隐藏，移动端显示 */
    justify-content: center;
    align-items: center;
    padding: 0; /* nav2-inner 负责内边距 */
}

.nav2-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
}

#nav2 .icon {
    height: 40px;
    margin-right: 10px;
}

#nav2-toggle {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    display: flex;
    align-items: center;
}

#nav2-toggle svg {
    display: block;
    width: 32px;
    height: 32px;
    color: rgb(70, 100, 180);
}

#realnav2 {
    position: absolute;
    margin-top: 120px;
    margin-left: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f5f5f5;
    border-radius: 2em;
    box-shadow: 0 8px 32px #00000022;
    padding: 10px 0;
    min-width: 220px;
    width: 100%;
    z-index: 1001;
}

#realnav2 li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#realnav2 li a {
    display: block;
    padding: 12px 32px;
    font: 500 18px "优设标题黑";
    color: rgb(70, 100, 180);
    text-decoration: none;
    border-radius: 1em;
    transition: background 0.2s;
}

#realnav2 li a:hover {
    background: #e0eaff;
}

#nav2 {
    display: none;
}

#nav li a {
    width: 110%;
}

#nav li a {
    position: relative;
    padding: 15px 50px;
    font: 500 20px "优设标题黑";
    border: none;
    outline: none;
    color: rgb(70, 100, 180);
    display: inline-block;
    text-decoration: none;
    z-index: 3;
}

.slide1,
.slide2 {
    position: absolute;
    display: inline-block;
    height: 60px;
    border-radius: 10em;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.38, 1.05);
}

.slide1 {
    background-color: rgb(170, 190, 255);
    z-index: 2;
}

.slide2 {
    opacity: 0;
    background-color: rgba(170, 190, 255, 0.5);
    z-index: 1;
    box-shadow: 0 0 20px #ffffffaa inset;
}

.squeeze {
    transform: scale(0.9);
}

#menu-bg-blur {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
}

#menu-bg-blur.menu-bg-blur-show {
    opacity: 1;
    pointer-events: auto;
}

.menu-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 2000;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px #00000022;
    padding: 1.5rem 1rem;
    width: 90vw;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -40%) scale(0.96);
    transition:
        opacity 0.35s cubic-bezier(.4,0,.2,1),
        transform 0.35s cubic-bezier(.4,0,.2,1);
}

.menu-modal.menu-modal-show {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

@keyframes menuModalFadeIn {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 40px)) scale(0.95);}
    to { opacity: 1; transform: translate(-50%, -50%) scale(1);}
}

.menu-modal-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 40px;
}

.menu-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #4664b4;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.menu-close-btn:hover {
    background-color: #e0eaff;
    transform: rotate(90deg);
}

.menu-close-btn svg {
    width: 24px;
    height: 24px;
}

.menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4664b4;
    margin: 0;
    padding: 0;
}

.menu-modal-nav ul {
    margin: 0.75rem 0 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #eee;
}

.menu-modal-nav li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.menu-modal-nav li:last-child {
    border-bottom: none;
}

.menu-modal-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #4664b4;
    text-decoration: none;
    transition: background 0.2s;
}

.menu-modal-nav a:hover {
    background: #e0eaff;
    border-radius: 0.5rem;
}

#hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform-origin: center center;
    transition: transform 0.5s ease-out;
}

.logo {
    font-size: 15em;
    color: #00000000;
    background-image: url(/src/logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: -20%;
    margin-left: 1.1em;
}

.logo2 {
    display: none;
}

.subtitle {
    color: #fff;
}

/* 页面加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.8s;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #aabeff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 滑动动画 */
body.scrolled #hero .hero {
    transform: translateY(-30%) scale(0.95);
    opacity: 0.2;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

/* 卡片元素动画 */
.card-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.card-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1.05);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-text {
    margin-bottom: 2rem;
}

.tips {
    position: absolute;
    bottom: 15vh;
    font-size: 1.2rem;
    color: #666;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* 自定义滚动条样式 */
/* 隐藏默认滚动条 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* 为body添加自定义滚动条 */
body {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #66ccff transparent;
    /* IE 和 Edge 旧版 */
    -ms-overflow-style: -ms-autohiding-scrollbar;
    /* 防止内容被滚动条覆盖 */
    padding-right: 10px;
}

/* IE 和 Edge 旧版滚动条样式 */
body::-ms-scrollbar {
    width: 10px;
}

body::-ms-scrollbar-track {
    background: transparent;
}

body::-ms-scrollbar-thumb {
    background-color: #66ccff;
    border-radius: 5px;
}

/* Chrome, Edge, Safari */
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background-color: #66ccff;
    border-radius: 5px;
}

/* 确保其他有滚动条的元素也使用自定义滚动条 */
/* Chrome, Edge, Safari */
.scrollable::-webkit-scrollbar {
    width: 10px;
}

/* IE 和 Edge 旧版 */
.scrollable::-ms-scrollbar {
    width: 10px;
}

.scrollable::-ms-scrollbar-track {
    background: transparent;
}

.scrollable::-ms-scrollbar-thumb {
    background-color: #66ccff;
    border-radius: 5px;
}

.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.scrollable::-webkit-scrollbar-thumb {
    background-color: #66ccff;
    border-radius: 5px;
}

.scrollable {
    scrollbar-width: thin;
    scrollbar-color: #66ccff transparent;
}

/* #text 部分样式 */
#text {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #333;
    line-height: 1.8;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#text br {
    margin-bottom: 1rem;
}

#about {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

h2 {
    font-size: 1.8rem;
    color: #66ccff;
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.xss {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    background-color: rgba(230, 240, 255, 0.5);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

/* 开发者展示区域样式 */
h3 {
    font-size: 1.5rem;
    color: #4664b4;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.dev {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1rem 0;
}

.dev span {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    text-align: center;
}

.dev img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0eaff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dev img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-color: #aabeff;
}

.dev a {
    text-decoration: none;
    color: #4664b4;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: color 0.2s ease;
}

.dev a:hover {
    color: #2a4aa0;
    text-decoration: underline;
}