
/*html,*/
/*body {*/
/*    position: relative;*/
/*    height: 100%;*/
/*}*/

body {
    background: rgba(33,33,33,1);
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #000;
    margin: 0;
    padding: 0;
    height: auto;
    display: flex;
    flex-direction: column;

}
main{
    flex-grow: 1;
    margin-top: 60px;
    color: white;
}



.logo {
    margin-right: 1rem; /* 与网站名称间距 */
    transition: all 0.3s ease;
}
.logo img {
    max-height: 3rem; /* 48px，原45px */
    width: auto;
}

.webname {
    display: flex;
    flex-direction: column; /* 垂直排列两行文字 */
    justify-content: center;
    margin-right: 2rem; /* 与导航菜单间距 */
    transition: all 0.3s ease;
}
.webname a:first-child {
    font-size: 1.5rem; /* 24px，原25px */
    line-height: 1.2;
}
.webname a:last-child {
    font-size: 1rem; /* 16px，原17px */
    line-height: 1.2;
    margin-top: 0.25rem;
}

.webname a {
    font-size: 25px;
    text-decoration: none; /*下划线取消*/
    color: #ffffff;
    white-space: nowrap; /* 防止文字换行 */
}

.webname a:hover {
    color: #ffffff;
    /*color: #e28b01;*/

}
/* 用户区域样式 */
.user-area {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    /*padding: 10px 15px;*/
    border-radius: 30px;
    transition: background 0.3s ease;
    justify-self: right;
    margin-right: 30px;
    color: #ffffff;
}
.user-area a {
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  height: 100%; /* 继承父元素高度，确保垂直居中生效 */
}

.user-name {
    font-size: 1rem; /* 16px */
    margin-right: 0.75rem;
    
}
.user-avatar {
    width: 3rem; /* 48px，原45px */
    height: 3rem;
}

.user-area:hover .user-avatar {
    transform: scale(1.1);
    border-color: #e28b01;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}
/* 头像下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    color: white;
    background: #2b2b2b;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgb(255, 255, 255);
    padding: 20px;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
}

.user-area:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 25px;
    width: 20px;
    height: 20px;
    background: #2b2b2b;
    transform: rotate(45deg);
    box-shadow: -3px -3px 5px rgba(0, 0, 0, 0.05);
}

.user-header {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.dropdown-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    border: 3px solid #e28b01;
    margin-right: 15px;
}
.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.user-info h3 {
    font-size: 25px;
    color: white;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 14px;
    color: #7f8c8d;
}

.membership-level {
    display: inline-block;
    /*background: linear-gradient(90deg, #ffb347, #ffcc33);*/
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}
.level-1 { background-color: #4e4e4e; }
.level-2 { background-color: #3498db; }
.level-3 { background-color: #9b59b6; }
.level-4 { background-color: #e67e22; }

.menu-items {
    list-style: none;
    margin: 15px 0;
    padding: 0; /* 清除默认内边距 */
    display: flex; /* 保持flex布局 */
    flex-direction: column; /* 关键：设置为竖向排列 */
    gap: 8px; /* 项之间的间距（可选，增强美观） */
}

.menu-items li {
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center; /* 图标和文字垂直居中 */
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%; /* 占满下拉菜单宽度 */
    box-sizing: border-box; /* 确保padding不影响宽度计算 */

}

.menu-items li:hover {
    background: #4e4e4e;
    transform: translateX(5px);
}

.menu-items li i {
    width: 25px;
    color: #ffffff;
    font-size: 18px;
    margin-right: 12px;
}

.menu-items li span {
    font-size: 15px;
    color: white;
    font-weight: 500;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 10px;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}
.nav_login_button {
    width: 5.625rem; /* 90px */
    height: 1.875rem; /* 30px */
    font-size: 0.9375rem; /* 15px */
    margin-right: 0.625rem; /* 10px */
}
.nav_login_button:hover {
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgb(255, 255, 255);
}
.nav_login {
    justify-self: right;
    /*float: right;*/
    /*list-style: none;*/
    /*margin-top: 10px;*/
    margin-right: 20px;
    /*width: 160px;*/
    width: auto;
    height: 40px;
    border-radius: 8px;
    line-height: 40px; /*文字竖向居中*/
    text-align: center; /*文字横向居中*/
}
.nav_login a {
    text-decoration: none; /*下划线取消*/
}
/* 新增通知徽章样式 */
.notification-badge {
    position: absolute;
    top: -3px; /* 向下偏移 */
    right: -8px; /* 向右偏移 */
    background-color: #ff3b30; /* 红色背景 */
    color: white; /* 白色文字 */
    border-radius: 50%; /* 圆形 */
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.0rem;
    line-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-align: center;
    font-weight: bold;
    display: none; /* 默认隐藏 */
    z-index: 10; /* 确保显示在头像上方 */
    min-width: 20px; /* 确保数字少时也保持圆形 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* 轻微阴影增加立体感 */
}

/* 头像容器 - 确保相对定位 */
.avatar-container {
    position: relative; /* 关键：使徽章相对于头像定位 */
    display: inline-block;
}

.nav_list {
    /*float: left;*/

    justify-self: center;
    /*margin-top: 20px;
    width: 70%;*/
    font-weight: bold;

}

.top-nav {
    display: grid;
    grid-template-columns: auto auto 1fr auto; /* 自适应列宽，不固定比例 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0; /* 确保占满宽度 */
    height: 4.0rem; /* 72px，使用rem单位 */
    background-color: rgba(33, 33, 33, 0.8);
    transition: all 0.3s ease;
    z-index: 5000;
    align-items: center;
    padding: 0 1.5rem; /* 左右内边距 */
    box-sizing: border-box;
}

.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: inherit;
}

.top-nav ul li {
    margin: 0 15px;
    white-space: nowrap; /* 防止文字换行 */
    position: relative; /* 为下拉菜单定位准备 */

}

.top-nav ul li a {
    text-decoration: none;
    color: #ffffff; /* 导航栏文字颜色 */
    font-size: 16px;
}

.top-nav ul li a:hover {
    color: #e28b01; /* 导航栏文字颜色 */
    font-size: 16px;
}

/* 中等屏幕（≤1200px）：首先隐藏LOGO */
@media screen and (max-width: 1200px) {
    .logo {
        display: none; /* 第一步：隐藏LOGO */
    }
    /* 整体轻微缩放 */
    .top-nav {
        height: 4rem; /* 64px */
        padding: 0 1.25rem;
    }
    .webname a:first-child { font-size: 1.375rem; } /* 22px */
    .webname a:last-child { font-size: 0.9375rem; } /* 15px */
    .nav_list ul { gap: 1.25rem; } /* 20px */
}

/* 小屏幕（≤900px）：隐藏网站名称，继续缩小 */
@media screen and (max-width: 900px) {
    .webname {
        display: none; /* 第二步：隐藏网站名称 */
    }
    /* 进一步缩放 */
    .top-nav {
        height: 3.5rem; /* 56px */
        padding: 0 1rem;
    }
    .nav_list ul li a { font-size: 0.9375rem; } /* 15px */
    .user-avatar { width: 2.5rem; height: 2.5rem; } /* 40px */
    .nav_login_button {
        width: 5rem; /* 80px */
        font-size: 0.875rem; /* 14px */
    }
}

/* 超小屏幕（≤600px）：不隐藏核心内容，整体等比例缩小 */
@media screen and (max-width: 600px) {
    .top-nav {
        height: 3rem; /* 48px */
        padding: 0 0.75rem;
        transform: scale(0.95); /* 整体缩放95% */
        transform-origin: left center; /* 缩放原点：左侧居中，避免右侧溢出 */
    }
    .nav_list ul {
        gap: 1rem; /* 16px */
    }
    .nav_list ul li a { font-size: 0.875rem; } /* 14px */
    .user-name { font-size: 0.875rem; }
    .nav_login_button {
        width: 4.375rem; /* 70px */
        height: 1.75rem; /* 28px */
        font-size: 0.8125rem; /* 13px */
    }
}

/* 极小屏幕（≤480px）：极限缩放，确保所有元素可见 */
@media screen and (max-width: 480px) {
    .top-nav {
        transform: scale(0.9); /* 整体缩放90% */
    }
    .nav_list ul {
        gap: 0.75rem; /* 12px */
    }
}

.swiper {
    width: 100%;
    height: 600px; /* 桌面端保持原高度 */
    box-sizing: border-box;
    padding-top: 60px; /* 新增：避开固定导航栏（原main的margin-top无效，轮播图在main外） */
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    /*max-height: 600px;*/
    object-fit: cover;
}
/* 平板端（≤1024px）：降低轮播高度 */
@media screen and (max-width: 1024px) {
    .swiper { height: 400px; }
}

/* 手机端（≤768px）：进一步降低 */
@media screen and (max-width: 768px) {
    .swiper { height: 300px; }
}

/* 超小手机端（≤480px）：适配小屏 */
@media screen and (max-width: 480px) {
    .swiper { height: 200px; }
    /* 隐藏轮播控制按钮（避免占空间） */
    .swiper-button-next, .swiper-button-prev { display: none; }
}
.autoplay-progress {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--swiper-theme-color);
}

.autoplay-progress svg {
    --progress: 0;
    position: absolute;
    left: 0;
    top: 0px;
    z-index: 10;
    width: 100%;
    height: 100%;
    stroke-width: 4px;
    stroke: var(--swiper-theme-color);
    fill: none;
    stroke-dashoffset: calc(125.6 * (1 - var(--progress)));/*描边线的偏移量为正数时往左偏移。*/
    stroke-dasharray: 125.6;/*将描边线变成虚线、其中实线和虚线部分的长度就是它的值，*/
    transform: rotate(-90deg);
}


/* 下拉菜单样式 */
.nav_list .submenu {
    display: none;
    position: absolute;
    top: 100%; /* 显示在主菜单下方 */
    left: -10px;
    background: rgba(0, 0, 0, 0.2);
    min-width: 60px;
    box-shadow: 0 10px 15px rgb(255, 255, 255);
    border-radius: 10px;
    z-index: auto;
}
/* 导航菜单样式：使用相对单位 */
.nav_list ul {
    display: flex;
    gap: 1.5rem; /* 菜单项间距 */
}
.nav_list ul li a {
    font-size: 1rem; /* 16px */
    transition: all 0.3s ease;
}

/* 悬停显示下拉菜单 */
.nav_list li:hover .submenu {
    display: block;
    background: rgba(0, 0, 0, 0.2);


}

/* 下拉菜单项样式 */
.submenu li {
    display: block;
    border-bottom: 1px solid #555;
    height: 40px;
    line-height: 40px;
}

/* 悬停效果 和前面有冲突我就取消了
nav a:hover {
    background: rgba(0,0,0,0.1);
}*/

/* 下拉菜单项悬停效果 */
.submenu a:hover {
    background: rgba(200, 47, 47, 0.1);
}


