/* 把我们所有标签的内外边距清零 */
* {
    margin: 0;
    padding: 0;
    /* css3盒子模型 */
    box-sizing: border-box;
}

/* em 和 i 斜体的文字不倾斜 */
em,
i {
    font-style: normal
}

/* 去掉li 的小圆点 */
li {
    list-style: none
}

img {
    /* border 0 照顾低版本浏览器 如果 图片外面包含了链接会有边框的问题 */
    border: 0;
    /* 取消图片底侧有空白缝隙的问题 */
    vertical-align: middle
}

button {
    /* 当我们鼠标经过button 按钮的时候，鼠标变成小手 */
    cursor: pointer
}

a {
    color: #666;
    text-decoration: none
}

a:hover {
    color: #c81623
}

button,
input {
    /* "\5B8B\4F53" 就是宋体的意思 这样浏览器兼容性比较好 */
    font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
    /* 默认有灰色边框我们需要手动去掉 */
    border: 0;
    outline: none;
}

body {
    /* CSS3 抗锯齿形 让文字显示的更加清晰 */
    -webkit-font-smoothing: antialiased;
    background-color: #fff;
    font: 12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
    color: #666
}

.hide,
.none {
    display: none
}

/* 通用隐藏工具类（用于登录/注册弹窗多表单切换） */
.hidden { display: none !important; }

/* 清除浮动 */
.clearfix:after {
    visibility: hidden;
    clear: both;
    display: block;
    content: ".";
    height: 0
}

/* .clearfix {
    *zoom: 1
} */

@font-face {
    font-family: 'icomoon';
    src: url('/fonts/icomoon.eot?kx0ydd');
    src: url('/fonts/icomoon.eot?kx0ydd#iefix') format('embedded-opentype'),
        url('/fonts/icomoon.ttf?kx0ydd') format('truetype'),
        url('/fonts/icomoon.woff?kx0ydd') format('woff'),
        url('/fonts/icomoon.svg?kx0ydd#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}


/* 头部样式 */
.header-area {
    position: sticky;
    top: 0;
    z-index:100;
    width: 100%;
    border-bottom: 1px solid rgba(250, 250, 250, 0.2);
    background-color: #f8f9fa;
    /* 添加不透明背景色 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header-area .container {
    margin: 0 auto;
    width: 1300px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 导航栏样式 */
.header-area .main-nav {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.header-area .logo {
    font-size: 24px;
    font-weight: bold;
    color: black;
    text-decoration: none;
}

.header-area .nav {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.header-area .nav li {
    margin: 0 20px;
}

.header-area .nav a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

.header-area .nav a:hover,
.header-area .nav a.active {
    /* color: #798095; */
    color: #fff;
    /* background-color: hsl(225, 12%, 53%, .7); */
    background-color: #798095;
    border-radius: 5px;
}

/* 用户菜单下拉样式 */
.header-area .nav .user-menu {
    position: relative;
}

.header-area .nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    padding: 8px 0;
    z-index: 1000;
}

.header-area .nav .user-menu:hover .dropdown-menu {
    display: block;
}

/* 下拉菜单项样式 */
.header-area .nav .dropdown-menu li {
    margin: 0;
    text-align: center;
}

.header-area .nav .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.header-area .nav .dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #c81623;
}

/* 用户名样式微调 */
.header-area .nav .username {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

.username::after {
    content: "▼";
    font-size: 10px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: all 0.3s;
}

.user-menu:hover .username::after {
    transform: translateY(-50%) rotate(180deg);
}



/* 登录弹窗背景 */
.loginmodal {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明遮罩 */
    justify-content: center;
    align-items: center;
}

.loginmodal.show {
    display: flex;
}

/* 弹窗内容 */
.loginmodal .modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}
.loginmodal h2 {
    text-align: center;
    margin-bottom: 20px;
}

.loginmodal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    border: none;
    background: none;
    cursor: pointer;
}

.loginmodal .close:hover,
.loginmodal .close:focus {
    color: #000;
}

.tab-switch {
  display: flex;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}
.tab-switch button {
  flex: 1;
  padding: 10px;
  border: none;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  font-size: 16px;
}
.tab-switch button.active {
  background-color: #798095;
  color: white;
}
.tab-switch button:not(.active):hover {
    background-color: #e9e9e9;
}

.auth-form {
  display: flex;
  flex-direction: column;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.auth-form button[type="submit"] {
  width: 100%;
  padding: 10px;
  background-color: #798095;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}
.auth-form button[type="submit"]:hover {
  background-color: #6a7185;
}
.auth-form button[type="submit"]:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}
.auth-form button[type="submit"]:disabled:hover {
    background-color: #cccccc;
}
.auth-form button[type="submit"]:disabled {
    background-color: #798095;
    cursor: not-allowed;
}

.pwd-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.pwd-wrapper input {
  margin-bottom: 0;
}
.toggle-pwd {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-pwd:hover {
    background-color: transparent;
}
.eye-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.2s ease-in-out;
}
.toggle-pwd[data-eye="0"] .eye-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'%3E%3C/path%3E%3Cline x1='1' y1='1' x2='23' y2='23'%3E%3C/line%3E%3C/svg%3E");
}
.toggle-pwd.is-open .eye-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007bff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
}
.toggle-pwd[data-eye="0"].is-open .eye-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007bff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'%3E%3C/path%3E%3Cline x1='1' y1='1' x2='23' y2='23'%3E%3C/line%3E%3C/svg%3E");
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.remember-line, .terms-line {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}
.remember-line {
    margin-bottom: 0;
}
.remember-line input, .terms-line input {
  margin-right: 8px;
}

.minor-links {
  text-align: right;
  margin-bottom: 0;
}
.minor-links a {
  font-size: 14px;
  color: #dc3545;
  text-decoration: none;
}
.minor-links a:hover {
  text-decoration: underline;
}

.error-msg, .info-msg {
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}
.error-msg {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.info-msg {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.none {
  display: none;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pwd-strength {
    display: flex;
    align-items: center;
    height: 20px;
    margin-top: -10px;
    margin-bottom: 10px;
}
.pwd-strength-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    overflow: hidden;
}
.pwd-strength-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: transparent;
    transition: width 0.3s, background-color 0.3s;
}
.pwd-strength-bar.weak::before { width: 25%; background-color: #dc3545; }
.pwd-strength-bar.medium::before { width: 50%; background-color: #ffc107; }
.pwd-strength-bar.strong::before { width: 75%; background-color: #28a745; }
.pwd-strength-bar.very-strong::before { width: 100%; background-color: #28a745; }

.pwd-strength-text {
    font-size: 12px;
    color: #666;
}
.pwd-strength-text.weak { color: #dc3545; }
.pwd-strength-text.medium { color: #ffc107; }
.pwd-strength-text.strong { color: #28a745; }
.pwd-strength-text.very-strong { color: #28a745; }

.field-feedback {
    font-size: 12px;
    text-align: left;
    margin-top: -10px;
    margin-bottom: 10px;
    height: 16px; /* 占据固定高度，防止布局跳动 */
}

.field-hint, .field-error-msg, .field-success-msg {
    display: none; /* 默认全部隐藏 */
}

.field-hint {
    color: #888; /* 灰色 */
}

.field-error-msg {
    color: #dc3545; /* 红色 */
}

.field-success-msg {
    color: #28a745; /* 绿色 */
}

.captcha-box {
    margin-bottom: 15px;
}
.captcha-box.hidden {
    display: none;
}
.captcha-box img {
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 4px;
}
.small-btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
}
.small-btn:hover {
    background-color: #e0e0e0;
}

/* ===== Forum Pagination ===== */
.pagination {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span.page-current {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #d0d3d8;
    border-radius: 4px;
    background: #fff;
    color: #555;
    text-decoration: none;
    line-height: 1.2;
    transition: all .18s ease;
}
.pagination a:hover {
    background:#798095;
    color:#fff;
    border-color:#798095;
}
.pagination span.page-current {
    background:#798095;
    color:#fff;
    font-weight:600;
    cursor: default;
    border-color:#798095;
}
.pagination a.disabled {
    opacity:.45;
    pointer-events:none;
}
/* ===== Mobile Menu Styles ===== */
@media (max-width: 768px) {
    
    .pagination { gap:4px; }
    .pagination a, .pagination span.page-current { padding:5px 10px; font-size:12px; }
    
    .header-area {
        position: sticky;
        top: 0;
    }

    .header-area .container {
        width: 100%;
        padding: 0 15px;
        height: 60px;
    }

    .header-area .logo {
        font-size: 20px;
    }

    /* 移动端菜单默认隐藏 */
    .header-area .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #f8f9fa;
        border-top: 1px solid rgba(250, 250, 250, 0.2);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: stretch;
        display: none;
        z-index: 99;
    }

    /* 移动端菜单展开时确保文本颜色可见 */
    /* .header-area .nav.show a {
        color: #333 ;
    }

    .header-area .nav.show .dropdown-menu a {
        color: #666;
    } */

    .header-area .nav.show {
        display: flex;
    }

    .header-area .nav li {
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .header-area .nav li:last-child {
        border-bottom: none;
    }

    .header-area .nav a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        color:black;
    }

    /* 汉堡菜单按钮样式 */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        margin-left: auto;
        position: relative;
        width: 30px;
        height: 30px;
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #333;
        margin: 4px 0;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* 移动端下拉菜单调整 */
    .header-area .nav .user-menu {
        position: static;
    }

    .header-area .nav .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: rgba(0, 0, 0, 0.05);
        margin-top: -1px;
    }

    .header-area .nav .user-menu .dropdown-menu {
        display: none;
    }

    .header-area .nav .user-menu.open .dropdown-menu {
        display: block;
    }

    .header-area .nav .user-menu .dropdown-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .header-area .nav .user-menu .dropdown-menu li:last-child {
        border-bottom: none;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}
