* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #ffffff;
    color: #2c3e50;
    line-height: 1.6;
    padding-top: 64px;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ========== 顶部导航栏 ========== */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: transparent;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 首页/个人主页沉浸式：首屏背景从页面最顶部开始，导航栏压在背景图上 */
body.home-page,
body.profile-page {
    padding-top: 0;
}

body.home-page .banner-section {
    padding-top: calc(clamp(50px, 7vw, 110px) + 64px);
}

/* 防止全屏满铺背景（100vw 含滚动条宽度）造成横向滚动条：
   html 设非 visible 以阻断 body overflow 向视口传播，再由 body 实际裁剪 */
html {
    overflow-x: hidden;
}

body.profile-page {
    overflow-x: hidden; /* 老浏览器回退 */
    overflow-x: clip;
}

body.profile-page .profile-card {
    min-height: 0;
}

body.profile-page .profile-bg-layer {
    top: 0;
    height: 300px;
}

/* 个人信息卡骑跨在背景图与内容区的交界线上 */
body.profile-page .profile-content {
    padding: 210px 28px 0;
}

body.profile-page .profile-top {
    position: relative;
    align-items: flex-start;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    box-shadow: 0 10px 36px rgba(31, 45, 80, 0.12);
    padding: 24px 28px 20px;
}

/* 头像放大，一半探出卡片顶边落在背景图上 */
body.profile-page .profile-avatar-large {
    width: 100px;
    height: 100px;
    margin-top: -50px;
}

body.profile-page .profile-avatar-large img {
    border: 4px solid #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* 白卡内文字恢复深色 */
body.profile-page .profile-top .profile-name-row h1,
body.profile-page .profile-top .profile-username,
body.profile-page .profile-top .profile-stat-value {
    color: #1a1a2e;
}

body.profile-page .profile-top .profile-stat-label,
body.profile-page .profile-top .profile-bio {
    color: #5f6368;
}

body.profile-page .profile-top .level-progress-bar {
    background: rgba(0, 0, 0, 0.08);
}

/* 粉丝/关注移到信息卡右侧，带竖向分隔线 */
body.profile-page .profile-stats-row {
    margin-left: auto;
    align-self: center;
    gap: 36px;
    padding-left: 32px;
    border-left: 1px solid #e8eaed;
}

body.profile-page .profile-stats-row .profile-stat-item {
    align-items: center;
    cursor: pointer;
}

body.profile-page .profile-stats-row .profile-stat-value {
    font-size: 22px;
    font-weight: 700;
}

body.profile-page .profile-stats-row .profile-stat-label {
    font-size: 13px;
}

body.dark-theme.profile-page .profile-stats-row {
    border-left-color: rgba(255, 255, 255, 0.12);
}

/* 操作按钮行纳入卡片内底部 */
body.profile-page .profile-actions-row {
    width: 100%;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e8eaed;
}

/* 暗色主题：信息卡用深色底 */
body.dark-theme.profile-page .profile-top {
    background: #1e1e32;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme.profile-page .profile-top .profile-name-row h1,
body.dark-theme.profile-page .profile-top .profile-username,
body.dark-theme.profile-page .profile-top .profile-stat-value {
    color: #f0f0f5;
}

body.dark-theme.profile-page .profile-top .profile-stat-label,
body.dark-theme.profile-page .profile-top .profile-bio {
    color: rgba(255, 255, 255, 0.65);
}

body.dark-theme.profile-page .profile-avatar-large img {
    border-color: #1e1e32;
}

body.dark-theme.profile-page .profile-actions-row {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* 停在首页/个人主页顶部（未滚动）时，导航图标/文字改为白色，保证在深色背景上可读 */
body.home-page:not(.navbar-scrolled) .top-navbar-logo,
body.home-page:not(.navbar-scrolled) .top-nav-item,
body.home-page:not(.navbar-scrolled) .nav-icon-btn,
body.home-page:not(.navbar-scrolled) .mobile-menu-toggle,
body.profile-page:not(.navbar-scrolled) .top-navbar-logo,
body.profile-page:not(.navbar-scrolled) .top-nav-item,
body.profile-page:not(.navbar-scrolled) .nav-icon-btn,
body.profile-page:not(.navbar-scrolled) .mobile-menu-toggle {
    color: #ffffff;
}

body.home-page:not(.navbar-scrolled) .top-nav-item:hover,
body.home-page:not(.navbar-scrolled) .nav-icon-btn:hover,
body.profile-page:not(.navbar-scrolled) .top-nav-item:hover,
body.profile-page:not(.navbar-scrolled) .nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* 滚动后：毛玻璃白底（所有页面），内容不再穿透 */
.top-navbar.scrolled {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(232, 234, 237, 0.9);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.top-navbar-inner {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 24px;
}

.top-navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a73e8;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.top-navbar-logo i {
    font-size: 1.5rem;
}

.top-navbar-links {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.top-nav-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #5f6368;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.top-nav-item:hover {
    background: #f1f3f4;
    color: #1a73e8;
}

.top-nav-item.active {
    background: #e8f0fe;
    color: #1a73e8;
}

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

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* 导航栏图标按钮 */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #5f6368;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.nav-icon-btn:hover {
    background: #f1f3f4;
    color: #1a73e8;
    transform: translateY(-1px);
}

.nav-icon-btn.active {
    background: #e8f0fe;
    color: #1a73e8;
}

.nav-icon-btn.publish-btn {
    background: transparent;
    color: #5f6368;
    width: 36px;
    height: 36px;
}

.nav-icon-btn.publish-btn:hover {
    transform: translateY(-1px);
    background: #f1f3f4;
    color: #1a73e8;
}

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

.top-nav-login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #1a73e8;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.top-nav-login-btn:hover {
    background: #1557b0;
}

.top-nav-user-info {
    display: flex;
    align-items: center;
}

.user-avatar-wrapper {
    position: relative;
    cursor: pointer;
}

.user-avatar-wrapper > img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
}

.user-avatar-wrapper:hover > img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 用户弹窗 */
.user-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1100;
    overflow: hidden;
}

.user-avatar-wrapper:hover .user-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 弹窗箭头 */
.user-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.06);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

/* 自定义背景时的遮罩层 */
.popup-header.has-custom-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 0;
}

.popup-header > * {
    position: relative;
    z-index: 1;
}

.popup-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.popup-user-info {
    flex: 1;
    min-width: 0;
}

.popup-nickname {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-username {
    font-size: 12px;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-menu {
    padding: 8px;
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
    cursor: pointer;
}

.popup-item:hover {
    background: #f1f3f4;
}

.popup-item i {
    width: 20px;
    text-align: center;
    color: #666;
}

.popup-item.logout {
    color: #dc3545;
}

.popup-item.logout i {
    color: #dc3545;
}

.popup-item.logout:hover {
    background: #fff5f5;
}

.popup-divider {
    height: 1px;
    background: #e8eaed;
    margin: 6px 8px;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.mobile-menu-toggle:hover {
    background: #f1f3f4;
}

body.dark-theme .mobile-menu-toggle {
    color: #e0e0e0;
}

body.dark-theme .mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.08);
}

/* 右侧抽屉遮罩层 */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* 右侧抽屉本体 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 82vw;
    max-width: 340px;
    height: 100vh;
    background: #ffffff;
    padding: 0 16px 24px;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 70px;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.mobile-menu-item:hover {
    background: #f1f3f4;
    color: #1a73e8;
}

.mobile-menu-item i {
    width: 24px;
    text-align: center;
    color: #1a73e8;
}

.mobile-menu-divider {
    height: 1px;
    background: #e8eaed;
    margin: 8px 16px;
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
}

.mobile-menu-user img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-menu-user-info {
    flex: 1;
    overflow: hidden;
}

.mobile-menu-user-nick {
    font-weight: 600;
    color: #202124;
    font-size: 15px;
}

.mobile-menu-user-name {
    font-size: 12px;
    color: #80868b;
}

.mobile-menu-item .badge {
    margin-left: auto;
    background: #d93025;
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ========== 页面通用 ========== */
.page-content {
    padding-bottom: 24px;
    width: 100%;
}

.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.4rem;
    color: #202124;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #1a73e8;
}

.filter-tabs {
    display: flex;
    gap: 6px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 10px;
}

.filter-tab {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #5f6368;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.filter-tab:hover {
    color: #1a73e8;
}

.filter-tab.active {
    background: #ffffff;
    color: #1a73e8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sort-tabs {
    display: flex;
    gap: 6px;
}

.sort-tab {
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #5f6368;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-tab:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.sort-tab.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* ========== 卡片样式 ========== */
.card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.05rem;
    color: #202124;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h3 i {
    color: #1a73e8;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.view-more-link {
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.view-more-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f4;
    display: flex;
    justify-content: flex-end;
}

.loading, .empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

/* ========== 按钮 ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn.primary {
    background: #1a73e8;
    color: #ffffff;
}

.btn.primary:hover {
    background: #1557b0;
}

.btn.secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.btn.secondary:hover {
    background: #e8eaed;
    color: #333;
}

.btn.outline {
    background: transparent;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.btn.outline:hover {
    background: rgba(26, 115, 232, 0.08);
    color: #1557b0;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.button-group .btn {
    flex: 1;
}

/* ========== 顶部 Banner（全宽） ========== */
.banner-section {
    position: relative;
    width: 100%;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    border-radius: 0;
    overflow: hidden;
    min-height: clamp(380px, 55vh, 680px);
    padding: clamp(50px, 7vw, 110px) clamp(20px, 4vw, 40px) clamp(60px, 8vw, 130px);
    color: #ffffff;
    display: flex;
    align-items: center;
}

.banner-bg {
    position: absolute;
    inset: 0;
    background: url('images/home-banner.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.45) 100%);
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.banner-title {
    font-size: 3.2rem;
    color: #ffffff;
    margin: 0 0 14px;
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: 0 4px 24px rgba(0,0,0,0.25);
    line-height: 1.1;
}

.banner-subtitle {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.92);
    margin: 0 0 14px;
    font-weight: 500;
    letter-spacing: 2px;
}

.banner-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.82);
    margin-bottom: 32px;
    line-height: 1.7;
}

.banner-search {
    display: flex;
    justify-content: center;
}

.banner-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 560px;
    transition: box-shadow 0.3s, transform 0.2s;
}

.banner-search-box:focus-within {
    box-shadow: 0 14px 50px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.banner-search-box > i {
    color: #1a73e8;
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
}

.banner-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #202124;
    padding: 10px 12px;
    background: transparent;
    min-width: 0;
}

.banner-search-box input::placeholder {
    color: #9aa0a6;
}

.banner-search-btn {
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 14px;
    flex-shrink: 0;
}

.banner-search-btn i {
    margin-right: 6px;
}

/* ========== Hero 欢迎区（重叠效果） ========== */
.hero-section {
    margin-bottom: 32px;
}

.hero-overlap {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.hero-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    align-items: center;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12);
}

.hero-text h1 {
    font-size: 1.9rem;
    color: #202124;
    margin-bottom: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-text h1 i {
    color: #1a73e8;
}

.hero-text p {
    font-size: 15px;
    color: #5f6368;
    margin-bottom: 24px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.hero-stat {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    border: 1px solid #e8eaed;
    transition: transform 0.25s, box-shadow 0.25s;
}

.hero-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.12);
}

.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a73e8;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 13px;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ========== 最新动态 ========== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.news-dot {
    width: 8px;
    height: 8px;
    background: #1a73e8;
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.news-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    gap: 12px;
}

/* ========== 热门资源推荐 ========== */
.featured-resources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ========== 话题列表 ========== */
.topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.topic-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    aspect-ratio: 1;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.topic-item:active {
    background: #f0f4ff;
    transform: scale(0.98);
}

.topic-item:hover {
    background: #ffffff;
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.topic-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 13px;
}

.topic-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.topic-title {
    font-size: 14px;
    font-weight: 600;
    color: #202124;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.topic-tag {
    font-size: 10px;
    padding: 1px 6px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 3px;
    font-weight: 500;
}

.topic-avatar-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 50%;
}

.topic-avatar-wrapper:active {
    transform: scale(0.95);
}

.topic-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.topic-cover {
    margin-top: 0;
    margin-bottom: 4px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
}

.topic-cover img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* 文章正文富文本样式 */
.topic-content {
    margin-top: 16px;
    line-height: 1.75;
    font-size: 15px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.topic-content img {
    max-width: 100%;
    border-radius: 8px;
}

/* 文章内视频嵌入 */
.topic-content .video-embed {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 16px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    background: #000;
}

.topic-content .video-embed iframe {
    width: 100%;
    height: 405px;
    border: none;
    display: block;
}

.topic-content .video-embed video {
    width: 100%;
    height: auto;
    max-height: 405px;
    display: block;
    background: #000;
}

.topic-content .video-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 12px 0;
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 560px;
}

.topic-content .video-card:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.topic-content .video-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topic-content .video-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.topic-content .video-card-url {
    font-size: 12px;
    color: #888;
}

body.dark-theme .topic-content .video-card {
    background: #2a2a3e;
    border-color: #3a3a4e;
}

body.dark-theme .topic-content .video-card-title {
    color: #e0e0e0;
}

@media (max-width: 768px) {
    .topic-content .video-embed iframe {
        height: 56.25vw;
        max-height: 300px;
    }
    .topic-content .video-embed video {
        max-height: 300px;
    }
}

.topic-content p {
    margin: 0 0 12px 0;
}

.topic-content h1, .topic-content h2, .topic-content h3 {
    margin: 20px 0 10px 0;
}

.topic-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.topic-tag-item {
    font-size: 10px;
    padding: 1px 6px;
    background: #f1f3f4;
    color: #5f6368;
    border-radius: 8px;
}

.topic-tag-item:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

.topic-excerpt {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.topic-footer {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #888;
}

.topic-footer span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.topic-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
}

.topic-stat-label {
    font-size: 11px;
    color: #888;
}

/* ========== 正方形卡片布局 ========== */
.topic-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topic-card-author {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topic-author-name {
    font-size: 12px;
    font-weight: 500;
    color: #202124;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-card-time {
    font-size: 10px;
    color: #888;
}

/* 卡片作者区第二行：发布时间 + 分类标签（多分类超长时省略号截断） */
.topic-card-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.topic-card-sub .topic-card-time {
    flex-shrink: 0;
}

.topic-card-sub .topic-tag {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 官方身份徽章：名字旁红色"官方"标签（文章列表/详情/评论/个人主页） */
.official-badge {
    display: inline-block;
    padding: 1px 7px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 17px;
    color: #ffffff;
    background: linear-gradient(135deg, #fa5151 0%, #e64340 100%);
    border-radius: 9px;
    vertical-align: middle;
    white-space: nowrap;
}

.topic-author-name + .official-badge,
.comment-author + .official-badge,
.author-name + .official-badge {
    transform: translateY(-1px);
}

/* 主页昵称较大，徽章同步放大 */
#profile-nickname .official-badge {
    font-size: 13px;
    padding: 2px 9px;
    line-height: 19px;
    border-radius: 10px;
    transform: translateY(-4px);
}

.topic-card-footer {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #888;
    flex-shrink: 0;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.topic-card-footer span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ========== 首页/搜索卡片：封面在上，用户名等信息组在下 ========== */
.topic-item.home-topic-card {
    aspect-ratio: auto;
    padding: 0;
    gap: 0;
}

.home-topic-card .topic-cover {
    margin: 0;
    border-radius: 0;
    max-height: none;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
}

.home-topic-card .topic-cover img {
    max-height: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-topic-card .topic-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f0fe, #f1f3f4);
    color: #b0b8c4;
    font-size: 28px;
}

body.dark-theme .home-topic-card .topic-cover-placeholder {
    background: linear-gradient(135deg, #2a2a3a, #232332);
    color: #555;
}

.home-topic-card .topic-body {
    padding: 10px 14px 0;
}

.home-topic-card .topic-card-header {
    padding: 8px 14px 0;
}

.home-topic-card .topic-card-footer {
    margin: 8px 14px 0;
    padding: 8px 0 12px;
}

/* ========== 分类列表 ========== */
.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.category-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
}

.category-item:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e8f0fe;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.category-info h4 {
    font-size: 15px;
    color: #202124;
    margin-bottom: 4px;
    font-weight: 600;
}

.category-info p {
    font-size: 12px;
    color: #888;
}

/* ========== 资源列表 ========== */
.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.resource-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.2s, border-color 0.2s;
}

.resource-card:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resource-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e8f0fe;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.resource-title {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
}

.resource-version {
    font-size: 12px;
    color: #888;
}

.resource-desc {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.5;
    min-height: 38px;
}

.resource-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.resource-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: #f1f3f4;
    color: #5f6368;
    border-radius: 4px;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f3f4;
}

.resource-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.download-btn {
    padding: 6px 14px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.download-btn:hover {
    background: #1557b0;
}

/* ========== 工具推荐 ========== */
.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
}

.tool-card:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #e8f0fe;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 12px;
}

.tool-name {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 6px;
}

.tool-desc {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 12px;
    line-height: 1.5;
}

.tool-link {
    font-size: 12px;
    color: #1a73e8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tool-link:hover {
    text-decoration: underline;
}

/* ========== 个人主页 ========== */
.profile-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: -24px 0 0 0;
    /* 保证卡片高度不低于背景层（420px），避免背景溢出盖住下方内容 */
    min-height: 420px;
    overflow: visible;
    position: relative;
    width: 100%;
}

/* 背景层 - 全视口宽度，顶部贴合导航栏 */
.profile-bg-layer {
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    width: 100vw;
    height: 420px;
    margin-left: calc(-50vw + 50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0;
    z-index: 0;
    transition: none;
    overflow: hidden;
}

.profile-bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

.profile-bg-layer.has-custom-bg {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.profile-bg-placeholder {
    display: none;
}

.profile-bg-layer.has-custom-bg .profile-bg-placeholder {
    display: none;
}

/* 内容层 - 透明无白背景 */
.profile-content {
    position: relative;
    z-index: 2;
    padding: 40px 28px 28px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    color: #ffffff;
}

.profile-top .profile-name-row h1,
.profile-top .profile-username,
.profile-top .profile-stat-value {
    color: #ffffff;
}

.profile-top .profile-stat-label,
.profile-top .profile-bio {
    color: rgba(255,255,255,0.85);
}

.profile-avatar-large {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.profile-info h1 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 6px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-username {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 14px;
}

/* 个人简介 */
.profile-bio {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.profile-stats-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.profile-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.profile-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-actions-row .btn {
    flex: 1;
    min-width: 120px;
}

.profile-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-list-item {
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.mini-list-item small {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
}

/* ========== 个人主页内容选项卡 ========== */
.profile-tabs-bar {
    margin: 16px 0 12px;
}

.profile-tab-pane {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

body.dark-theme .profile-tab-pane {
    background: #1e1e2e;
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .mini-list-item {
    background: #252538;
    color: #e0e0e0;
}

body.dark-theme .mini-list-item:hover {
    background: #33334a;
}

/* 帖子管理列表项样式 */
.topic-manage-item {
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.topic-manage-item:hover {
    background: #f0f0f0;
}

.topic-manage-info {
    flex: 1;
    min-width: 0;
}

.topic-manage-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-manage-info small {
    color: #888;
    font-size: 11px;
}

.topic-delete-btn {
    background: transparent;
    color: #999;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.topic-delete-btn:hover {
    background: #fce4ec;
    color: #d93025;
}

.topic-edit-btn {
    background: transparent;
    color: #999;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.topic-edit-btn:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

/* 深色主题帖子管理样式 */
body.dark-theme .topic-manage-item {
    background: #252538;
    color: #e0e0e0;
}

body.dark-theme .topic-manage-item:hover {
    background: #33334a;
}

body.dark-theme .topic-manage-info small {
    color: #888;
}

body.dark-theme .topic-delete-btn {
    color: #888;
}

body.dark-theme .topic-delete-btn:hover {
    background: rgba(217, 48, 37, 0.2);
    color: #d93025;
}

/* ========== 弹窗 ========== */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10001 !important;
    padding: 20px !important;
}

#login-prompt-modal,
#scan-modal,
#edit-profile-modal,
#topic-modal,
#checkin-modal,
#checkin-success-modal,
#follow-list-modal,
#message-modal,
#message-list-modal,
#delete-post-modal,
#share-modal,
#post-actions-modal,
#settings-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2000 !important;
    padding: 20px !important;
}

/* 弹窗打开动画 */
#login-prompt-modal.modal-opening,
#scan-modal.modal-opening,
#edit-profile-modal.modal-opening,
#topic-modal.modal-opening,
#checkin-modal.modal-opening,
#checkin-success-modal.modal-opening,
#follow-list-modal.modal-opening,
#message-modal.modal-opening,
#message-list-modal.modal-opening,
#delete-post-modal.modal-opening,
#share-modal.modal-opening,
#post-actions-modal.modal-opening,
#settings-modal.modal-opening {
    animation: modalFadeIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 弹窗关闭动画 */
#login-prompt-modal.modal-closing,
#logout-modal.modal-closing,
#scan-modal.modal-closing,
#edit-profile-modal.modal-closing,
#topic-modal.modal-closing,
#checkin-modal.modal-closing,
#checkin-success-modal.modal-closing,
#follow-list-modal.modal-closing,
#message-modal.modal-closing,
#message-list-modal.modal-closing,
#delete-post-modal.modal-closing,
#share-modal.modal-closing,
#post-actions-modal.modal-closing,
#settings-modal.modal-closing {
    animation: modalFadeOut 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
    }
    to {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
    to {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
    }
}

.modal-content {
    background: #ffffff;
    padding: 28px;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 弹窗内容打开动画 */
.modal-opening .modal-content {
    animation: modalContentIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 弹窗内容关闭动画 */
.modal-closing .modal-content {
    animation: modalContentOut 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalContentOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #202124;
    font-size: 1.25rem;
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-content h3 i {
    color: #1a73e8;
}

/* 新用户首次登录：编辑资料引导弹窗 */
.new-user-welcome-content {
    max-width: 400px;
    text-align: center;
}

.new-user-welcome-icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.new-user-welcome-text {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.new-user-welcome-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.new-user-welcome-actions .btn {
    min-width: 120px;
}

body.dark-theme .new-user-welcome-text {
    color: rgba(255, 255, 255, 0.7);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #5f6368;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px 14px;
    border: 1px solid #dadce0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.edit-form {
    margin-bottom: 8px;
}

/* ========== 扫一扫 ========== */
.scan-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scan-area {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.scan-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scan-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid #1a73e8;
}

.scan-corner.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.scan-corner.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.scan-corner.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.scan-corner.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }

.scan-line {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1a73e8, transparent);
    animation: scanMove 2s infinite;
}

@keyframes scanMove {
    0%, 100% { top: 30%; }
    50% { top: 70%; }
}

.scan-hint {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffffff;
    font-size: 13px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.scan-actions {
    display: flex;
    gap: 12px;
}

.scan-actions .btn {
    flex: 1;
}

.scan-error, .scan-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.scan-error {
    background: #ffebee;
    color: #c62828;
}

.scan-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ========== 移动端底部导航（已移除，全部改入右侧抽屉） ========== */
.mobile-bottom-nav,
body.dark-theme .mobile-bottom-nav {
    display: none !important;
}

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 56px;
        background: transparent;
        border: none;
        border-radius: 10px;
        color: #888;
        font-size: 10px;
        font-weight: 500;
        cursor: pointer;
        gap: 3px;
        position: relative;
        transition: color 0.3s ease, background 0.3s ease;
        overflow: hidden;
    }

    .mobile-nav-item i {
        font-size: 20px;
        transition: transform 0.3s ease;
    }

    .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, #1a73e8, #4285f4);
        border-radius: 0 0 3px 3px;
        transition: width 0.3s ease;
    }

    .mobile-nav-item.active {
        color: #1a73e8;
        background: linear-gradient(180deg, rgba(26,115,232,0.08) 0%, rgba(26,115,232,0.02) 100%);
    }

    .mobile-nav-item.active::before {
        width: 40px;
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px) scale(1.1);
    }

    .mobile-nav-item.active span {
        font-weight: 600;
    }

    .mobile-nav-item:hover {
        color: #1a73e8;
    }

    .mobile-nav-item:hover i {
        transform: translateY(-1px);
    }

    body {
        padding-bottom: 60px;
    }

/* ========== 右下角浮动面板 ========== */
.floating-panel {
    position: fixed;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.floating-panel-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    text-decoration: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
}

.floating-panel-item:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.floating-panel-item .fp-tooltip {
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.85);
    color: #ffffff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.floating-panel-item:hover .fp-tooltip {
    opacity: 1;
}

/* ========== 右键菜单 ========== */
.context-menu {
    position: fixed;
    background: rgba(32, 33, 36, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top left;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}

.context-menu.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.context-menu-item:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.context-menu-item.disabled,
.context-menu-item.disabled:hover {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent !important;
    color: rgba(255,255,255,0.5) !important;
    pointer-events: none;
}

.context-menu-item i {
    width: 18px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

.context-menu-item:hover i {
    color: #ffffff;
}

.context-menu-separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 6px 8px;
}

/* 深色主题 - 全面覆盖 */
body.dark-theme {
    background-color: #0f0f1a;
    color: #e0e0e0;
}

body.dark-theme .top-navbar {
    background: transparent;
    border-bottom-color: transparent;
}

body.dark-theme .top-navbar.scrolled {
    background: rgba(26, 26, 46, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .top-navbar-logo,
body.dark-theme .top-navbar-links .top-nav-item,
body.dark-theme .top-navbar-right .nav-icon-btn {
    color: #e0e0e0;
}

body.dark-theme .top-nav-login-btn {
    background: #64b5f6;
    color: #fff;
}

body.dark-theme .card,
body.dark-theme .hero-card {
    background: #1e1e2e !important;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

body.dark-theme .card h3,
body.dark-theme .hero-text h1 {
    color: #e0e0e0;
}

body.dark-theme .view-more-link {
    color: #8ab4f8;
}

body.dark-theme .view-more-link:hover {
    color: #a8c7fa;
}

body.dark-theme .card p,
body.dark-theme .hero-text p {
    color: #a0a0a0;
}

body.dark-theme .profile-content .card {
    background: #1e1e2e !important;
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .section-header h2 {
    color: #e0e0e0;
}

body.dark-theme .btn.secondary {
    background: #2a2a3e;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.15);
}

body.dark-theme .btn.outline {
    background: transparent;
    color: #64b5f6;
    border-color: #64b5f6;
}

body.dark-theme .btn.outline:hover {
    background: rgba(100, 181, 246, 0.15);
    color: #90caf9;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.15);
}

body.dark-theme .banner-search-box {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

body.dark-theme .banner-search-box input {
    background: transparent;
    color: #fff;
}

body.dark-theme .banner-search-box input::placeholder {
    color: rgba(255,255,255,0.6);
}

body.dark-theme .mobile-menu {
    background: #1a1a2e;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme .mobile-menu-item {
    color: #e0e0e0;
}

body.dark-theme .context-menu {
    background: rgba(20, 20, 30, 0.9);
}

body.dark-theme .profile-top {
    background: rgba(30,30,46,0.4);
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .hero-stat {
    background: rgba(255,255,255,0.05);
}

body.dark-theme .user-popup {
    background: #1e1e2e;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .popup-item {
    color: #e0e0e0;
}

body.dark-theme .popup-item:hover {
    background: rgba(255,255,255,0.05);
}

body.dark-theme .popup-divider {
    background: rgba(255,255,255,0.1);
}

body.dark-theme .level-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

body.dark-theme .level-progress-bar {
    background: rgba(255,255,255,0.1);
}

body.dark-theme .profile-stat-item {
    color: #e0e0e0;
}

body.dark-theme .news-list .news-item {
    background: #252538;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .resource-card {
    background: #252538;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .topic-item {
    background: #252538;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .topic-author-name {
    color: #e0e0e0;
}

body.dark-theme .topic-card-time {
    color: #8a8a9a;
}

body.dark-theme .topic-card-footer {
    border-top-color: rgba(255,255,255,0.08);
}

body.dark-theme .news-title {
    color: #e0e0e0;
}

body.dark-theme .news-meta {
    color: #888;
}

body.dark-theme .topic-title {
    color: #e0e0e0;
}

body.dark-theme .topic-excerpt {
    color: #a0a0a0;
}

body.dark-theme .topic-footer {
    color: #888;
}

body.dark-theme .topic-tag {
    background: rgba(26,115,232,0.2);
    color: #64b5f6;
}

body.dark-theme .topic-tag-item {
    background: rgba(255,255,255,0.08);
    color: #aaa;
}

body.dark-theme .topic-tag-item:hover {
    background: rgba(26,115,232,0.2);
    color: #64b5f6;
}

body.dark-theme .topic-stats-num {
    color: #e0e0e0;
}

body.dark-theme .topic-stat-label {
    color: #888;
}

body.dark-theme .resource-title {
    color: #e0e0e0;
}

body.dark-theme .resource-version {
    color: #888;
}

body.dark-theme .resource-desc {
    color: #a0a0a0;
}

body.dark-theme .resource-icon {
    background: rgba(26,115,232,0.2);
    color: #64b5f6;
}

body.dark-theme .resource-tag {
    background: #3a3a4e;
    color: #b0b0b0;
}

body.dark-theme .resource-meta {
    color: #888;
}

body.dark-theme .resource-footer {
    border-top-color: rgba(255,255,255,0.06);
}

body.dark-theme .category-item {
    background: #252538;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .category-item:hover {
    background: #2d2d44;
    border-color: rgba(255,255,255,0.12);
}

body.dark-theme .category-icon {
    background: rgba(26,115,232,0.2);
    color: #64b5f6;
}

body.dark-theme .category-info h4 {
    color: #e0e0e0;
}

body.dark-theme .category-info p {
    color: #888;
}

body.dark-theme .filter-chip {
    background: #252538;
    color: #b0b0b0;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .filter-chip.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

body.dark-theme .history-item {
    background: #252538;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .search-result-item {
    background: #252538;
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .result-title {
    color: #e0e0e0;
}

body.dark-theme .result-meta {
    color: #888;
}

body.dark-theme .search-empty p {
    color: #a0a0a0;
}

body.dark-theme .search-section h1 {
    color: #e0e0e0;
}

body.dark-theme .search-section p {
    color: #a0a0a0;
}

body.dark-theme .search-box {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .search-box i {
    color: #888;
}

body.dark-theme .search-box input {
    background: transparent;
    color: #e0e0e0;
}

body.dark-theme .search-box input::placeholder {
    color: #666;
}

body.dark-theme .search-box .btn {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

body.dark-theme .search-box .btn:hover {
    background: #1557b0;
    border-color: #1557b0;
}

body.dark-theme .search-history-header h4 {
    color: #e0e0e0;
}

body.dark-theme .search-history-section {
    background: #252538;
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .search-history-header {
    border-bottom-color: rgba(255,255,255,0.06);
}

body.dark-theme .history-item:hover {
    background: #353550;
}

/* ========== 消息/聊天组件深色主题 ========== */
body.dark-theme .message-modal-content,
body.dark-theme .message-list-modal-content {
    background: #1e1e2e;
    color: #e0e0e0;
}

body.dark-theme .message-header,
body.dark-theme .message-list-header {
    border-bottom-color: rgba(255,255,255,0.08);
    color: #e0e0e0;
}

body.dark-theme .message-list-header h3 {
    color: #e0e0e0;
}

body.dark-theme .message-user-info span {
    color: #e0e0e0;
}

body.dark-theme .message-body {
    background: #1a1a2a;
}

body.dark-theme .message-input-area {
    border-top-color: rgba(255,255,255,0.08);
    background: #1e1e2e;
}

body.dark-theme .message-input-area input {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

body.dark-theme .message-input-area input::placeholder {
    color: #666;
}

body.dark-theme .message-input-area input:focus {
    border-color: #64b5f6;
}

body.dark-theme .message-list-tabs {
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .ml-tab {
    color: #888;
}

body.dark-theme .ml-tab.active {
    color: #64b5f6;
    border-bottom-color: #64b5f6;
}

body.dark-theme .ml-tab:hover:not(.active) {
    background: rgba(255,255,255,0.05);
    color: #bbb;
}

body.dark-theme .message-list-item {
    border-bottom-color: rgba(255,255,255,0.04);
}

body.dark-theme .message-list-item:hover {
    background: #252538;
}

body.dark-theme .message-list-item.unread {
    background: rgba(100, 181, 246, 0.1);
}

body.dark-theme .message-list-item.unread:hover {
    background: rgba(100, 181, 246, 0.18);
}

body.dark-theme .message-list-nickname {
    color: #e0e0e0;
}

body.dark-theme .message-list-time {
    color: #888;
}

body.dark-theme .message-list-preview {
    color: #aaa;
}

body.dark-theme .message-empty {
    color: #888;
}

body.dark-theme .message-time {
    color: #888;
}

body.dark-theme .top-nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #64b5f6;
}

body.dark-theme .top-nav-item.active {
    background: rgba(26,115,232,0.2);
    color: #64b5f6;
}

body.dark-theme .mobile-menu {
    background: #1a1a2e;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme .mobile-menu-item {
    color: #e0e0e0;
}

body.dark-theme .mobile-menu-item:hover {
    background: rgba(255,255,255,0.05);
}

body.dark-theme .mobile-menu-divider {
    background: rgba(255,255,255,0.08);
}

body.dark-theme .mobile-menu-user {
    background: rgba(255,255,255,0.05);
}

body.dark-theme .mobile-menu-user-nick {
    color: #e0e0e0;
}

body.dark-theme .mobile-menu-user-name {
    color: #9aa0a6;
}

body.dark-theme .mobile-bottom-nav {
    background: #1a1a2e;
    border-top-color: rgba(255,255,255,0.08);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

body.dark-theme .mobile-nav-item {
    color: #888;
}

body.dark-theme .mobile-nav-item::before {
    background: linear-gradient(90deg, #64b5f6, #90caf9);
}

body.dark-theme .mobile-nav-item.active {
    color: #64b5f6;
    background: linear-gradient(180deg, rgba(100,181,246,0.15) 0%, rgba(100,181,246,0.02) 100%);
}

body.dark-theme .mobile-nav-item:hover {
    color: #64b5f6;
}

body.dark-theme .floating-panel-item {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
    color: #b0b0b0;
}

body.dark-theme .floating-panel-item:hover {
    background: #323248;
    color: #64b5f6;
}

body.dark-theme .fp-qq-popup {
    background: #1e1e2e;
    color: #e0e0e0;
}

body.dark-theme .fp-qq-popup p {
    color: #e0e0e0;
}

body.dark-theme .fp-qq-popup a {
    color: #64b5f6;
}

body.dark-theme .nav-icon-btn {
    color: #e0e0e0;
}

body.dark-theme .nav-icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #64b5f6;
}

body.dark-theme .publish-btn {
    background: transparent;
    color: #b0b0b0;
}

body.dark-theme .publish-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #64b5f6;
}

body.dark-theme .btn.primary {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
}

body.dark-theme .btn.primary:hover {
    background: linear-gradient(135deg, #1557b0, #1a73e8);
}

body.dark-theme .btn.danger {
    background: #c62828;
}

body.dark-theme .btn.success {
    background: #2e7d32;
}

body.dark-theme .modal-content {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .modal-content h3 {
    color: #e0e0e0;
}

body.dark-theme .form-group label {
    color: #b0b0b0;
}

body.dark-theme .edit-form input,
body.dark-theme .edit-form textarea {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

body.dark-theme .edit-form input:focus,
body.dark-theme .edit-form textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

body.dark-theme .banner-search-box button {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
}

body.dark-theme .topic-tag-bg {
    background: #252538;
}

body.dark-theme .card-header {
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .empty-state {
    color: #888;
}

body.dark-theme .toast {
    background: #252538;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .toast.success {
    border-left-color: #4caf50;
}

body.dark-theme .toast.error {
    border-left-color: #f44336;
}

body.dark-theme .toast.info {
    border-left-color: #1a73e8;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: #3a3a4e;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #4a4a5e;
}

body.dark-theme .top-nav-login-btn {
    border-color: rgba(255,255,255,0.2);
}

body.dark-theme .user-avatar img {
    border-color: rgba(255,255,255,0.15);
}

body.dark-theme .badge {
    background: rgba(26,115,232,0.2);
    color: #64b5f6;
}

body.dark-theme .tab-item {
    color: #888;
    border-bottom-color: transparent;
}

body.dark-theme .tab-item.active {
    color: #64b5f6;
    border-bottom-color: #1a73e8;
}

body.dark-theme .tab-item:hover {
    color: #b0b0b0;
}

body.dark-theme .search-history-section {
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .clear-history-btn {
    color: #888;
}

body.dark-theme .clear-history-btn:hover {
    color: #e0e0e0;
}

body.dark-theme .history-delete {
    color: #666;
}

body.dark-theme .history-delete:hover {
    color: #c62828;
}

body.dark-theme .search-result-section h3 {
    color: #e0e0e0;
}

body.dark-theme .search-result-item:hover {
    background: #2d2d44;
}

body.dark-theme .user-result-item {
    border-color: rgba(255,255,255,0.06);
}

body.dark-theme .profile-bg-upload {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .avatar-cropper-modal .cropper-container {
    background: #1a1a2e;
}

body.dark-theme .notification-badge {
    background: #c62828;
    color: #fff;
}

body.dark-theme .hero-stat-num {
    color: #64b5f6;
}

body.dark-theme .hero-stat-label {
    color: #888;
}

body.dark-theme .banner-stats .stat-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .banner-stats .stat-num {
    color: #64b5f6;
}

body.dark-theme .banner-stats .stat-label {
    color: #a0a0a0;
}

body.dark-theme .nav-icon-btn.active {
    color: #64b5f6;
    background: rgba(26,115,232,0.15);
}

body.dark-theme .footer {
    background: #1a1a2e;
    border-top-color: rgba(255,255,255,0.08);
    color: #888;
}

body.dark-theme .footer a {
    color: #888;
}

body.dark-theme .footer a:hover {
    color: #64b5f6;
}

body.dark-theme .footer h4 {
    color: #e0e0e0;
}

.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

body.dark-theme .search-highlight {
    background: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

/* 浮动面板 - 简洁风格 */
.floating-panel {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

.floating-panel-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
    text-decoration: none;
    border: none;
    color: #5f6368;
    font-size: 16px;
    background: #ffffff;
    border: 1px solid #e8eaed;
}

.floating-panel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #f8f9fa;
    color: #1a73e8;
}

.floating-panel-item .fp-tooltip {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.85);
    color: #ffffff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.floating-panel-item:hover .fp-tooltip {
    opacity: 1;
}

/* QQ群二维码弹窗 */
.fp-qq-popup {
    position: absolute;
    right: 48px;
    bottom: 0;
    width: 180px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1001;
    text-align: center;
}

body.dark-theme .fp-qq-popup {
    background: #2a2a3e;
    border: 1px solid rgba(255,255,255,0.1);
}

.fp-qq:hover .fp-qq-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fp-qq-popup canvas {
    border-radius: 8px;
    margin-bottom: 10px;
}

.fp-qq-popup p {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 8px;
}

body.dark-theme .fp-qq-popup p {
    color: #b0b0b0;
}

.fp-qq-popup a {
    display: block;
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

/* 导航栏语言/主题切换按钮 */
.nav-mini-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5f6368;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
}

.nav-mini-toggle:hover {
    background: rgba(0,0,0,0.05);
    color: #1a73e8;
}

body.dark-theme .nav-mini-toggle {
    color: #e0e0e0;
}

body.dark-theme .nav-mini-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: #64b5f6;
}

body.dark-theme .nav-message-btn {
    color: #e0e0e0;
}

body.dark-theme .nav-message-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #64b5f6;
}

body.dark-theme .nav-message-btn .unread-badge {
    border-color: #1a1a2e;
}

body.dark-theme .floating-panel-item {
    background: #2a2a3e;
    border-color: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

body.dark-theme .floating-panel-item:hover {
    background: #3a3a4e;
    color: #64b5f6;
}

body.dark-theme .modal-content {
    background: #1e1e2e;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .modal-content h3 {
    color: #e0e0e0;
}

body.dark-theme .btn.primary {
    background: #64b5f6;
    color: #fff;
}

body.dark-theme .toast {
    background: #2a2a3e;
    color: #e0e0e0;
}

body.dark-theme .cropper-wrapper {
    background: #2a2a3e;
}

body.dark-theme .context-menu-item:hover {
    background: rgba(255,255,255,0.1);
}

body.dark-theme .user-popup-header {
    background: linear-gradient(135deg, #1e3a5c, #2a2a3e);
}

/* 裁剪器样式 */
.cropper-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

#cropper-canvas {
    max-width: 100%;
    border-radius: 8px;
    background: #f0f0f0;
    display: block;
}

#cropper-box {
    position: absolute;
    border: 2px dashed #1a73e8;
    background: rgba(26,115,232,0.1);
    cursor: move;
    box-sizing: border-box;
}

#cropper-box::before,
#cropper-box::after {
    content: '';
    position: absolute;
    background: rgba(26,115,232,0.5);
}

#cropper-box::before {
    top: 33%;
    left: 0;
    right: 0;
    height: 1px;
    box-shadow: 0 33% 0 rgba(26,115,232,0.5);
}

#cropper-box::after {
    left: 33%;
    top: 0;
    bottom: 0;
    width: 1px;
    box-shadow: 33% 0 0 rgba(26,115,232,0.5);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .banner-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .banner-subtitle {
        font-size: 1.1rem;
    }

    .banner-search-box {
        max-width: 100%;
    }

    .hero-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .hero-overlap {
        margin-top: -50px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }

    /* 首页/个人主页沉浸式：移动端导航栏 56px */
    body.home-page,
    body.profile-page {
        padding-top: 0;
    }

    body.home-page .banner-section {
        padding-top: calc(clamp(50px, 7vw, 110px) + 56px);
    }

    /* 移动端 main padding 为 16px，背景层上移该值贴顶；封面收窄 */
    body.profile-page .profile-bg-layer {
        top: -16px;
        height: 230px;
    }

    /* 信息卡骑跨位置（移动端） */
    body.profile-page .profile-content {
        padding: 140px 16px 0;
    }

    body.profile-page .profile-top {
        padding: 20px 16px 16px;
        gap: 16px;
    }

    body.profile-page .profile-avatar-large {
        width: 76px;
        height: 76px;
        margin-top: -38px;
    }

    /* 窄屏：粉丝/关注换到下一行，仍靠右显示，去掉竖向分隔线 */
    body.profile-page .profile-stats-row {
        gap: 28px;
        padding-left: 0;
        border-left: none;
    }

    body.profile-page .profile-stats-row .profile-stat-value {
        font-size: 18px;
    }

    .top-navbar {
        height: 56px;
    }

    .top-navbar-inner {
        height: 56px;
        padding: 0 16px;
        gap: 12px;
        justify-content: space-between;
    }

    .top-navbar-links,
    .top-navbar-right,
    .nav-mini-toggle {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-container {
        padding: 16px;
    }

    /* 响应式调整 - 个人主页卡片 */
    .profile-card {
        margin: 0 -16px 24px -16px;
        width: calc(100% + 32px);
    }

    .card {
        padding: 18px;
        border-radius: 12px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-tabs {
        justify-content: flex-start;
    }

    .hero-card {
        padding: 20px;
    }

    .banner-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .banner-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .banner-desc {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .banner-search-box {
        padding: 4px 4px 4px 16px;
    }

    .banner-search-box input {
        font-size: 14px;
        padding: 8px 8px;
    }

    .banner-search-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .hero-overlap {
        margin-top: -40px;
    }

    .hero-text h1 {
        font-size: 1.3rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .hero-stat {
        padding: 12px 8px;
    }

    .hero-stat-value {
        font-size: 1.2rem;
    }

    .profile-card {
        padding: 20px;
    }

    .profile-top {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .profile-stats-row {
        justify-content: center;
    }

    .profile-actions-row {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .profile-actions-row .btn {
        width: auto;
        flex: none;
    }
    
    .profile-actions-row .icon-btn {
        width: 44px;
        height: 44px;
    }

    .topic-item {
        flex-direction: column;
        gap: 12px;
    }

    /* 手机端文章/话题列表：强制一排两个 */
    .topics-list,
    #home-topics-list,
    #topics-list,
    #my-topics-list,
    #my-favorites-list,
    #my-view-history-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .topic-item {
        aspect-ratio: auto;
    }

    .topic-item:not(.home-topic-card) {
        padding: 10px;
    }

    .home-topic-card .topic-cover {
        aspect-ratio: 4 / 3;
    }

    .home-topic-card .topic-body {
        padding: 6px 10px 0;
    }

    .home-topic-card .topic-card-header {
        padding: 4px 10px 0;
    }

    .home-topic-card .topic-card-footer {
        margin: 4px 10px 0;
        padding: 4px 0 8px;
    }

    .topic-title {
        font-size: 13px !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0;
    }

    .topic-card-author-name,
    .topic-card-time {
        font-size: 11px !important;
    }

    .topic-card-footer span,
    .topic-card-footer i {
        font-size: 11px;
    }

    .topic-item.home-topic-card {
        padding: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    .topic-stats {
        flex-direction: row;
        gap: 16px;
    }

    .resources-list,
    .tools-list,
    .featured-resources {
        grid-template-columns: 1fr;
    }

    .categories-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }
    
    .floating-panel {
        right: 12px;
        bottom: 72px;
        gap: 8px;
    }
    
    .floating-panel-item {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .floating-panel-item .fp-tooltip {
        display: none;
    }
    
    .mobile-bottom-nav {
        bottom: 0;
    }

    /* ===== 手机端消息中心优化 ===== */
    body .message-list-modal-content.wechat-layout {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        padding: 0;
        border-radius: 0;
        flex-direction: column;
        position: relative;
    }

    body .chat-sidebar {
        width: 100%;
        height: 100%;
        border-right: none;
    }

    /* 聊天区覆盖整个弹窗（打开会话时） */
    body .chat-main {
        position: absolute;
        inset: 0;
        background: #ffffff;
        z-index: 10;
        display: none;
    }

    body .chat-main.chat-open {
        display: flex;
    }

    body.dark-theme .chat-main {
        background: #1e1e2e;
    }

    body .chat-back-btn {
        display: flex;
    }

    .message-list-item {
        padding: 12px 16px;
    }

    .message-list-avatar {
        width: 42px;
        height: 42px;
    }

    .notif-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .categories-list {
        grid-template-columns: 1fr;
    }

    .profile-stats-row {
        gap: 16px;
    }

    .filter-tab {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* ========== 编辑资料弹窗中的头像上传和背景设置 ========== */
.avatar-upload-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-upload-area {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 3px solid #e8eaed;
    transition: border-color 0.2s;
}

.avatar-upload-area:hover {
    border-color: #4facfe;
}

.avatar-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.avatar-upload-overlay i {
    font-size: 24px;
}

.avatar-upload-area:hover .avatar-upload-overlay {
    opacity: 1;
}

/* 背景上传区域 */
.bg-upload-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bg-upload-area {
    width: 100%;
    min-height: 100px;
    border: 2px dashed #e8eaed;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}

.bg-upload-area:hover {
    border-color: #4facfe;
}

.bg-upload-preview {
    width: 100%;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    gap: 8px;
    transition: all 0.2s;
}

.bg-upload-preview.has-bg {
    background-size: cover;
    background-position: center;
    color: transparent;
}

.bg-upload-preview i {
    font-size: 32px;
}

.bg-upload-preview span {
    font-size: 13px;
}

/* 预设背景 - 内联版本 */
.bg-presets-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-label {
    font-size: 12px;
    color: #666;
}

.preset-grid-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-item-inline {
    width: 36px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.preset-item-inline:hover {
    transform: scale(1.1);
}

.preset-item-inline.selected {
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.3);
}

.preset-item-inline.selected i {
    display: block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 10px;
}

.text-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    align-self: flex-start;
}

.text-btn:hover {
    text-decoration: underline;
}

/* ========== 页面切换动画 ========== */
.page-content {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 更复杂的页面切换效果 */
.page-content.slide-in {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 卡片淡入效果 */
.banner-section,
.card, .hero-card, .profile-card {
    animation: cardFadeIn 0.5s ease forwards;
}

.card:nth-child(2), .hero-card, .profile-card {
    animation-delay: 0.1s;
}

.banner-section {
    animation-delay: 0s;
}

.hero-card {
    animation-delay: 0.15s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 搜索页面样式 ========== */
.search-section {
    max-width: 800px;
    margin: 0 auto;
}

.search-header {
    text-align: center;
    margin-bottom: 32px;
}

.search-header h1 {
    font-size: 2rem;
    color: #1a73e8;
    margin-bottom: 8px;
}

.search-header h1 i {
    margin-right: 12px;
}

.search-header p {
    color: #5f6368;
    font-size: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.search-box i {
    color: #5f6368;
    font-size: 18px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px 0;
    background: transparent;
}

.search-box .btn {
    padding: 12px 28px;
}

/* 搜索历史 */
.search-history-section {
    max-width: 800px;
    margin: 0 auto 24px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8eaed;
    overflow: hidden;
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.search-history-header h4 {
    margin: 0;
    font-size: 14px;
    color: #5f6368;
    font-weight: 500;
}

.search-history-header h4 i {
    color: #1a73e8;
    margin-right: 6px;
}

.clear-history-btn {
    border: none;
    background: transparent;
    color: #80868b;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    color: #d93025;
    background: #fce8e6;
}

.search-history-list {
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #3c4043;
    max-width: 240px;
}

.history-item:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

.history-item i.fa-clock {
    font-size: 12px;
    color: #80868b;
}

.history-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-delete {
    border: none;
    background: transparent;
    color: #80868b;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.history-delete:hover {
    background: rgba(217, 48, 37, 0.15);
    color: #d93025;
}

.search-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.filter-chip {
    padding: 8px 20px;
    border: 2px solid #e8eaed;
    background: #ffffff;
    border-radius: 20px;
    font-size: 14px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.filter-chip.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

.search-results {
    min-height: 300px;
}

.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.search-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.search-empty p {
    font-size: 16px;
}

.search-result-section {
    margin-bottom: 32px;
}

.search-result-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a73e8;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f0fe;
}

.search-result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    cursor: pointer;
}

.search-result-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.result-title {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #5f6368;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-meta i {
    font-size: 12px;
}

/* ========== 等级系统样式 ========== */
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.profile-name-row h1 {
    margin: 0;
}

.level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 3;
}

/* 等级颜色（同时适用于个人主页和导航栏） */
.level-1, .nav-level-badge.level-1 { background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%); }  /* 灰色 */
.level-2, .nav-level-badge.level-2 { background: linear-gradient(135deg, #8bc34a 0%, #4caf50 100%); }  /* 绿色 */
.level-3, .nav-level-badge.level-3 { background: linear-gradient(135deg, #00bcd4 0%, #009688 100%); }  /* 青色 */
.level-4, .nav-level-badge.level-4 { background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%); }  /* 蓝色 */
.level-5, .nav-level-badge.level-5 { background: linear-gradient(135deg, #3f51b5 0%, #303f9f 100%); }  /* 深蓝 */
.level-6, .nav-level-badge.level-6 { background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%); }  /* 紫色 */
.level-7, .nav-level-badge.level-7 { background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%); }  /* 粉色 */
.level-8, .nav-level-badge.level-8 { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); }  /* 橙色 */
.level-9, .nav-level-badge.level-9 { background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%); }  /* 红色 */
.level-10, .nav-level-badge.level-10 { background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%); box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }  /* 金色 */

.level-number {
    font-size: 12px;
}

/* 等级进度条 */
.level-progress-wrapper {
    margin: 8px 0;
    max-width: 200px;
}

.level-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ff8c00 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.level-progress-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 深色背景下的进度条 */
.profile-content .level-progress-bar {
    background: rgba(0, 0, 0, 0.2);
}

.profile-content .level-progress-text {
    color: rgba(255, 255, 255, 0.9);
}

/* ========== 签到弹窗样式 ========== */
.checkin-modal-content {
    text-align: center;
    max-width: 400px;
    padding: 32px;
}

.checkin-header {
    margin-bottom: 24px;
}

.checkin-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.checkin-icon i {
    font-size: 36px;
    color: white;
}

.checkin-header h3 {
    color: #202124;
    margin-bottom: 8px;
}

.checkin-header p {
    color: #5f6368;
    margin: 0;
}

.checkin-streak {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.streak-day {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    background: #e8eaed;
    position: relative;
}

.streak-day.checked {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: white;
}

.streak-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: pulse 2s infinite;
}

.streak-day .streak-label {
    position: absolute;
    bottom: -18px;
    font-size: 10px;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.checkin-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.checkin-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkin-label {
    color: #5f6368;
    font-size: 14px;
}

.checkin-value {
    color: #1a73e8;
    font-weight: 600;
    font-size: 16px;
}

.checkin-value.double {
    color: #ff9800;
}

.checkin-actions {
    display: flex;
    justify-content: center;
}

.checkin-auto-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.checkin-auto-status.done {
    background: #e6f4ea;
    color: #1e7e34;
}

.checkin-auto-status.pending {
    background: #fff4e5;
    color: #b26a00;
    font-size: 13px;
    line-height: 1.5;
}

.btn.large {
    padding: 14px 32px;
    font-size: 16px;
}

/* 签到成功弹窗 */
.checkin-success-content {
    text-align: center;
    max-width: 360px;
    padding: 32px;
}

.checkin-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: bounce 0.5s ease;
}

.checkin-success-icon i {
    font-size: 36px;
    color: white;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.level-up-notice {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 16px 0;
    font-weight: 600;
    animation: glow 1.5s ease infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 152, 0, 0.8); }
}

/* 粉丝/关注统计 */
.profile-stat-item.clickable {
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-stat-item.clickable:hover {
    transform: scale(1.05);
}

/* 关注按钮状态 */
.btn.following {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.btn.following:hover {
    background: #fce8e6;
    color: #d93025;
    border-color: #d93025;
}

/* ========== 粉丝/关注列表弹窗样式 ========== */
.follow-list-modal-content {
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.follow-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f3f4;
}

.follow-list-header h3 {
    margin: 0;
    font-size: 18px;
}

/* 通用关闭按钮样式 */
.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #80868b;
    font-size: 16px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f1f3f4;
    color: #5f6368;
}

.close-btn:active {
    background: #e8eaed;
    transform: scale(0.95);
}

.close-btn i {
    font-size: 14px;
}

.follow-list-tabs {
    display: flex;
    border-bottom: 1px solid #f1f3f4;
}

.follow-tab {
    flex: 1;
    padding: 14px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.follow-tab:hover {
    color: #1a73e8;
    background: #f8f9fa;
}

.follow-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

.follow-tab .count {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.follow-tab.active .count {
    background: #1a73e8;
    color: white;
}

.follow-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    max-height: 400px;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.follow-item:hover {
    background: #f8f9fa;
}

.follow-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.follow-item-info {
    flex: 1;
    min-width: 0;
}

.follow-item-nickname {
    font-weight: 500;
    color: #202124;
    cursor: pointer;
}

.follow-item-nickname:hover {
    color: #1a73e8;
}

.follow-item-username {
    font-size: 12px;
    color: #5f6368;
}

.follow-item-bio {
    font-size: 12px;
    color: #80868b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-item-action {
    display: flex;
    gap: 8px;
}

.follow-empty {
    text-align: center;
    padding: 40px 20px;
    color: #80868b;
}

.follow-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

/* ========== 私信弹窗样式 ========== */
.message-modal-content {
    max-width: 480px;
    width: 100%;
    height: 600px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f3f4;
}

.message-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-user-info span {
    font-weight: 500;
    font-size: 16px;
    color: #202124;
}

.message-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    max-width: 70%;
    display: flex;
}

.message-item.sent {
    align-self: flex-end;
}

.message-item.received {
    align-self: flex-start;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-item.sent .message-bubble {
    background: #1a73e8;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-item.received .message-bubble {
    background: #f1f3f4;
    color: #202124;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #80868b;
    margin-top: 4px;
}

.message-item.sent .message-time {
    text-align: right;
}

/* 聊天消息中的链接 */
.message-bubble .chat-link {
    color: #1a73e8;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    word-break: break-all;
}

.message-bubble .chat-link:hover {
    text-decoration: none;
    opacity: 0.85;
}

/* 发送气泡（蓝底白字）中的链接用浅色以保证可读性 */
.message-item.sent .message-bubble .chat-link,
.message-item.sent .message-bubble .chat-link-official {
    color: #d6e4ff;
}

/* 深色模式下接收气泡中的链接颜色 */
body.dark-theme .message-item.received .message-bubble .chat-link {
    color: #8ab4f8;
}

/* 深色模式下非官方链接确认弹窗文字 */
body.dark-theme #external-link-confirm-modal p {
    color: #bdc1c6 !important;
}

.message-empty {
    text-align: center;
    padding: 40px 20px;
    color: #80868b;
}

.message-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.message-input-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f1f3f4;
}

.message-input-area input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.message-input-area input:focus {
    border-color: #1a73e8;
}

.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #1a73e8;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.send-btn:hover {
    background: #1557b0;
}

/* 表情按钮 */
.emoji-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #5f6368;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.emoji-btn:hover {
    background: #f1f3f4;
    color: #1a73e8;
}

body.dark-theme .emoji-btn {
    color: #e0e0e0;
}

body.dark-theme .emoji-btn:hover {
    background: rgba(255,255,255,0.08);
}

/* 表情选择面板 */
.emoji-picker {
    position: absolute;
    bottom: 64px;
    left: 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    width: 280px;
}

.emoji-item {
    font-size: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}

.emoji-item:hover {
    background: #f1f3f4;
    transform: scale(1.2);
}

body.dark-theme .emoji-picker {
    background: #1e1e2e;
    border-color: #2d2d3a;
}

body.dark-theme .emoji-item:hover {
    background: rgba(255,255,255,0.1);
}

/* 聊天容器设为 relative 以便表情面板绝对定位 */
.chat-view {
    position: relative;
}

/* ========== 导航栏头像等级徽章 ========== */
.nav-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.nav-level-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 10px;
    z-index: 3;
}

/* ========== 导航栏消息图标 ========== */
.nav-message-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    transition: all 0.2s;
}

.nav-message-btn:hover {
    background: #f1f3f4;
    color: #1a73e8;
}

.nav-message-btn .unread-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: #d93025;
    color: white;
    border-radius: 8px;
    font-size: 10px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ========== 消息列表弹窗 ========== */
.message-list-modal-content {
    max-width: 420px;
    width: 100%;
    max-height: 500px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* 微信风格双栏布局：左侧会话列表 + 右侧聊天内容 */
.message-list-modal-content.wechat-layout {
    max-width: 900px;
    width: 90vw;
    height: 80vh;
    max-height: 680px;
    flex-direction: row;
    overflow: hidden;
}

.chat-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f1f3f4;
    background: #fafafa;
}

.chat-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    gap: 12px;
}

.chat-empty i {
    font-size: 56px;
    opacity: 0.5;
}

.chat-empty p {
    margin: 0;
    font-size: 14px;
}

.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 选中会话高亮 */
.message-list-item.active-conv {
    background: #e8f0fe;
}

body.dark-theme .message-list-item.active-conv {
    background: rgba(138, 180, 248, 0.15);
}

body.dark-theme .chat-sidebar {
    background: #1e1e2e;
    border-right-color: #2d2d3a;
}

body.dark-theme .chat-sidebar-header {
    border-bottom-color: #2d2d3a;
}

/* 聊天区返回按钮（手机端显示） */
.chat-back-btn {
    display: none;
    background: transparent;
    border: none;
    color: #5f6368;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.chat-back-btn:hover {
    background: #f1f3f4;
}

body.dark-theme .chat-back-btn {
    color: #e0e0e0;
}

body.dark-theme .chat-back-btn:hover {
    background: rgba(255,255,255,0.08);
}

.message-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f3f4;
}

.message-list-header h3 {
    margin: 0;
    font-size: 18px;
}

.message-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    transition: opacity 0.2s ease;
}

.message-list-body.loading {
    opacity: 0.6;
}

.message-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.message-list-item:hover {
    background: #f8f9fa;
}

.message-list-item.unread {
    background: #fef7e0;
}

.message-list-item.unread:hover {
    background: #fce8c6;
}

.message-list-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

/* 通知列表项的头像（复用会话头像尺寸） */
.notif-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.message-list-info {
    flex: 1;
    min-width: 0;
}

.message-list-nickname {
    font-weight: 500;
    color: #202124;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-list-time {
    font-size: 11px;
    color: #80868b;
}

.message-list-preview {
    font-size: 13px;
    color: #5f6368;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #80868b;
}

.message-list-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

/* 消息列表标签页 */
.message-list-tabs {
    display: flex;
    border-bottom: 1px solid #f1f3f4;
    padding: 0 24px;
}

.ml-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.ml-tab:hover {
    color: #1a73e8;
}

.ml-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.ml-badge {
    background: #d93025;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}

/* 通知图标 */
.notif-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: #d93025;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 导航栏消息按钮徽章 */
.unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #d93025;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
}

/* 导航栏消息按钮 */
.nav-message-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #5f6368;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.nav-message-btn:hover {
    background: #f1f3f4;
    color: #1a73e8;
}

/* 顶部用户信息区域 */
.top-nav-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 图标按钮 - 小号圆角按钮 */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
}

.icon-btn i {
    font-size: 16px;
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-btn.primary {
    background: #1a73e8;
    color: white;
}

.icon-btn.primary:hover {
    background: #1557b0;
}

.icon-btn.secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.icon-btn.secondary:hover {
    background: #e8eaed;
    color: #1a73e8;
}

.icon-btn.danger {
    background: #fce8e6;
    color: #d93025;
}

.icon-btn.danger:hover {
    background: #d93025;
    color: white;
}

.icon-btn.success {
    background: #e6f4ea;
    color: #137333;
}

.icon-btn.success:hover {
    background: #137333;
    color: white;
}

/* 按钮提示文字 */
.icon-btn .btn-tooltip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.icon-btn:hover .btn-tooltip {
    opacity: 1;
}

/* 按钮容器 */
.profile-actions-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ========== 空状态样式 ========== */
.empty-topics {
    text-align: center;
    padding: 40px 20px;
    color: #80868b;
}

.empty-topics i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.empty-topics p {
    margin: 12px 0;
    font-size: 14px;
}

/* ========== 帖子详情弹窗样式 ========== */
#post-detail-modal {
    animation: fadeIn 0.2s ease;
}

#post-detail-modal > div:first-child {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 社区话题列表样式 ========== */
.topic-item {
    transition: all 0.2s ease;
}

.topic-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* ========== 深色主题样式补充 ========== */
body.dark-theme #post-detail-modal > div:first-child {
    background: #1e1e2e;
    color: #e0e0e0;
}

body.dark-theme #post-detail-modal h1 {
    color: #e0e0e0;
}

body.dark-theme #post-detail-modal p,
body.dark-theme #post-detail-modal span {
    color: #b0b0b0;
}

body.dark-theme .empty-topics {
    color: #888;
}

body.dark-theme .topic-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ========== 设置面板样式 ========== */
.settings-modal-content {
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8eaed;
}

.settings-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-header h3 i {
    color: #1a73e8;
}

.settings-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
}

.settings-close-btn:hover {
    background: #f1f3f4;
    color: #202124;
}

.settings-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px 0;
    border-bottom: 1px solid #e8eaed;
}

.settings-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    color: #5f6368;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.settings-tab:hover {
    background: #f8f9fa;
    color: #202124;
}

.settings-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    background: #e8f0fe;
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 13px;
    color: #5f6368;
    margin: 0 0 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-section h4 i {
    color: #1a73e8;
    font-size: 12px;
}

.settings-section.danger-zone h4 {
    color: #d93025;
}

.settings-section.danger-zone h4 i {
    color: #d93025;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.setting-item:hover {
    background: #f1f3f4;
}

.setting-info {
    flex: 1;
    min-width: 0;
}

.setting-label {
    display: block;
    font-size: 14px;
    color: #202124;
    font-weight: 500;
    margin-bottom: 2px;
}

.setting-desc {
    display: block;
    font-size: 12px;
    color: #80868b;
}

.setting-value {
    font-size: 14px;
    color: #5f6368;
    font-weight: 500;
}

.setting-item .btn.small {
    padding: 6px 14px;
    font-size: 13px;
}

.setting-item .btn.small.danger {
    background: #d93025;
    color: white;
}

.setting-item .btn.small.danger:hover {
    background: #c5221f;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dadce0;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #1a73e8;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Theme options */
.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.theme-option {
    cursor: pointer;
    text-align: center;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.2s;
}

.theme-option:hover {
    background: #f8f9fa;
}

.theme-option.active {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.theme-preview .preview-header {
    height: 16px;
}

.theme-preview .preview-body {
    flex: 1;
}

.light-preview {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.light-preview .preview-header {
    background: #1a73e8;
}

.dark-preview {
    background: #1e1e2e;
}

.dark-preview .preview-header {
    background: #3b82f6;
}

.auto-preview {
    background: linear-gradient(90deg, #fff 50%, #1e1e2e 50%);
}

.auto-preview .preview-header {
    background: linear-gradient(90deg, #1a73e8 50%, #3b82f6 50%);
}

.theme-name {
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
}

.theme-option.active .theme-name {
    color: #1a73e8;
}

/* Font size options */
.font-size-options {
    display: flex;
    gap: 8px;
}

.font-size-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    font-size: 14px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.font-size-btn:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.font-size-btn.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

/* Language options */
.language-options select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #202124;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.language-options select:focus {
    border-color: #1a73e8;
}

/* Dark theme for settings */
body.dark-theme .settings-header {
    background: #1e1e2e;
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .settings-header h3 {
    color: #e0e0e0;
}

body.dark-theme .settings-close-btn {
    color: #aaa;
}

body.dark-theme .settings-close-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
}

body.dark-theme .settings-tabs {
    background: #1e1e2e;
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .settings-tab {
    color: #aaa;
}

body.dark-theme .settings-tab:hover {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
}

body.dark-theme .settings-tab.active {
    color: #8ab4f8;
    border-bottom-color: #8ab4f8;
    background: rgba(138,180,248,0.1);
}

body.dark-theme .settings-body {
    background: #1e1e2e;
}

body.dark-theme .settings-section h4 {
    color: #aaa;
}

body.dark-theme .setting-item {
    background: #252538;
}

body.dark-theme .setting-item:hover {
    background: #2d2d44;
}

body.dark-theme .setting-label {
    color: #e0e0e0;
}

body.dark-theme .setting-desc {
    color: #888;
}

body.dark-theme .setting-value {
    color: #aaa;
}

body.dark-theme .slider {
    background-color: #444;
}

body.dark-theme input:checked + .slider {
    background-color: #8ab4f8;
}

body.dark-theme input:checked + .slider:before {
    background-color: #1e1e2e;
}

body.dark-theme .theme-option:hover {
    background: rgba(255,255,255,0.08);
}

body.dark-theme .theme-option.active {
    border-color: #8ab4f8;
    background: rgba(138,180,248,0.15);
}

body.dark-theme .theme-name {
    color: #aaa;
}

body.dark-theme .theme-option.active .theme-name {
    color: #8ab4f8;
}

body.dark-theme .font-size-btn {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
    color: #aaa;
}

body.dark-theme .font-size-btn:hover {
    border-color: #8ab4f8;
    color: #8ab4f8;
}

body.dark-theme .font-size-btn.active {
    background: #8ab4f8;
    border-color: #8ab4f8;
    color: #1a1a2e;
}

body.dark-theme .language-options select {
    background: #252538;
    border-color: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

@media (max-width: 600px) {
    .settings-modal-content {
        max-height: 90vh;
        margin: 10px;
        border-radius: 16px;
    }

    .settings-header {
        padding: 16px;
    }

    .settings-tabs {
        padding: 10px 16px 0;
        overflow-x: auto;
        gap: 2px;
    }

    .settings-tab {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .settings-body {
        padding: 16px;
    }

    .theme-options {
        grid-template-columns: 1fr;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ========== 文章审核状态 ========== */

.post-status-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    vertical-align: middle;
    margin-left: 6px;
}

.post-status-badge.pending {
    background: #fef7e0;
    color: #b06000;
}

.post-status-badge.rejected {
    background: #fce8e6;
    color: #c5221f;
}

.review-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.review-banner.pending {
    background: #fef7e0;
    color: #b06000;
    border: 1px solid #fde293;
}

.review-banner.rejected {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f6aea9;
}
