/* ==================== 全局重置样式 ==================== */


@font-face {
  /* font-test*/
  font-family: webfont;
  src: url(admin/admin_css_js/css/webfont.ttf);
}
@font-face {
    font-family: 'ALKATIP Kufi';
    src: url('admin/admin_css_js/css/ALKATIP Kufi.woff') format('woff'),
         url('admin/admin_css_js/css/ALKATIP Kufi.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}
@font-face {
    font-family: 'webfont';
    src: url('admin/admin_css_js/css/webfont.woff') format('woff'),
         url('admin/admin_css_js/css/webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'webfont', Arial, sans-serif;
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 15px 0px 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== 导航栏样式 ==================== */
.site-header {
    background: #ffffff;
    color: #0970b4;
    padding: 10px 0;
    margin-top: 60px;
}

.site-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
padding: 0px 15px 10px 15px;
	border-bottom: 1px solid #CCC;
}

.site-logo {
    font-size: 28px;
    font-weight: bold;
    float: left;
    color: #cb1717;
    text-decoration: none;
}

.site-nav {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-around;
}

.site-nav a {
    color: #666;
    text-decoration: none;
    margin-right: 10px;
    font-size: 16px;
    transition: all 0.3s;
    position: relative;
}
.site-nav{
    display:flex;
    align-items:center;
    gap:18px;
}
.site-nav a{
    display:flex;
    position:relative;
    align-items:center;
    transition:0.3s;
}
/* 默认图标灰色 */
.site-nav svg path,
.site-nav svg circle,
.site-nav svg line,
.site-nav svg rect,
.site-nav svg polyline{
    stroke: #666666;
    transition: all 0.3s;
}
/* 鼠标悬浮图标变为主题蓝色 */
.site-nav a:hover svg path,
.site-nav a:hover svg circle,
.site-nav a:hover svg line,
.site-nav a:hover svg rect,
.site-nav a:hover svg polyline{
    stroke:#0970B4;
}
/* 当前激活导航 nav‑active，图标白色 */
.site-nav a.nav-active svg path,
.site-nav a.nav-active svg circle,
.site-nav a.nav-active svg line,
.site-nav a.nav-active svg rect,
.site-nav a.nav-active svg polyline{
    stroke:#0970b4;
}

.avatar{
    width:32px;
    height:32px;
    border-radius:50%;
    object-fit:cover;
}
.site-badge{
    color: #ffffff;
    line-height: 24px;
    width: 18px;
    height: 18px;
    border-radius: 26px;
    position: absolute;
    top: 1px;
    right: -10px;
    background: #f44336;
    font-size: 11px;
    padding: 0px 6px;
}
.unread-msg-pill{
    position:absolute;
    top:-6px;
    right:20px;
    font-size:12px;
}

/* ==================== 通用按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0970B4;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #eee;
    box-shadow: none;
}

.btn-action {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-message {
    background: #0970B4;
    color: white;
}

.btn-message:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-profile {
    background: #f5f5f5;
    color: #666;
}

.btn-profile:hover {
    background: #e8e8e8;
}

.btn-setting {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-setting:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-delete {
    background: #fff5f5;
    color: #e53e3e;
}

.btn-delete:hover {
    background: #fed7d7;
}

.btn-primary {
    background: #0970B4;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary-action {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary-action:hover {
    background: #e8e8e8;
}

.btn-danger {
    background: #fff5f5;
    color: #e53e3e;
}

.btn-danger:hover {
    background: #fed7d7;
}

.btn-disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.btn-go-users {
    display: inline-block;
    padding: 12px 30px;
    background: #0970B4;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-go-users:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ==================== 首页样式 ==================== */
.banner {
    background: url('assets/image/kitap.jpg') center/cover no-repeat;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    margin-left: 15px;
    margin-right: 15px;
    border-radius: 10px;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(9 112 180 / 70%);
    border-radius: 10px;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
}

.features {
    padding: 15px 0;
}

.feature-card {
    background: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    margin-bottom: 20px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #0970B4;
}

.feature-card h3 {
    font-size: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
    color: #0970b4;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

.footer {
    background: #333;
    color: #ccc;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

/* ==================== 通用页面样式 ==================== */
.main-content {
    padding: 30px 0;
}

.page-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

/* ==================== 家族树页面样式 ==================== */
.family-tree {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 40px;
    text-align: center;
}

.tree-placeholder {
    font-size: 18px;
    color: #666;
    padding: 100px;
}

/* ==================== 家族新闻页面样式 ==================== */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-image {
    height: 200px;
    background: #0970B4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.news-content {
    padding: 15px;
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.news-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-meta {
    font-size: 12px;
    color: #999;
}

/* ==================== 好友列表页面样式 ==================== */
.friends-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.page-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header .page-title {
    margin: 0;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab {
    padding: 5px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 110px;
}

/* 默认灰色图标 */
.tab svg path,
.tab svg circle,
.tab svg line {
    stroke: #666;
    transition: all 0.3s;
}
.tab svg polygon{
    fill: #666;
    transition: all 0.3s;
}

/* hover 主题蓝色 */
.tab:hover {
    border-color: #0970B4;
    color: #0970B4;
}
.tab:hover svg path,
.tab:hover svg circle,
.tab:hover svg line {
    stroke: #0970B4;
}
.tab:hover svg polygon{
    fill: #0970B4;
}

/* active激活 白色图标 */
.tab.active {
    background: #0970B4;
    color: #ffffff;
    border-color: transparent;
}
.tab.active svg path,
.tab.active svg circle,
.tab.active svg line {
    stroke: #ffffff;
}
.tab.active svg polygon{
    fill: #ffffff;
}

.tab .count {
    margin-right: 8px;
    padding: 0px 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    font-size: 12px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-content: space-around;
    flex-wrap: wrap;
}

.friend-stats {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
	    text-align: center;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.friend-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.friend-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.friend-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #0970B4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.friend-info {
    flex: 1;
}

.friend-nickname {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.friend-username {
    font-size: 13px;
    color: #999;
}

.friend-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

.status-online {
    background: #e8f5e9;
    color: #2e7d32;
}

.friend-real-name {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.friend-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    justify-content: space-evenly;
}

.btn-friend {
    background: #0970B4;
    color: white;
}

.btn-friend:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-friend.pending {
    background: #ffa726;
    color: white;
}

.btn-friend.friend {
    background: #66bb6a;
    color: white;
}

.btn-friend.rejected {
    background: #e0e0e0;
    color: #999;
}

.pending-list {
    display: grid;
    gap: 15px;
}

.pending-card {
    background: white;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 20px;
}

.pending-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.pending-info {
    flex: 1;
}

.pending-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.pending-time {
    font-size: 13px;
    color: #999;
}

.pending-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-accept {
    padding: 8px 20px;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 160, 71, 0.4);
}

.btn-reject {
    padding: 8px 20px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reject:hover {
    background: #e8e8e8;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

/* ==================== 分页样式 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 4px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: #0970B4;
    color: white;
    border-color: #0970B4;
	width: 39px;
    height: 39px;
    padding-top: 7px;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 用户列表页面样式 ==================== */
.user-list-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 15px 15px 15px;
}

/* 我的资料卡片 */
.my-profile-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.my-profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.my-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.my-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-avatar span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: white;
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
}

.my-detail h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 5px;
}

.my-detail p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin: 2px 0;
}

.my-profile-actions {
    display: flex;
    gap: 10px;
}

.my-profile-actions .btn-action {
    flex: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.my-profile-actions .btn-action:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.my-profile-actions .btn-action.btn-logout {
    background: rgba(231, 76, 60, 0.7);
    color: white;
}

.my-profile-actions .btn-action.btn-logout:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}



.search-input {
    padding: 5px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    width: 250px;
    outline: none;
    transition: border-color 0.3s;
    height: 50px;
}

.search-input:focus {
    border-color: #0970B4;
}

.user-stats {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    margin-top: 12px;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #0970B4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    overflow: hidden;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 离线头像：黑白灰度效果 */
.user-avatar.offline {
    filter: grayscale(100%);
    opacity: 0.75;
}

/* 在线指示小圆点 */
.online-indicator {
    position: absolute;
    bottom: 0px;
    right: 24px;
    width: 12px;
    height: 12px;
    background-color: #2ecc71;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

/* 在线头像容器相对定位已合并到 .user-avatar 规则 */

.user-info {
    flex: 1;
}

.user-nickname {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.user-username {
    font-size: 13px;
    color: #999;
}

.user-gender {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

.gender-male {
    background: #e3f2fd;
    color: #2196f3;
    float: left;
}

.gender-female {
    background: #fce4ec;
    color: #e91e63;
    float: left;
}

.gender-unknown {
    background: #f5f5f5;
    color: #999;
}

.user-real-name {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.user-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    justify-content: space-evenly;
}

/* ==================== 用户详情页面样式 ==================== */
.profile-page2 {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.profile-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.profile-header {
    background: #ffffff;
    padding: 15px 15px;
    text-align: center;
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: bold;
    color: #0970B4;
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
}

.profile-name {
    color: #0970b4;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-real-name {
    color: rgb(9 112 180);
    font-size: 16px;
    margin-bottom: 10px;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.25);
    border-radius: 15px;
    color: #0970b4;
    font-size: 13px;
}

.profile-body {
    padding: 15px;
}

.info-section {
    margin-bottom: 25px;
}

.info-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 10px;
    justify-content: space-between;
    flex-direction: row-reverse;
}

.info-icon {
    font-size: 20px;
}

.info-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
	direction: ltr;
}

.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
    justify-content: space-evenly;
}

.profile-actions .btn-action {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #eee;
}

.status-message {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.status-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-error {
    background: #ffebee;
    color: #c62828;
	text-align: center;
}

.status-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
    text-align: justify;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0970B4;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

/* ==================== 聊天页面样式 ==================== */
.chat-page {
    max-width: 1200px;
    margin: 0 auto;
    height: calc(95vh - 80px);
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.chat-header {
    background: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chat-header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    background: #58b05c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.chat-header-info {
    flex: 1;
}

.chat-header-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chat-header-status {
    font-size: 13px;
    color: #999;
}

.chat-header-actions {
    display: flex;
    gap: 10px;
}

.btn-back {
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #e8e8e8;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f9f9f9;
}

.message-date {
    text-align: center;
    margin: 15px 0;
}

.message-date span {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
    color: #666;
    font-size: 12px;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
	flex-direction: row-reverse;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.sent {
    flex-direction: row;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: #0970B4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.message.sent .message-avatar {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

.message-content {
    max-width: 100%;
}

.message-text {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message.received .message-text {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message.sent .message-text {
    background: #58b05c;
    color: white;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    padding: 0 5px;
}

.message-sender {
    font-size: 12px;
    font-weight: bold;
    color: #0970B4;
    margin-bottom: 3px;
    padding: 0 5px;
}

.message.sent .message-time {
    text-align: right;
}

.chat-input {
    background: white;
    padding: 15px 25px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0px;
    align-items: center;
    flex-direction: column;
}

.input-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
}

.chat-input textarea {
    width: 100%;
    padding: 5px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    resize: none;
    min-height: 45px;
    max-height: 120px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.chat-input textarea:focus {
    border-color: #0970B4;
}

.char-count {
    position: absolute;
    bottom: 5px;
    right: 15px;
    font-size: 12px;
    color: #999;
}

.btn-send {
    padding: 12px 30px;
    background: #0970B4;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-chat {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-chat .empty-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.empty-chat .empty-text {
    font-size: 14px;
}

.pagination-top {
    text-align: center;
    padding: 10px;
}

.pagination-top a {
    color: #0970B4;
    text-decoration: none;
    font-size: 13px;
}

.pagination-top a:hover {
    text-decoration: underline;
}

/* ==================== 消息中心页面样式 ==================== */
.message-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.message-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s;
}

.message-item:hover {
    background: #f9f9f9;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item.unread {
    background: #fff3e0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-item .btn-delete {
    font-size: 14px;
    color: #f44336;
    text-decoration: none;
    margin-left: 15px;
}

.message-item .btn-delete:hover {
    text-decoration: underline;
}

.message-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.message-time {
    font-size: 14px;
    color: #999;
}

.message-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.message-content h1, .message-content h2, .message-content h3,
.message-content h4, .message-content h5, .message-content h6 {
    margin: 10px 0 5px;
    color: #333;
}

.message-content h1 { font-size: 24px; }
.message-content h2 { font-size: 20px; }
.message-content h3 { font-size: 18px; }

.message-content p {
    margin: 5px 0;
}

.message-content a {
    color: #0970B4;
    text-decoration: underline;
    text-decoration: none;
}

.message-content a:hover {
    color: #5a6fd6;
}

.message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

.message-content ul, .message-content ol {
    padding-left: 20px;
    margin: 5px 0;
}

.message-content li {
    margin: 3px 0;
}

.message-content strong, .message-content b {
    font-weight: bold;
}

.message-content em, .message-content i {
    font-style: italic;
}

.message-content u {
    text-decoration: underline;
}

.message-content br {
    margin: 5px 0;
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.message-content table td, .message-content table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.message-content blockquote {
    border-left: 4px solid #0970B4;
    background: #f5f5f5;
    padding: 10px 15px;
    margin: 10px 0;
    color: #555;
}

.message-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.message-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

.message-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

.message-replies {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.reply-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

.reply-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.reply-author {
    font-size: 14px;
    color: #0970B4;
    font-weight: bold;
    margin-bottom: 5px;
}

.reply-content {
    font-size: 14px;
    color: #666;
}

.reply-time {
    font-size: 12px;
    color: #999;
}

.reply-form {
    margin-top: 15px;
}

.reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    font-family: inherit;
}

.reply-form textarea:focus {
    border-color: #0970B4;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
	text-align:center;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
	text-align:center;
}

/* ==================== 登录/注册页面样式 ==================== */
.login-container,
.register-container {
    background: white;
    border-radius: 15px;
    width: 100%;
    margin: 70px auto 10px auto;
    min-height: 500px;
    max-width: 500px;
    padding: 40px;
    background-color: #ffffff;
    margin-left: auto;
    margin-right: auto;
}

.login-container {
    margin: 70px auto 10px auto;
    min-height: 500px;
    max-width: 500px;
    padding: 40px;
    background-color: #ffffff;
    margin-left: auto;
    margin-right: auto;
}

.login-header,
.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1,
.register-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.login-header p,
.register-header p {
    color: #666;
}

.login-page,
.register-page {
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
    font-family: webfont;
}

.form-group input:focus {
    border-color: #0970B4;
}

.form-group input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
    background-color: white;
}

.form-group select:focus {
    border-color: #0970B4;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

/* 性别选择样式 */
.gender-select {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

.gender-select input[type="radio"] {
    width: auto;
    margin: 0 6px 0 0;
    cursor: pointer;
}

.gender-select label {
    display: inline;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

/* ========== 扫码登录区域 ========== */
.wechat-qrcode-login {
    margin-top: 20px;
    text-align: center;
}

.qrcode-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
}

.qrcode-divider::before,
.qrcode-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.qrcode-divider span {
    padding: 0 15px;
}

.qrcode-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #eee;
}

.qrcode-box #qrcode {
    margin-bottom: 15px;
}

.qrcode-box #qrcode img,
.qrcode-box #qrcode canvas {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.qrcode-tip {
    text-align: center;
}

.qrcode-tip p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.qrcode-status {
    color: #0970B4;
    font-weight: 500;
}

.qrcode-refresh {
    margin-top: 12px;
}

.qrcode-refresh a {
    color: #0970B4;
    text-decoration: none;
    font-size: 13px;
}

.qrcode-refresh a:hover {
    text-decoration: underline;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
	justify-content: center;
}

.login-container .tab,
.register-container .tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.login-container .tab.active,
.register-container .tab.active {
    color: #0970B4;
    border-bottom-color: #0970B4;
}

.wechat-login,
.wechat-register {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wechat-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #07c160;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
}

.wechat-btn:hover {
    background: #06ad56;
}

.footer-link {
    text-align: center;
    margin-top: 20px;
}

.footer-link a {
    color: #0970B4;
    text-decoration: none;
}

.footer-link a:hover {
    text-decoration: underline;
}

.agreement {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

.agreement a {
    color: #0970B4;
    text-decoration: none;
}

/* ==================== 响应式样式 ==================== */
@media (max-width: 768px) {
    .site-nav a {
        margin-right: 0px;
        font-size: 14px;
    }
    
    .site-logo {
        font-size: 22px;
    }
    
    .banner h1 {
        font-size: 26px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 0px;
        align-items: stretch;
    }
    
    .search-input {
        padding: 10px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        font-size: 14px;
        width: 150px;
        outline: none;
        transition: border-color 0.3s;
    }
    
    .users-grid,
    .friends-grid {
        grid-template-columns: 1fr;
    }
    
    .pending-card {
        flex-direction: column;
        text-align: center;
    }
    
    .pending-actions {
        justify-content: center;
    }
    
    .profile-actions {
       display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
    justify-content: space-evenly;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-page {
        height: calc(95vh - 70px);
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .chat-input {
        padding: 5px 0px;
    }
    
    .btn-send {
        padding: 5px 20px;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .tree-placeholder {
        padding: 50px 20px;
    }
}

/* ==================== 私信未读提示样式 ==================== */
/* 导航栏好友链接上的未读私信徽标（内联，避免与 site-badge 角标重叠） */
.unread-msg-pill {
    color: #ffffff;
    float: left;
    text-align: center;
    margin-right: 4px;
    margin-top: 7px;
    line-height: 24px;
    width: 18px;
    background: #4CAF50;
    height: 18px;
    border-radius: 26px;
}

/* 好友头像右上角的未读数红点徽标（补充 position:relative，不改动原规则） */
.friend-avatar {
    position: relative;
}

.friend-unread-badge {
    position: absolute;
    color: #ffffff;
    line-height: 24px;
    width: 18px;
    height: 18px;
    border-radius: 26px;
    top: 1px;
    right: -5px;
    background: #f44336;
    font-size: 11px;
    padding: 0px 6px;
}

/* 好友卡片里的未读消息文字提示行 */
.friend-unread-tip {
    margin-top: 6px;
    font-size: 13px;
    color: #c62828;
    background: #ffebee;
    padding: 5px 10px;
    border-radius: 8px;
    line-height: 1.4;
}

.friend-unread-tip strong {
    color: #f44336;
    font-size: 15px;
    font-weight: 700;
}

/* 右下角 Toast 提示容器 */
.unread-toast-wrap {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}

.unread-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    padding: 12px 16px;
    cursor: pointer;
    border-left: 4px solid #0970B4;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.unread-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.unread-toast:hover {
    background: #f8f9ff;
}

.unread-toast-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #0970B4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.unread-toast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unread-toast-avatar-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.unread-toast-body {
    flex: 1;
    min-width: 0;
}

.unread-toast-title {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-toast-content {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式：小屏 Toast 适配 */
@media (max-width: 768px) {
    .unread-toast-wrap {
        right: 10px;
        bottom: 10px;
        left: 10px;
        max-width: none;
    }
}
