/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: white;
    color: black;
    font-size: 16px;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 80px;
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.logo {
    font-size: 26px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    letter-spacing: 2px;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 40px;
    position: relative;
    align-items: center;
}

.nav-links::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.nav-links a {
    text-decoration: none;
    color: black;
    font-size: 18px;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 1px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: black;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: rgba(0, 0, 0, 0.7);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:not(.language-switch),
.dropdown {
    position: relative;
    min-width: 100px;
    text-align: center;
}

/* 语言切换按钮优化 */
.language-switch {
    margin-left: 40px;
    padding: 8px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 15px;
    border-radius: 20px;
    background-color: white;
    color: #333;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 60px;
    text-align: center;
}

.language-switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.05));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.language-switch:hover {
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.language-switch:hover::before {
    transform: translateX(0);
}

.language-switch:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 主要内容区域样式 */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 50px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

/* 在现有的 CSS 中添加以下样式 */
[data-lang] {
    display: none;
}

.nav-links a[data-lang] {
    display: none;
    position: relative;
}

/* 下拉菜单容器 */
.dropdown {
    position: relative;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

/* 下拉触发器样式 */
.dropdown-trigger {
    cursor: pointer;
    text-decoration: none;
    color: black;
    font-size: 18px;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 1px;
}

/* 下拉内容 */
.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: white;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px 0;
    margin-top: 15px;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 下拉菜单项样式 */
.dropdown-content a {
    display: block;
    padding: 12px 20px;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

/* 显示下拉内容 - 悬停时 */
.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 下拉菜单箭头 */
.dropdown-trigger::after {
    content: '▾';
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* 悬停时箭头旋转 */
.dropdown:hover .dropdown-trigger::after {
    transform: rotate(180deg);
}

/* 下拉菜单项悬停效果 */
.dropdown-content a:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 移除下拉菜单项的下划线 */
.dropdown-content a::after {
    display: none;
}

/* 平板电脑尺寸 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .navbar {
        padding: 20px 40px;
    }

    .logo {
        font-size: 28px;
    }

    .nav-links {
        gap: 25px;
    }

    .nav-links a {
        font-size: 16px;
    }

    .nav-links a:not(.language-switch),
    .dropdown {
        min-width: 80px;
    }
}

/* 手机横屏和小平板 (576px - 767px) */
@media screen and (max-width: 767px) {
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .logo {
        font-size: 24px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .nav-links::after {
        width: 90%;
    }

    .language-switch {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 手机竖屏 (小于576px) */
@media screen and (max-width: 575px) {
    .navbar {
        padding: 10px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 14px;
        letter-spacing: 0.5px;
    }

    .nav-links a:not(.language-switch),
    .dropdown {
        min-width: 70px;
    }

    /* 调整下拉菜单在手机上的显示 */
    .dropdown-content {
        min-width: 140px;
        margin-top: 10px;
    }

    .dropdown-content a {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* 调整页脚在手机上的显示 */
    .footer {
        padding: 20px 10px;
        font-size: 14px;
    }

    /* 调整主要内容区域在手机上的内边距 */
    .main-content {
        padding: 30px 15px;
    }
}

/* 超小屏幕设备 (小于360px) */
@media screen and (max-width: 359px) {
    .navbar {
        padding: 8px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .nav-links a:not(.language-switch),
    .dropdown {
        min-width: 60px;
    }

    .language-switch {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* 处理特别高的屏幕 */
@media screen and (min-height: 1000px) {
    .main-content {
        min-height: calc(100vh - 180px);
    }
}

/* 处理屏模式 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 10px 20px;
    }

    .nav-links {
        gap: 15px;
    }

    .main-content {
        min-height: calc(100vh - 100px);
    }

    .footer {
        padding: 15px;
    }
}

/* 轮播图样式优化 */
.slideshow-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    margin: auto;
    overflow: hidden;
    background-color: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 80px;
}

.slide img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.slide-caption {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 200px;
    max-width: 80%;
    text-align: center;
    padding: 15px 40px;
    color: rgb(122, 122, 122);
    font-size: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    z-index: 2;
    letter-spacing: 3px;
    font-weight: 300;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 前后按钮美化 */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(122, 122, 122);
    font-size: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 3;
    opacity: 0.7;
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* 指示点美化 */
.dot-container {
    position: absolute;
    bottom: 25px;
    width: 100%;
    text-align: center;
    z-index: 3;
}

.dot {
    cursor: pointer;
    height: 8px;
    width: 8px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.active, .dot:hover {
    background-color: white;
    transform: scale(1.2);
    border-color: rgba(0, 0, 0, 0.1);
}

/* 淡入淡出动画优化 */
.fade {
    animation-name: fade;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .slideshow-container {
        height: calc(100vh - 180px);
        padding: 0;
    }

    .slide {
        padding: 10px;
    }

    .slide img {
        max-width: 95%;
        max-height: 95%;
        margin: 0 auto;
    }

    .slide-caption {
        bottom: 40px;
        font-size: 14px;
        padding: 12px 20px;
        width: 90%;
        max-width: none;
        min-width: 0;
        letter-spacing: 2px;
    }

    .prev, .next {
        width: 35px;
        height: 35px;
        font-size: 18px;
        opacity: 0.9;
    }

    .prev {
        left: 5px;
    }

    .next {
        right: 5px;
    }

    .dot-container {
        bottom: 10px;
    }

    .dot {
        width: 6px;
        height: 6px;
        margin: 0 4px;
    }
}

/* 超窄屏幕优化 */
@media screen and (max-width: 360px) {
    .slide {
        padding: 15px 35px;
    }

    .slide-caption {
        bottom: 30px;
        font-size: 14px;
        padding: 12px 20px;
        min-width: 160px;
        letter-spacing: 1.5px;
    }

    .prev, .next {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .dot {
        height: 6px;
        width: 6px;
        margin: 0 4px;
    }
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .language-switch {
        margin-left: 20px;
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .slideshow-container {
        height: calc(100vh - 80px);
    }

    .slide {
        padding: 5px 40px;
    }

    .slide img {
        max-height: 80%;
    }

    .slide-caption {
        bottom: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .dot-container {
        bottom: 5px;
    }
}
/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    z-index: 999;
}

.back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.back-to-top::before {
    content: "↑";
    color: white;
    font-size: 24px;
}

@media screen and (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top::before {
        font-size: 20px;
    }
}

/* 大屏幕优化 */
@media screen and (min-width: 1200px) {
    .slide img {
        max-width: 80%;
        max-height: 80%;
    }
}

/* 添加图片链接样式 */
.slide-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 70vh;
    cursor: pointer;
}

.slide-link img {
    max-width: 85%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.slide-link:hover img {
    transform: scale(1.02);
}
.footer {
    color: #222;
}