/* 全局颜色变量 */
:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #096dd9;
    --primary-light: #e6f7ff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e8e8e8;
    --background-light: #f5f5f5;
    --white: #ffffff;
    --nav-height: 60px; /* 添加导航栏高度变量 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow: hidden; /* 防止body出现滚动条 */
}

/* 容器布局 */
.container {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
    position: fixed; /* 固定容器位置 */
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden; /* 防止容器本身滚动 */
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #001529;
    color: var(--white);
    padding: 20px 0;
    height: 100%; /* 改为100%以适应容器高度 */
    position: relative; /* 改为相对定位 */
    overflow-y: auto;
    overflow-x: hidden;
}

.logo {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.logo img {
    max-width: 150px;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar nav ul li a i {
    width: 24px;
    font-size: 16px;
    margin-right: 10px;
    text-align: center;
}

.sidebar nav ul li a span {
    flex: 1;
}

.sidebar nav ul li a:hover {
    background-color: #002140;
    color: var(--white);
}

.sidebar nav ul li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.sidebar nav ul li a.active i {
    color: #fff;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 250px; /* 确保与侧边栏宽度相同 */
    padding: 20px;
    height: 100%; /* 改为100%以适应容器高度 */
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f5f5f5;
}

.content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px; /* 添加底部间距 */
}

/* 当主内容区域没有侧边栏时（全宽显示） */
.main-content.full-width {
    margin-left: 0;
}

/* 页面标题 */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.page-header h1 {
    font-size: 24px;
    color: #2c3e50;
}

/* 信息卡片 */
.info-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--primary-light);
}

.card-header h2 {
    font-size: 18px;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

/* 信息项 */
.info-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-item label {
    width: 120px;
    color: #666;
    font-weight: 500;
}

.info-item span {
    flex: 1;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        overflow: hidden;
    }
    
    .container {
        margin-top: 0;
        height: 100vh; /* 在移动端占满整个视口高度 */
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        height: 100%;
        padding-bottom: 70px; /* 为移动端底部导航留出空间 */
    }
    
    .mobile-nav {
        display: block;
    }
    
    .mobile-sidebar {
        display: block;
    }
    
    .content {
        margin-left: 0;
        padding-bottom: 60px;
    }
    
    .query-container {
        margin-bottom: 60px;
    }
    
    .auth-container {
        margin-top: 0 !important;
        min-height: 100vh;
        padding-top: 0 !important;
    }
    
    .auth-box {
        margin-top: 0 !important;
    }
}

/* 按钮样式 */
.btn-edit {
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-edit:hover {
    background-color: var(--primary-hover);
}

/* 状态标签 */
.status-active {
    color: var(--primary-color);
    font-weight: 500;
}

.status-inactive {
    color: #e74c3c;
    font-weight: 500;
}

/* 金额样式 */
.amount {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--primary-light);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        left: -250px;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* 页面切换动画 */
.content {
    transition: opacity 0.3s ease;
}

/* 查询页面样式 */
.query-container {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.query-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.points-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.query-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

.query-section-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* 查询介绍部分 */
.query-intro-section {
    margin-bottom: 2.5rem;
}

.query-intro-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.query-intro-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.query-intro-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.intro-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.intro-content h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.intro-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 表单部分 */
.query-form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.input-with-desc {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.2);
}

.time-range-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-container {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
    background-color: #fff;
    position: relative;
}

.radio-container input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-container:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.radio-container input[type="radio"]:checked + .radio-label {
    font-weight: 500;
    color: var(--primary-color);
}

.radio-container input[type="radio"]:checked ~ .radio-container {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    background-color: #d9d9d9;
    color: #999;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background-color: #d9d9d9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .query-container {
        padding: 1rem;
    }
    
    .query-intro-items {
        grid-template-columns: 1fr;
    }
    
    .time-range-options {
        flex-direction: column;
    }
    
    .radio-container {
        width: 100%;
    }
}

/* 顶部导航栏样式 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-container {
    width: 100%;
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
    z-index: 1;
}

.nav-logo {
    height: 40px;
    transition: all 0.3s ease;
}

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

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 1;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.nav-item i {
    font-size: 16px;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.dropdown-toggle i {
    font-size: 16px;
}

/* 当dropdown在nav-item内时，重置nav-item的样式 */
.nav-item.dropdown {
    padding: 0;
    background: none;
}

.nav-item.dropdown:hover {
    background: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* 移动端下拉菜单适配 */
@media (max-width: 768px) {
    .dropdown-menu {
        right: -10px;
        min-width: 160px;
    }
    
    .dropdown-item {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* 移动端顶部导航适配 */
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-right {
        gap: 10px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        font-size: 18px;
    }
    
    .nav-logo {
        height: 35px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 5px;
    }
    
    .nav-right {
        gap: 5px;
    }
    
    .nav-item {
        padding: 6px 8px;
    }
    
    .nav-logo {
        height: 30px;
    }
}

/* 登录注册页面样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 20px;
}

/* 当auth-container在content容器内时的样式调整 */
.content .auth-container {
    margin: -20px -10px;
    padding: 20px 10px;
    min-height: calc(100vh - 150px);
}

.auth-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.auth-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.auth-box h2 i {
    margin-right: 10px;
    color: #1890ff;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.auth-form label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.auth-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
    background-color: #fafbfc;
}

.auth-form .form-control:hover:not(:focus) {
    border-color: #c1c7cd;
}

.auth-form .form-control::placeholder {
    color: #999;
    font-size: 14px;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 11px;
    line-height: 1.4;
}

.auth-form .btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-active));
    color: white;
}

.auth-form .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-active), #0050b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form .btn:disabled {
    background: #d9d9d9 !important;
    color: #999 !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Alert 提示框样式 */
.alert {
    padding: 10px 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.alert i {
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 16px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert strong {
    font-weight: 600;
}

.alert small {
    display: block;
    margin-top: 5px;
    opacity: 0.8;
}

/* Cloudflare Turnstile 样式 */
.cf-turnstile {
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

/* Debug信息样式 */
.debug-info {
    border: 1px solid #dee2e6;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 12px;
}

.debug-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.debug-info p {
    margin: 5px 0;
    color: #6c757d;
}

/* 表单禁用状态样式 */
form[style*="pointer-events: none"] {
    position: relative;
}

form[style*="pointer-events: none"]::after {
    content: "注册已被限制";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 10;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 调整主容器样式以适应顶部导航栏 */
.container {
    margin-top: var(--nav-height);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        font-size: 20px;
    }
    
    .auth-box {
        padding: 20px;
        margin: 10px;
        max-width: none;
    }
    
    .auth-header h2 {
        font-size: 20px;
    }
    
    .content .auth-container {
        margin: -20px -10px;
        padding: 20px 10px;
        min-height: calc(100vh - 150px);
    }
    
    .auth-form .form-control {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 14px 16px;
    }
    
    .auth-form .btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .form-text {
        font-size: 11px;
    }
}

/* 移动端导航栏样式 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-nav-item.active {
    color: #1890ff;
}

/* 移动端侧边栏样式 */
.mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px); /* 减去底部导航栏的高度 */
    background: #ffffff;
    z-index: 1001;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu {
    padding: 15px;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.mobile-menu ul li {
    text-align: center;
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    background: var(--background-light);
    transition: all 0.3s ease;
}

.mobile-menu-item i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.mobile-menu-item span {
    font-size: 12px;
    color: #666;
}

.mobile-menu-item:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.mobile-menu-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 360px) {
    .mobile-menu ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动端内容区域样式 */
.mobile-content {
    padding-bottom: 60px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .top-nav {
        display: none;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .mobile-sidebar {
        display: block;
    }
    
    .content {
        margin-left: 0;
        padding-bottom: 60px;
    }
    
    .query-container {
        margin-bottom: 60px;
    }
}

/* 移动端底部导航栏 */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    padding: 8px 0;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

/* 在大屏幕上隐藏底部导航栏 */
@media screen and (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* 在小屏幕上显示底部导航栏并调整主内容区域的内边距 */
@media screen and (max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .main-content {
        padding-bottom: 70px; /* 为底部导航栏留出空间 */
    }

    .sidebar {
        display: none; /* 在移动端隐藏左侧菜单 */
    }
}

/* 确保主内容区域在移动端时占满宽度 */
@media screen and (max-width: 767px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* 客服聊天图标和窗口样式 */
.cs-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.cs-chat-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cs-chat-icon:hover {
    transform: scale(1.1);
}

.cs-chat-icon i {
    color: white;
    font-size: 24px;
}

.cs-chat-window {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
}

.cs-chat-window.active {
    display: flex;
}

.cs-chat-header {
    padding: 15px;
    background: #007bff;
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.cs-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
}

.cs-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.cs-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.cs-message.user {
    align-items: flex-end;
}

.cs-message.admin {
    align-items: flex-start;
}

.cs-message-content {
    max-width: 80%;
    padding: 10px;
    border-radius: 10px;
    position: relative;
}

.cs-message.user .cs-message-content {
    background: #007bff;
    color: white;
}

.cs-message.admin .cs-message-content {
    background: #f1f1f1;
    color: #333;
}

.cs-message-time {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.cs-message.user .cs-message-time {
    color: #ccc;
}

.cs-chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
}

.cs-input-tools {
    margin-bottom: 10px;
}

.cs-upload-btn {
    cursor: pointer;
    color: #666;
}

.cs-upload-btn:hover {
    color: #007bff;
}

.cs-input-box {
    display: flex;
    gap: 10px;
}

.cs-input-box textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    height: 40px;
    font-family: inherit;
}

.cs-input-box button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 15px;
    cursor: pointer;
}

.cs-input-box button:hover {
    background: #0056b3;
}

.cs-chat-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    cursor: pointer;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-chat-window {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .cs-chat-header {
        border-radius: 0;
    }
}

/* 确保在非移动端时内容区域正确显示 */
@media screen and (min-width: 769px) {
    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
    
    .sidebar {
        display: block;
    }
    
    .mobile-bottom-nav,
    .mobile-sidebar {
        display: none;
    }
}

/* 客服聊天窗口未登录提示样式 */
.cs-chat-login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
}

.cs-login-message {
    margin-bottom: 20px;
}

.cs-login-message i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.cs-login-message p {
    color: #495057;
    font-size: 16px;
    margin: 0;
}

.cs-login-buttons {
    display: flex;
    gap: 10px;
}

.cs-btn {
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cs-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.cs-btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.cs-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.cs-btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cs-chat-widget {
        bottom: 60px; /* 移动端距离底部60px */
    }
    
    /* 移动端底部有导航栏时，调整聊天窗口位置 */
    .cs-chat-window {
        bottom: 70px !important;
        max-height: calc(100vh - 130px) !important;
    }
}

/* 桌面端样式调整 */
@media (min-width: 769px) {
    .content .auth-container {
        margin: -20px;
        padding: 40px 20px;
        min-height: calc(100vh - 200px);
    }
    
    .auth-form .form-control {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .auth-form .btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .alert {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .form-text {
        font-size: 12px;
    }
}

/* 大屏幕适配 */
@media (min-width: 1200px) {
    .nav-container {
        padding: 0 40px;
    }
    
    .nav-right {
        gap: 25px;
    }
}

/* 超大屏幕适配 */
@media (min-width: 1600px) {
    .nav-container {
        padding: 0 60px;
    }
    
    .nav-right {
        gap: 30px;
    }
} 