:root {
    --bg: #f8f9fa;
    --text: #2c3e50;
    --primary: #4a6cf7;
    --primary-light: #6a8cf7;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
    --nav-menu-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --nav-text: #ffffff;
    --nav-text-scrolled: #088AD6;
    --nav-menu-text: #088AD6;
    /* 浅色模式：较亮 */
    --hero-overlay-alpha: 0.1;
    --about-overlay-alpha: 0.25;
    /* ---------------------------------- */
    /* 浅色模式背景颜色 */
    --primary-bg: #ffffff;
    /* 文本颜色 */
    --text-color: #333333;
    /* 悬停时背景颜色 */
    --hover-bg: #f0f0f0;
    /* 焦点边框颜色 */
    --primary-color: #007bff;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #f5f5f7;
    --card-bg: #1e1e2e;
    --nav-bg: rgba(30, 30, 46, 0);
    --nav-bg-scrolled: rgba(30, 30, 46, 0.95);
    --nav-menu-bg: rgba(30, 30, 46, 0.95);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --nav-text: #ffffff;
    --nav-text-scrolled: #f5f5f7;
    --nav-menu-text: #f5f5f7;
    /* 深色模式：hero 更暗 */
    --hero-overlay-alpha: 0.4;
    /* 关于页在深色下稍亮一点（0.45 < 0.6）*/
    --about-overlay-alpha: 0.45;
    /* 深色模式背景颜色 */
    --primary-bg: #333333;
    /* 文本颜色 */
    --text-color: #ffffff;
    /* 悬停时背景颜色 */
    --hover-bg: #444444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
    text-align: center;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 max(15px, calc((100% - 1400px) / 2));
    text-align: center;
}

.text-center {
    text-align: center;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 2. 隐藏H1样式（仅供搜索引擎索引，不显示在页面） */
.seo-hidden-h1 {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 导航栏核心优化 - 手机端动画+模糊效果+黑白模式适配 */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        background-color 0.5s ease,
        color 0.5s ease,
        height 0.3s ease,
        backdrop-filter 0.5s ease,
        -webkit-backdrop-filter 0.5s ease;
    animation: navSlideDown 0.6s ease-out forwards;
}

/* 导航栏滑入动画（手机端） */
@keyframes navSlideDown {
    0% {
        top: -70px;
        opacity: 0;
    }

    100% {
        top: 0;
        opacity: 1;
    }
}

/* 滚动/非首页状态 */
.navbar.scrolled,
.navbar.non-home-light {
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 手机端导航栏高度适配 */
@media (max-width: 768px) {
    .navbar {
        height: 80px !important;
    }
}

/* 导航文字颜色 */
.navbar .site-name,
.navbar .nav-menu a {
    color: var(--nav-text);
    transition: color 0.5s ease;
}

.navbar.scrolled .site-name,
.navbar.scrolled .nav-menu a,
.navbar.non-home-light .site-name,
.navbar.non-home-light .nav-menu a {
    color: var(--nav-text-scrolled);
}

/* 汉堡按钮颜色适配 */
.navbar .hamburger span {
    background: var(--nav-text);
    transition: background 0.5s ease;
}

.navbar.scrolled .hamburger span,
.navbar.non-home-light .hamburger span {
    background: var(--nav-text-scrolled);
}

/* 2. 修复白色模式下关于作者页面导航栏透明效果 */
.navbar.non-home-light:not(.about-page) {
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 关于作者页面导航栏强制透明（无论浅色/深色模式） */
.navbar.about-page {
    background: var(--nav-bg) !important;
}


.nav-container {
    width: 100%;
    max-width: 1100px;
    /*设置屏幕宽度*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
}

.hamburger {
    display: none;
    cursor: pointer;
    width: 24px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    margin-bottom: 4px;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.nav-menu a {
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 8px 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

/* 导航链接交互效果 */
.nav-menu a:hover,
.nav-menu a.active {
    color: #088AD6;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #088AD6;
    transform: scaleX(1);
    transition: transform 0.3s;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #088AD6;
    transform: scaleX(0);
    transition: transform 0.3s;
}

/* 深色模式下导航链接hover颜色适配 */
[data-theme="dark"] .nav-menu a:hover,
[data-theme="dark"] .nav-menu a.active {
    color: #80c8f8;
}

[data-theme="dark"] .nav-menu a:hover::after,
[data-theme="dark"] .nav-menu a.active::after {
    background: #80c8f8;
}

[data-theme="dark"] .nav-menu a::after {
    background: #80c8f8;
}

/* 导航链接点击效果 */
.nav-menu a:active {
    transform: scale(0.95);
    color: #066cad;
}

.nav-menu a:active::after {
    background: #066cad;
}

[data-theme="dark"] .nav-menu a:active {
    color: #66b8e8;
}

[data-theme="dark"] .nav-menu a:active::after {
    background: #66b8e8;
}

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, var(--hero-overlay-alpha)),
            rgba(0, 0, 0, var(--hero-overlay-alpha))),
        url('../img/background/background.jpg') center/cover no-repeat;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: white;
}

.typewriter {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    min-height: 1.8em;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid white;
    color: white;
    transition: all 0.3s;
    white-space: nowrap;
    background: transparent;
}

.btn:hover {
    background: white;
    color: #088AD6;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* 服务板块 */
.services {
    padding: 80px 0;
    background: var(--bg);
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--text);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #088AD6;
    margin: 10px auto 0;
    border-radius: 2px;
}

[data-theme="dark"] .section-title::after {
    background: #80c8f8;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.service-card {
    flex: 1 1 300px;
    max-width: 380px;
    padding: 30px;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.service-card.active {
    opacity: 1;
    transform: translateY(0);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #088AD6;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .service-icon {
    color: #80c8f8;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text);
    opacity: 0.8;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* 推荐网站板块 - 全局流式布局 */
.website-list-section {
    padding: 60px 0 80px;
    background: var(--bg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.website-container {
    width: 100%;
    padding: 10px 0;
}

.website-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0;
    margin: 0;
    width: 100%;
}

.website-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex: 1 1 300px;
    max-width: 380px;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s;
    cursor: pointer;
    /* 鼠标悬浮显示手型 */
}

.website-item.active {
    opacity: 1;
    transform: translateY(0);
}

.website-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 推荐网站图标样式（无背景+图片占满+阴影） */
.website-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    overflow: hidden;
    /* 确保图片不溢出 */
}

.website-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 图片完全占满容器 */
    transition: transform 0.3s ease;
    /* 过渡效果 */
}

/* 鼠标悬浮图标放大 */
.website-item:hover .website-icon img {
    transform: scale(1.05);
}

.website-info {
    text-align: left;
}

.website-info h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 5px;
}

.website-info p {
    font-size: 0.95rem;
    color: var(--text);
    opacity: 0.8;
    line-height: 1.5;
}

/* 下载页面 */
#download.page.active {
    margin-top: 70px;
    padding-top: 20px;
}

.download-section {
    padding: 60px 0 80px;
    background: var(--bg);
}

/* 操作系统底部距离 */
.OS-section {
    padding: 60px 0 80px;
    background: var(--bg);
}

.download-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.software-card {
    flex: 1 1 220px;
    max-width: 280px;
    min-height: 90px;
    padding: 18px;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    text-align: left;
    cursor: pointer;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 下载页图标样式（无背景+图片占满+阴影） */
.software-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.software-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 图片完全占满容器 */
    transition: transform 0.3s ease;
    /* 过渡效果 */
}

/* 鼠标悬浮图标放大 */
.software-card:hover .software-icon img {
    transform: scale(1.05);
}

/* 优化下载页标题+标签不换行 */
.software-info h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    /* 禁止换行 */
    white-space: nowrap;
    /* 文字不换行 */
}

.software-info p {
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.8;
    line-height: 1.5;
}

.tag {
    font-size: 0.75rem;
    background: #e8f5e8;
    color: #2e7d32;
    padding: 3px 6px;
    border-radius: 3px;
    margin-left: 6px;
    flex-shrink: 0;
    /* 标签不压缩 */
}

[data-theme="dark"] .tag {
    background: #2e7d32;
    color: #e8f5e8;
}

/* 关于作者 - 全屏背景+导航栏下无空白 */
#about.page.active {
    margin-top: 0;
    padding-top: 0;
    display: block;
}

.about-section {
    min-height: 100vh;
    padding: 70px 15px 60px;
    /* 顶部padding等于导航栏高度，消除空白 */
    background: linear-gradient(rgba(0, 0, 0, var(--about-overlay-alpha)),
            rgba(0, 0, 0, var(--about-overlay-alpha))),
        url('../img/avatar/background.jpg') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .about-section {
        padding-top: 60px;
        /* 手机端导航栏高度适配 */
    }
}

.about-wrapper {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 100px;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.about-wrapper:hover {
    transform: scale(1.02);
}

[data-theme="dark"] .about-wrapper {
    background: rgba(30, 30, 46, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--card-bg);
    margin-bottom: 25px;
    object-fit: cover;
}

.about-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #088AD6;
}

[data-theme="dark"] .about-wrapper h2 {
    color: #80c8f8;
}

.about-wrapper p {
    margin: 8px 0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-wrapper p:nth-child(4) {
    color: #088AD6;
}

.about-wrapper p:nth-child(5) {
    color: #066cad;
}

.about-wrapper p:nth-child(6) {
    color: #044c7a;
}

[data-theme="dark"] .about-wrapper p:nth-child(4) {
    color: #80c8f8;
}

[data-theme="dark"] .about-wrapper p:nth-child(5) {
    color: #99d2fa;
}

[data-theme="dark"] .about-wrapper p:nth-child(6) {
    color: #cceeff;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    opacity: 0.9;
    background: #088AD6;
}

[data-theme="dark"] .social-btn {
    opacity: 1;
}

[data-theme="dark"] .social-btn:nth-child(1) {
    background: #3584e4;
}

[data-theme="dark"] .social-btn:nth-child(2) {
    background: #42a5f5;
}

[data-theme="dark"] .social-btn:nth-child(3) {
    background: #f44336;
}

[data-theme="dark"] .social-btn:nth-child(4) {
    background: #ff9800;
}

.social-btn:nth-child(1) {
    background: #1a73e8;
}

.social-btn:nth-child(2) {
    background: #088AD6;
}

.social-btn:nth-child(3) {
    background: #ff0000;
}

.social-btn:nth-child(4) {
    background: #ffa500;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
    display: none;
}

[data-theme="dark"] .footer {
    background: #1a1a2e;
}

.footer h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #088AD6;
}

[data-theme="dark"] .footer h4 {
    color: #80c8f8;
}

.footer a {
    color: #4a6cf7;
}

[data-theme="dark"] .footer a {
    color: #8093f1;
}

/* 响应式断点 */
@media (max-width: 1200px) {
    .software-card {
        flex: 1 1 200px;
        max-width: 260px;
    }
}

@media (max-width: 992px) {
    .software-card {
        flex: 1 1 180px;
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    .navbar {
        height: 60px;
    }

    .nav-container {
        padding: 0 15px;
        max-width: 100%;
    }

    .hamburger {
        display: block;
    }

    /* 手机端菜单改为从导航栏下方弹出，默认隐藏 */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-menu-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: flex-start;
        padding: 0 40px;
        transition: all 0.3s ease;
        z-index: 999;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        visibility: hidden;
        opacity: 0;
    }

    .nav-menu.active {
        max-height: 500px;
        padding: 20px 40px 30px;
        visibility: visible;
        opacity: 1;
        gap: 20px;
    }

    .nav-menu a {
        font-size: 1.4rem;
        margin: 0;
        color: var(--nav-menu-text) !important;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-menu.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* 每个链接的动画延迟 */
    .nav-menu.active a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-menu.active a:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-menu.active a:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-menu.active a:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-menu.active a:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-menu.active a:nth-child(6) {
        transition-delay: 0.35s;
    }

    /* 汉堡按钮动画 */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .typewriter {
        font-size: 1.2rem;
    }

    .buttons {
        gap: 12px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .software-card {
        flex: 1 1 45%;
        max-width: 45%;
    }

    .about-wrapper {
        padding: 25px 20px;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .about-wrapper h2 {
        font-size: 1.5rem;
    }

    /* 手机端推荐网站适配 */
    .website-item {
        flex: 1 1 45%;
        max-width: 45%;
        padding: 12px 20px;
    }

    .website-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .typewriter {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .social-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .software-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* 手机小屏推荐网站适配 */
    .website-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
}