/* ========================================================================= */
/* 1. 基础重置与页面容器 */
/* ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #000;
    min-height: 100vh;
    font-size: 11px; /* 默认字体大小11px */
    line-height: 1.4;
}

#page-wrapper {
    max-width: 1024px;
    margin: 20px auto;
    background-color: white;
    padding: 0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    min-height: calc(100vh - 40px);
}

hr {
    color: lightgray;
    background-color: lightgray;
    height: 1px;
    width: 100%;
    margin: 5px auto;
    border: none;
}


/* --- 修改样式：移除 footer-logo，直接控制图片大小 --- */
.logo img {
    height: 30px; /* 确保图片高度为 30px */
    width: auto; /* 宽度自适应 */
    display: block;
}

/* 修改 Logo 链接本身，以保持样式统一 */
.logo {
    display: flex;
    align-items: center; 
    text-decoration: none; 
    color: #333;
    font-size: 14px; 
    font-weight: bold;
    /* 移除内联样式 */
}

/* --- 新增样式 --- */
.nav-left-elements {
    display: flex; /* 启用 Flexbox */
    align-items: center; /* 垂直居中对齐所有子项（Logo, 按钮, 翻译框）*/
    gap: 2px; /* 增加左侧元素间的间距 */
}
 /* 
.logo-icon {
    height: 50px; /* 设置图标的高度 
    width: auto; /* 宽度自适应 
    margin-right: 10px; /* 图标和文字之间留出间距 
} */


.footer-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 10px;
}

/* ========================================================================= */
/* 2. 顶部导航栏 - 字体13px */
/* ========================================================================= */
.navbar {
    background-color: white;
    padding: 5px 15px;
    color: black;
    font-size: 13px; /* 导航文字13px */
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 10px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px; /* 导航链接13px */
    transition: all 0.3s;
}

.nav-links a:hover {
    background-color: #007bff;
    color: #fff;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background:  #e9ecef;
    border-bottom: 1px solid #e0e0e0;
}

.nav-top .logo {
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.nav-bottom {
    display: flex;
    gap: 10px;
    margin: 5px 0;
    font-size: 11px; 
    flex-wrap: wrap;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: white;
    color: black;
    padding: 6px 12px;
    font-size: 11px; /* 下拉按钮13px */
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.dropbtn:hover {
    background-color: #f1f1f1;
    border-color: #007bff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 140px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 999;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.dropdown-content a {
    color: #333;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 12px;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    border-radius: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ========================================================================= */
/* 3. 三栏布局 - 主要布局结构 */
/* ========================================================================= */
.main-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #fff;
    min-height: 600px;
    height: calc(100vh - 150px); /* 确保整体可视区自适应 */
    align-items: stretch; /* ✅ 三栏高度保持一致 */
    overflow: hidden; /* ✅ 防止整体出现额外滚动条 */
}

/* 左侧栏 */
.left-column {
    flex: 0 0 180px;
    width: 180px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 11px;
}

/* 中间主内容区 */
.main-content {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 0;
    height: 100%;
    align-items: stretch; /* ✅ 内部左右块同高 */
    overflow: hidden; /* ✅ 防止双重滚动条 */
}

/* 日记本全宽布局 */
.diary-section {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
}

.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.diary-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s;
}

.diary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.diary-card h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 13px;
}

.diary-card p {
    color: #666;
    margin-bottom: 5px;
    font-size: 11px;
}

.diary-card a {
    color: #007bff;
    text-decoration: none;
    font-size: 11px;
}

.diary-card a:hover {
    text-decoration: underline;
}

/* 中间左侧：会员列表 */
.members-section {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    overflow-y: auto; /* ✅ 独立滚动 */
    overflow-x: hidden;
    background: #fff;
    border-radius: 4px;
    min-width: 0;
    font-size: 11px;
}

/* 中间右侧：广告列表 */
.ads-section {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    overflow-y: auto; /* ✅ 独立滚动 */
    overflow-x: hidden;
    background: #fff;
    border-radius: 4px;
    min-width: 0;
    font-size: 11px;
}

/* 右侧栏 */
.sidebar-right {
    flex: 0 0 180px;
    width: 180px;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 11px;
}




/* ========================================================================= */
/* 4. 会员列表样式 - 左右布局 */
/* ========================================================================= */
.search-bar {
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.search-bar  form {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar  select,
.search-bar  input {
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 10px;
    height: 24px;
}

.search-bar  input[type="number"] {
    width: 70px;
}

.search-bar  input[type="text"] {
    width: 60px;
}

.search-bar  button {
    padding: 4px 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    height: 24px;
}

.search-bar  button:hover {
    background: #0056b3;
}

 .dsearch-bar{
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

 .dsearch-bar form {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

 .dsearch-bar select,
 .dsearch-bar input {
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 10px;
    height: 24px;
}

 .dsearch-bar input[type="number"] {
    width: 70px;
}

 .dsearch-bar input[type="text"] {
    width: 60px;
}

 .dsearch-bar button {
    padding: 4px 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    height: 24px;
}

 .dsearch-bar button:hover {
    background: #0056b3;
}


.sort-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sort-buttons a {
    text-decoration: none;
}

.sort-buttons button {
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s;
}

.sort-buttons button:hover,
.sort-buttons button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 会员卡片 - 左右布局 */
.media {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    padding: 10px;
    transition: all 0.3s;
    /* >>> 关键修改：添加这一行 <<< */
    align-items: center;
}

.media:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

.media .image {
    flex: 0 0 80px;
}

.media .image img {
    width: 90px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
}

.media .text {
    flex: 1;
    min-width: 0;
}

.media .text p {
    margin-bottom: 6px;
    line-height: 1;
}

.media .text p:first-child {
    font-weight: bold;
    color: #333;
}

.vip {
    color: #ff6b00;
    font-weight: bold;
    font-size: 10px;
}

.online {
    color: #28a745;
    font-size: 10px;
}

.offline {
    color: #6c757d;
    font-size: 10px;
}

.diary-link {
    color: #007bff;
    text-decoration: none;
    font-size: 10px;
}

.diary-link:hover {
    text-decoration: underline;
}

/* ========================================================================= */
/* 5. 广告发布和表单样式 */
/* ========================================================================= */
.tab-menu {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

.tab-menu p {
    flex: 1;
    text-align: center;
    padding: 8px 5px;
    margin: 0;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s;
    font-size: 11px;
    border-bottom: 2px solid transparent;
}

.tab-menu p.active {
    background: #007bff;
    color: #fff;
    border-bottom-color: #0056b3;
}

.tab-menu p:hover:not(.active) {
    background: #e9ecef;
}

.tab-content {
    display: none;
	 /* === ✨ 新增或修改这行代码 === */
    /* 设置 Tab 内容区域的基础字体大小 */
    /* 示例值：14px (比默认的 16px 略小) */
	/* font-family: 'SimSun', 'FangSong', serif; */
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 11px; 
}

.tab-content[style*="display:block"] {
    display: block;
}

.ad-form {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ad-form h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 11px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.form-line {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-line.full-width {
    flex-direction: column;
    align-items: flex-start;
}

.form-label {
    display: inline-block;
    width: 100px;
    /* font-weight: normal; /* bold; */
    color: #333;
    font-size: 11px;
    flex-shrink: 0;
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.form-control,
.form-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 11px;
    min-width: 0;
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-control[type="file"] {
    padding: 3px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.required {
    color: #dc3545;
}

.text-muted {
    color: #6c757d;
    font-size: 11px;
}

.rentsale-btn {
    background: #007bff;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.3s;
}

.rentsale-btn:hover {
    background: #0056b3;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 11px;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ad-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.ad-preview h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 11px;
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.ad-preview p {
    margin-bottom: 5px;
    font-size: 11px;
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* ========================================================================= */
/* 6. 登录/注册和用户面板样式 */
/* ========================================================================= */
.login-register-box {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.profile-tabs {
    margin-top: 10px;
}

.user-panel, .website-panel {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.user-panel h3, .website-panel h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.user-panel ul, .website-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-panel ul li, .website-panel ul li {
    margin-bottom: 8px;
    font-size: 11px;
}

.user-panel ul li a, .website-panel ul li a {
    text-decoration: none;
    color: #0077cc;
    display: block;
    padding: 3px 0;
    transition: color 0.3s;
}

.user-panel ul li a:hover, .website-panel ul li a:hover {
    color: #0055aa;
}





.upload-section {
    display: block;
    margin: 20px 0;
    width: 100%;
}

.upload-section label {
    display: block;
    font-size: 11px;
    color: #333;
    margin-bottom: 8px;
}

.upload-section .upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 12px;
}

.upload-section .upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-section .upload-area.has-files {
    border-color: #28a745;
    background: #f8fff8;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.image-preview-item {
    width: 80px;
    text-align: center;
}

.image-preview-item img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.image-preview-info {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
    word-break: break-all;
}



/* ========================================================================= */
/* 7. 右侧菜单样式 */
/* ========================================================================= */
.rightbox-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rightbox-menu ul li {
    margin-bottom: 5px;
}

.rightbox-menu ul li a {
    display: block;
    padding: 8px 10px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 11px;
    border: 1px solid #e9ecef;
}

.rightbox-menu ul li a:hover {
    background-color: #e2e6ea;
    border-color: #007bff;
}

/* ========================================================================= */
/* 8. 模态框样式 */
/* ========================================================================= */
#adModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}



/* ========================================================================= */
/* 5. Footer 样式（宽度与 page-wrapper 对齐） */
/* ========================================================================= */
.site-footer {
    background: #f8f8f8;
    color: #333;
    font-size: 12px;
    padding: 12px 16px;
    border-top: 1px solid #ddd;
}

.footer-inner {
    max-width: 1024px;   /* 与 page-wrapper 同宽 */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
}

/* 链接样式 */
.footer-inner a {
    color: #007bff;
    text-decoration: none;
    margin-right: 12px;
}

.footer-inner a:hover {
    text-decoration: underline;
}
/* ========================================================================= */
/* 9. 响应式设计 */
/* ========================================================================= */

@media (max-width: 1024px) {
    #page-wrapper {
        margin: 10px;
        max-width: none;
    }
    
    .main-container {
        display: flex;
        flex-wrap: nowrap; /* 保持一行 */
        height: auto;
        gap: 10px;
    }
    
    .left-column,
    .sidebar-right {
        flex: 1 1 20%; /* 左右栏占20% */
        min-width: 200px;
    }
    
    .main-content {
        flex: 2 1 55%; /* 中间栏占55%，保证总宽度<100% */
        order: 2;
        margin-top: 0;
    }
}


@media (max-width: 768px) {
    .main-container {
        flex-direction: column; /* 上下堆叠 */
    }
    
    .left-column,
    .main-content,
    .sidebar-right {
        flex: 1 1 100%;
    }
    
    .members-section,
    .ads-section {
        height: 400px;
    }
    
    .nav-bottom {
        gap: 8px;
    }
    
    .tab-menu {
        flex-wrap: wrap;
    }
    
    .tab-menu p {
        flex: 0 0 calc(50% - 2px);
        margin-bottom: 2px;
    }
    
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* ========================================================================= */
/* 10. 滚动条样式 */
/* ========================================================================= */
.members-section::-webkit-scrollbar,
.ads-section::-webkit-scrollbar,
.left-column::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar,
.diary-section::-webkit-scrollbar {
    width: 6px;
}

.members-section::-webkit-scrollbar-thumb,
.ads-section::-webkit-scrollbar-thumb,
.left-column::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb,
.diary-section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.members-section::-webkit-scrollbar-track,
.ads-section::-webkit-scrollbar-track,
.left-column::-webkit-scrollbar-track,
.sidebar-right::-webkit-scrollbar-track,
.diary-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

/* ========================================================================= */
/* 11. 工具类 */
/* ========================================================================= */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
}

.mb-10 {
    margin-bottom: 10px;
}

.mt-10 {
    margin-top: 10px;
}

.hidden {
    display: none;
}

.validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220,53,69,0.25) !important;
}

/* ==================================== */
/* 国家/城市筛选器样式 (Ads Filter Geo) */
/* ==================================== */

/* 确保筛选器容器在 ads-list 容器内部正确显示 */
.ads-section {
    /* 核心：确保广告列表容器能够容纳所有子元素 */
    overflow-x: hidden; /* 防止水平溢出 */
    padding: 10px; /* 增加内边距以避免内容紧贴边缘 */
}

/* 主筛选器容器，使用 Flexbox 实现水平布局 */
.ads-filter-geo-container {
    display: flex; /* 使用弹性布局 */
    flex-wrap: wrap; /* 允许项目换行，防止在小屏幕上溢出 */
    align-items: center; /* 垂直居中对齐 */
    gap: 8px; /* 设置项目之间的间距 */
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

/* 筛选组（例如：标签和下拉框） */
.ads-filter-geo-container .filter-group {
    display: flex;
    align-items: center;
}

/* 标签样式 */
.ads-filter-geo-container .filter-label {
    font-weight: bold;
    color: #333;
    white-space: nowrap; /* 防止标签换行 */
}

/* 下拉选择框的通用样式 */
.ads-filter-geo-container .country-select,
.ads-filter-geo-container .city-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    min-width: 80px; /* 最小宽度，确保可用 */
    
    /* 🔥 新增/修改：限制最大宽度，并处理溢出文本 */
    max-width: 180px; /* 设置一个合理的国家选择框最大宽度 */
    
    /* 强制文本溢出处理（可选，但对于下拉框通常不生效，主要取决于浏览器） */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 城市选择框如果需要更宽，可以单独设置 */
.ads-filter-geo-container .city-select {
    max-width: 150px; /* 可以调整城市选择框的最大宽度 */
}

/* 响应式调整：当屏幕较窄时，让下拉框独占一行 */
@media (max-width: 768px) {
    .ads-filter-geo-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px; /* 垂直间距可以小一点 */
    }
    .ads-filter-geo-container .filter-group {
        width: 100%; /* 让每个组都占用全部宽度 */
    }
    .ads-filter-geo-container .country-select,
    .ads-filter-geo-container .city-select {
        width: 100%; /* 让选择框占用全部宽度 */
        box-sizing: border-box; /* 确保 padding 不会导致溢出 */
    }
}