﻿        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
            transition: all 0.3s ease;
        }

        :root {
            --bg-primary: #0f0f1a;
            --bg-secondary: #1a1a2e;
            --bg-card: rgba(25, 25, 40, 0.8);
            --text-primary: #ffffff;
            --text-secondary: #a0a0b0;
            --border-color: rgba(255,255,255,0.1);
            --accent: #fe2c55;
            --accent-blue: #25f4ee;
            --gradient: linear-gradient(135deg, #fe2c55, #25f4ee);
            --shadow: 0 8px 32px rgba(0,0,0,0.3);
            --carousel-btn: rgba(25, 25, 40, 0.6);
        }

        [data-mode="light"] {
            --bg-primary: #f8f9fc;
            --bg-secondary: #ffffff;
            --bg-card: rgba(255,255,255,0.9);
            --text-primary: #1a1a2e;
            --text-secondary: #64748b;
            --border-color: rgba(0,0,0,0.08);
            --carousel-btn: rgba(255, 255, 255, 0.7);
        }

        body {
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        .navbar {
            position: sticky;
            top: 0;
            z-index: 99;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 32px;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-color);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 24px;
            font-weight: 700;
            cursor: pointer;
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 20px;
        }

        .logo-text {
            background: var(--gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .nav-center {
            display: flex;
            gap: 8px;
        }

        .nav-tab {
            padding: 10px 20px;
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            border: none;
            background: transparent;
            white-space: nowrap;
        }

        .nav-tab:hover {
            color: var(--text-primary);
            background: var(--bg-card);
        }

        .nav-tab.active {
            background: var(--accent);
            color: #fff;
        }

        /* 顶部搜索栏 */
        .nav-search {
            display: flex;
            align-items: center;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 0 4px;
        }

        .nav-search:focus-within {
            border-color: var(--accent);
        }

        .nav-search input {
            width: 220px;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 14px;
            padding: 8px 12px;
            outline: none;
        }

        .nav-search input::placeholder {
            color: var(--text-secondary);
            font-size: 13px;
        }

        .nav-search-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: var(--accent);
            color: #fff;
            border: none;
            cursor: pointer;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 2px;
        }

        .nav-right {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .mode-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .mode-btn:hover {
            background: var(--accent);
            color: #fff;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
            cursor: pointer;
            font-size: 16px;
        }

        .main {
            flex: 1;
            display: flex;
            gap: 24px;
            padding: 24px;
        }

        .sidebar {
            width: 260px;
            background: var(--bg-secondary);
            border-radius: 20px;
            padding: 24px;
            border: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            gap: 20px;
            flex-shrink: 0;
        }

        .sidebar-title {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 6px;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: 12px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 15px;
        }

        .sidebar-item:hover {
            background: var(--bg-card);
            color: var(--text-primary);
        }

        .sidebar-item.active {
            background: var(--accent);
            color: #fff;
            font-weight: 600;
        }

        .visit-stats {
            margin-top: auto;
            padding: 16px;
            background: var(--bg-card);
            border-radius: 12px;
        }

        .visit-stats-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }

        .visit-stats-row .count {
            color: var(--accent);
            font-weight: 700;
            font-size: 15px;
        }

        .visit-stats-row:last-child {
            margin-bottom: 0;
        }

        /* 数据库容量 */
        .db-stats {
            margin-top: 12px;
            padding: 16px;
            background: var(--bg-card);
            border-radius: 12px;
        }

        .db-stats-title {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 10px;
        }

        .db-stats-bar-bg {
            width: 100%;
            height: 8px;
            background: var(--bg-secondary);
            border-radius: 999px;
            overflow: hidden;
            margin-bottom: 8px;
        }

        .db-stats-bar-fill {
            height: 100%;
            background: var(--gradient);
            border-radius: 999px;
            transition: width 0.6s ease;
        }

        .db-stats-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .db-stats-info span:first-child {
            color: var(--accent-blue);
            font-weight: 600;
        }

        /* 登录/注册弹窗 */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(6px);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease;
        }
        .modal-overlay.hidden { display: none; }
        .modal-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 32px;
            width: 100%;
            max-width: 400px;
            box-shadow: var(--shadow);
        }
        .modal-card h2 {
            text-align: center;
            margin-bottom: 8px;
            font-size: 22px;
            color: var(--text-primary);
        }
        .modal-card .modal-subtitle {
            text-align: center;
            color: var(--text-secondary);
            font-size: 13px;
            margin-bottom: 24px;
        }
        .modal-card input {
            width: 100%;
            padding: 12px 16px;
            margin-bottom: 14px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 15px;
            outline: none;
        }
        .modal-card input:focus { border-color: var(--accent-blue); }
        .modal-card .modal-btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin-bottom: 10px;
        }
        .modal-btn.primary {
            background: var(--gradient);
            color: white;
        }
        .modal-btn.secondary {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
        }
        .modal-card .modal-switch {
            text-align: center;
            color: var(--text-secondary);
            font-size: 13px;
        }
        .modal-card .modal-switch span {
            color: var(--accent-blue);
            cursor: pointer;
            font-weight: 600;
        }
        .modal-card .modal-error {
            text-align: center;
            color: var(--accent);
            font-size: 13px;
            margin-bottom: 10px;
            display: none;
        }
        .modal-close {
            position: absolute;
            top: 12px;
            right: 16px;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 22px;
            cursor: pointer;
        }

        /* 论坛评论 */
        .forum-comments-section {
            border-top: 1px solid var(--border-color);
            margin-top: 10px;
            padding-top: 10px;
        }
        .forum-comment-item {
            display: flex;
            gap: 10px;
            padding: 8px 0;
            border-bottom: 1px solid var(--border-color);
        }
        .forum-comment-item:last-child { border-bottom: none; }
        .forum-comment-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .forum-comment-body {
            flex: 1;
            min-width: 0;
        }
        .forum-comment-username {
            font-size: 12px;
            font-weight: 600;
            color: var(--accent-blue);
        }
        .forum-comment-content {
            font-size: 13px;
            color: var(--text-primary);
            margin: 2px 0;
            word-break: break-word;
        }
        .forum-comment-time {
            font-size: 11px;
            color: var(--text-secondary);
        }
        .forum-comment-delete {
            background: none;
            border: none;
            color: var(--accent);
            font-size: 12px;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .forum-comment-delete:hover { background: rgba(254,44,85,0.1); }

        /* 帖子置顶标记 */
        .pin-badge {
            display: inline-flex; align-items: center; gap: 3px;
            padding: 2px 8px; border-radius: 999px; background: rgba(254,44,85,0.15);
            color: var(--accent); font-size: 11px; font-weight: 500;
        }
        .topic-badge {
            display: inline-block; padding: 2px 10px; border-radius: 999px;
            background: rgba(37,244,238,0.12); color: var(--accent-blue);
            font-size: 11px; font-weight: 500;
        }

        /* 论坛详情页样式 */
        .forum-detail-back {
            display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
            padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border-color);
            border-radius: 10px; color: var(--text-secondary); cursor: pointer; font-size: 14px;
        }
        .forum-detail-back:hover { border-color: var(--accent); color: var(--text-primary); }

        .forum-detail-card {
            background: var(--bg-card); border: 1px solid var(--border-color);
            border-radius: 16px; padding: 28px; margin-bottom: 24px;
        }
        .forum-detail-card.pinned { border-color: rgba(254,44,85,0.5); }
        .forum-detail-header {
            display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
        }
        .forum-detail-avatar {
            width: 50px; height: 50px; border-radius: 50%; background: var(--gradient);
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-weight: 700; font-size: 20px; flex-shrink: 0;
        }
        .forum-detail-user-info { flex: 1; }
        .forum-detail-username { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
        .louzhu-tag {
            display: inline-block; padding: 1px 8px; border-radius: 999px;
            background: rgba(254,44,85,0.12); color: var(--accent); font-size: 11px;
        }
        .forum-detail-time { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
        .forum-detail-content {
            font-size: 16px; line-height: 1.8; margin: 16px 0;
            white-space: pre-wrap; word-break: break-word;
        }
        .forum-detail-images { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
        .forum-detail-images img {
            max-width: 250px; max-height: 250px; border-radius: 12px;
            object-fit: cover; cursor: pointer; border: 1px solid var(--border-color);
        }

        /* 评论区增强 */
        .forum-comments-full { margin-top: 0; }
        .forum-comments-title {
            font-size: 17px; font-weight: 600; margin-bottom: 16px;
            display: flex; align-items: center; gap: 8px;
        }
        .forum-comments-title .count { color: var(--accent); font-size: 14px; }
        .forum-comment-item-full {
            display: flex; gap: 12px; padding: 14px 16px;
            border-bottom: 1px solid var(--border-color);
            transition: background 0.15s;
        }
        .forum-comment-item-full:last-child { border-bottom: none; }
        .forum-comment-item-full.pinned { background: rgba(254,44,85,0.03); border-left: 3px solid var(--accent); padding-left: 13px; }
        .comment-floor {
            width: 32px; height: 32px; border-radius: 6px; background: var(--bg-secondary);
            display: flex; align-items: center; justify-content: center;
            font-size: 11px; color: var(--text-secondary); font-weight: 600; flex-shrink: 0;
        }
        .comment-floor.louzhu { background: rgba(254,44,85,0.15); color: var(--accent); }
        .comment-body-full { flex: 1; min-width: 0; }
        .comment-username-full {
            font-size: 13px; font-weight: 600; color: var(--accent-blue); margin-bottom: 2px;
            display: flex; align-items: center; gap: 6px;
        }
        .comment-pin-badge {
            display: inline-flex; align-items: center; gap: 2px;
            padding: 1px 6px; border-radius: 999px; background: rgba(254,44,85,0.12);
            color: var(--accent); font-size: 10px;
        }
        .comment-content-full { font-size: 14px; line-height: 1.6; word-break: break-word; }
        .comment-reply-to {
            display: inline-block; padding: 2px 8px; background: var(--bg-secondary);
            border-radius: 4px; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px;
        }
        .comment-reply-to span { color: var(--accent-blue); }
        .comment-footer-full {
            display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--text-secondary);
            align-items: center; flex-wrap: wrap;
        }
        .comment-footer-full .reply-btn { cursor: pointer; }
        .comment-footer-full .reply-btn:hover { color: var(--accent-blue); }
        .comment-footer-full .delete-btn { cursor: pointer; color: #ff4d4f; }
        .comment-footer-full .delete-btn:hover { opacity: 0.7; }
        .comment-footer-full .pin-comment-btn { cursor: pointer; color: var(--accent); }
        .comment-footer-full .pin-comment-btn:hover { opacity: 0.7; }

        /* 评论回复输入框 */
        .comment-reply-box {
            display: none; margin-top: 8px; padding: 10px;
            background: var(--bg-secondary); border-radius: 10px;
        }
        .comment-reply-box.show { display: flex; gap: 8px; align-items: center; }
        .comment-reply-box input {
            flex: 1; padding: 8px 12px; background: var(--bg-card);
            border: 1px solid var(--border-color); border-radius: 8px;
            color: var(--text-primary); font-size: 13px; outline: none;
        }
        .comment-reply-box input:focus { border-color: var(--accent-blue); }
        .comment-reply-box button {
            padding: 8px 16px; background: var(--gradient); border: none;
            border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
        }
        .comment-reply-box .cancel-reply {
            background: var(--bg-card); color: var(--text-secondary);
            border: 1px solid var(--border-color);
        }

        .forum-comment-input-bar {
            display: flex; gap: 10px; margin-top: 20px; padding: 16px;
            background: var(--bg-card); border-radius: 14px; border: 1px solid var(--border-color);
        }
        .forum-comment-input-bar input {
            flex: 1; padding: 10px 16px; background: var(--bg-secondary);
            border: 1px solid var(--border-color); border-radius: 10px;
            color: var(--text-primary); font-size: 14px; outline: none;
        }
        .forum-comment-input-bar input:focus { border-color: var(--accent-blue); }
        .forum-comment-input-bar button {
            padding: 10px 24px; background: var(--gradient); border: none;
            border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
        }
        .forum-comment-input-bar button:disabled { opacity: 0.5; cursor: not-allowed; }

        .forum-post-card.pinned { border-color: rgba(254,44,85,0.5); background: rgba(254,44,85,0.04); }
        .forum-post-title-line {
            font-size: 16px; font-weight: 600; margin-bottom: 6px;
            display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
        }

        .content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 24px;
            overflow-y: auto;
        }

        /* 轮播图 */
        .carousel {
            width: 100%;
            height: 320px;
            border-radius: 20px;
            overflow: hidden;
            position: relative;
            box-shadow: var(--shadow);
        }

        .carousel-item {
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0;
            padding: 40px 60px;
            display: flex;
            align-items: center;
            transition: opacity 0.5s ease;
            cursor: pointer;
        }

        .carousel-item.active {
            opacity: 1;
        }

        .carousel-content {
            max-width: 600px;
            pointer-events: none;
        }

        .carousel-title {
            font-size: 42px;
            font-weight: 800;
            margin-bottom: 12px;
            background: var(--gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .carousel-desc {
            font-size: 17px;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .carousel-nav {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 2;
        }

        .carousel-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--border-color);
            cursor: pointer;
        }

        .carousel-dot.active {
            background: var(--accent);
        }

        .carousel-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--carousel-btn);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 3;
        }

        .prev { left: 20px; }
        .next { right: 20px; }

        .carousel-btn:hover {
            background: var(--accent);
            color: #fff;
        }

        /* 跳转链接卡片 */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .section-header h2 {
            font-size: 20px;
        }

        .link-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 16px;
        }

        .link-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 24px 20px;
            text-align: center;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .link-card:hover {
            transform: translateY(-6px);
            border-color: var(--accent);
            box-shadow: var(--shadow);
        }

        .link-card-icon {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
        }

        .link-card-name {
            font-weight: 600;
            font-size: 15px;
        }

        .link-card-desc {
            font-size: 12px;
            color: var(--text-secondary);
        }

        /* 快捷入口 */
        .quick-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 16px;
        }

        .quick-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 28px;
            text-align: center;
            cursor: pointer;
        }

        .quick-card:hover {
            transform: translateY(-6px);
            border-color: var(--accent);
        }

        .quick-card-icon {
            width: 60px;
            height: 60px;
            border-radius: 16px;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            margin: 0 auto 14px;
            color: #fff;
        }

        .quick-card h3 {
            font-size: 17px;
            margin-bottom: 6px;
        }

        .quick-card p {
            font-size: 13px;
            color: var(--text-secondary);
        }

        /* 最近帖子 */
        .post-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .post-item {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            padding: 16px;
            background: var(--bg-card);
            border-radius: 12px;
            border: 1px solid var(--border-color);
            cursor: pointer;
        }

        .post-item:hover {
            border-color: var(--accent);
        }

        .post-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
            flex-shrink: 0;
        }

        .post-body {
            flex: 1;
            min-width: 0;
        }

        .post-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }

        .post-username {
            font-weight: 600;
            font-size: 14px;
        }

        .post-time {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .post-content {
            font-size: 14px;
            line-height: 1.6;
            color: var(--text-secondary);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .post-meta {
            display: flex;
            gap: 16px;
            margin-top: 8px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .post-meta span {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .post-building {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 999px;
            background: rgba(254, 44, 85, 0.15);
            color: var(--accent);
            font-size: 12px;
            margin-right: 8px;
        }

        .footer {
            height: 50px;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 14px;
            flex-shrink: 0;
        }

        /* 内嵌论坛样式 */
        .forum-embedded {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .forum-embedded .publish-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 24px;
            display: none;
        }

        .forum-embedded .publish-card.show {
            display: block;
        }

        .forum-embedded input[type="text"] {
            width: 100%;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 12px 14px;
            color: var(--text-primary);
            font-size: 14px;
            outline: none;
            margin-bottom: 12px;
        }

        .forum-embedded input[type="text"]:focus {
            border-color: var(--accent-blue);
        }

        .forum-embedded textarea {
            width: 100%;
            min-height: 100px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 14px;
            color: var(--text-primary);
            font-size: 15px;
            resize: vertical;
            outline: none;
        }

        .forum-embedded textarea:focus {
            border-color: var(--accent);
        }

        .forum-toolbar {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 12px;
            flex-wrap: wrap;
            justify-content: space-between;
        }

        .forum-publish-btn {
            padding: 10px 24px;
            border-radius: 999px;
            background: var(--accent);
            color: #fff;
            border: none;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
        }

        .forum-publish-btn:hover {
            filter: brightness(1.1);
        }

        .forum-publish-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .forum-cancel-btn {
            padding: 10px 24px;
            border-radius: 999px;
            background: var(--bg-secondary);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
        }

        .image-upload-btn {
            padding: 8px 14px;
            border-radius: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-size: 14px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .image-upload-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .image-preview-container {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 12px;
        }

        .image-preview {
            position: relative;
            width: 80px;
            height: 80px;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--border-color);
        }

        .image-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .image-preview-remove {
            position: absolute;
            top: 2px;
            right: 2px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: rgba(254,44,85,0.8);
            color: #fff;
            border: none;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .forum-post-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 20px 24px;
        }

        .forum-post-card:hover {
            border-color: var(--accent);
        }

        .forum-post-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .forum-post-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
            font-size: 18px;
            flex-shrink: 0;
            cursor: pointer;
        }

        .forum-post-user-info {
            flex: 1;
        }

        .forum-post-username {
            font-weight: 600;
            font-size: 15px;
        }

        .forum-post-time {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .forum-post-content {
            font-size: 15px;
            line-height: 1.7;
            margin: 10px 0;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .forum-post-topic {
            display: inline-block;
            padding: 3px 12px;
            border-radius: 999px;
            background: rgba(37, 244, 238, 0.12);
            color: var(--accent-blue);
            font-size: 12px;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .forum-post-images {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .forum-post-images img {
            max-width: 200px;
            max-height: 200px;
            border-radius: 10px;
            object-fit: cover;
            cursor: pointer;
            border: 1px solid var(--border-color);
        }

        .forum-post-images img:hover {
            transform: scale(1.02);
        }

        .forum-post-actions {
            display: flex;
            gap: 20px;
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid var(--border-color);
        }

        .forum-action-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 14px;
            padding: 6px 10px;
            border-radius: 8px;
        }

        .forum-action-btn:hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        .forum-action-btn.liked {
            color: var(--accent);
        }

        .forum-action-btn.favorited {
            color: #f5a623;
        }

        .forum-action-btn.following {
            color: var(--accent-blue);
        }

        .forum-tabs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .forum-tab-btn {
            padding: 8px 18px;
            border-radius: 999px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
        }

        .forum-tab-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .forum-tab-btn.active {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
        }

        .image-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 999;
            cursor: pointer;
        }

        .image-modal.show {
            display: flex;
        }

        .image-modal img {
            max-width: 90%;
            max-height: 90%;
            border-radius: 10px;
        }

        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-secondary); }
        ::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }

        @media (max-width: 768px) {
            .main { flex-direction: column; }
            .sidebar { width: 100%; }
            .carousel { height: 240px; }
            .nav-search input { width: 120px; }
        }

        /* ========== 游戏盒样式 ========== */
        .game-box-container {
            display: flex; gap: 20px; flex-wrap: wrap;
        }
        .game-box-left {
            flex: 1; min-width: 320px;
        }
        .game-box-right {
            width: 300px; flex-shrink: 0;
        }

        /* 游戏大厅标题 */
        .game-hall-title {
            font-size: 24px; font-weight: 700; margin-bottom: 6px;
            display: flex; align-items: center; gap: 10px;
        }
        .game-hall-title .icon { font-size: 28px; }
        .game-hall-subtitle {
            font-size: 13px; color: var(--text-secondary); margin-bottom: 20px;
        }

        /* 游戏模式切换 */
        .game-mode-tabs {
            display: flex; gap: 6px; margin-bottom: 20px;
            background: var(--bg-card); border-radius: 12px; padding: 4px;
            width: fit-content;
        }
        .game-mode-tab {
            padding: 8px 20px; border-radius: 10px; border: none;
            background: transparent; color: var(--text-secondary);
            cursor: pointer; font-size: 14px; font-weight: 500;
        }
        .game-mode-tab.active {
            background: var(--gradient); color: #fff;
        }

        /* 游戏卡片网格 */
        .game-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 14px;
        }
        .game-card {
            background: var(--bg-card); border: 1px solid var(--border-color);
            border-radius: 16px; padding: 20px 16px; cursor: pointer;
            text-align: center; position: relative; overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
        }
        .game-card:hover {
            transform: translateY(-4px); box-shadow: var(--shadow);
            border-color: var(--accent-blue);
        }
        .game-card .game-icon {
            font-size: 44px; margin-bottom: 10px; display: block;
        }
        .game-card .game-name {
            font-size: 15px; font-weight: 600; color: var(--text-primary);
            margin-bottom: 4px;
        }
        .game-card .game-desc {
            font-size: 11px; color: var(--text-secondary);
        }
        .game-card .game-modes {
            display: flex; gap: 4px; justify-content: center; margin-top: 8px; flex-wrap: wrap;
        }
        .game-card .mode-tag {
            font-size: 10px; padding: 2px 8px; border-radius: 999px;
            background: rgba(37,244,238,0.1); color: var(--accent-blue);
        }
        .game-card .mode-tag.multi {
            background: rgba(254,44,85,0.1); color: var(--accent);
        }
        /* 敬请期待卡片 */
        .game-card.coming-soon {
            opacity: 0.7; cursor: default;
            border-style: dashed;
        }
        .game-card.coming-soon:hover {
            transform: none; box-shadow: none; border-color: var(--border-color);
        }
        .game-card .coming-badge {
            display: inline-block; padding: 3px 10px; border-radius: 999px;
            background: rgba(255,255,255,0.06); color: var(--text-secondary);
            font-size: 11px; margin-top: 6px;
        }

        /* 游戏玩法面板 */
        .game-play-panel {
            background: var(--bg-card); border: 1px solid var(--border-color);
            border-radius: 20px; padding: 24px; margin-top: 20px;
        }
        .game-play-header {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 16px;
        }
        .game-play-title {
            font-size: 20px; font-weight: 700;
            display: flex; align-items: center; gap: 10px;
        }
        .game-play-close {
            width: 36px; height: 36px; border-radius: 50%;
            border: 1px solid var(--border-color); background: var(--bg-secondary);
            color: var(--text-secondary); cursor: pointer; font-size: 16px;
            display: flex; align-items: center; justify-content: center;
        }
        .game-play-close:hover { color: var(--accent); border-color: var(--accent); }
        .game-canvas-wrap {
            display: flex; justify-content: center; margin: 16px 0;
        }
        .game-canvas-wrap canvas {
            border-radius: 12px; border: 1px solid var(--border-color);
            background: var(--bg-secondary);
        }
        .game-score-display {
            text-align: center; font-size: 28px; font-weight: 800;
            margin: 10px 0;
            background: var(--gradient); -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .game-controls {
            display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px;
        }
        .game-btn {
            padding: 10px 24px; border-radius: 10px; border: none;
            cursor: pointer; font-size: 14px; font-weight: 600;
        }
        .game-btn.primary {
            background: var(--gradient); color: #fff;
        }
        .game-btn.secondary {
            background: var(--bg-secondary); color: var(--text-primary);
            border: 1px solid var(--border-color);
        }
        .game-btn.danger {
            background: rgba(254,44,85,0.15); color: var(--accent);
        }
        .game-btn:disabled {
            opacity: 0.4; cursor: not-allowed;
        }

        /* 斗地主牌面 */
        .landlord-card {
            display: inline-block; width: 42px; height: 60px;
            background: #fff; border: 1px solid #ccc;
            border-radius: 5px; text-align: center; font-size: 11px;
            line-height: 1.2; cursor: pointer; margin: 2px;
            vertical-align: top; padding-top: 3px;
            user-select: none; transition: transform 0.1s, box-shadow 0.1s;
        }
        .landlord-card:hover {
            transform: translateY(-6px); box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        .landlord-card.selected {
            transform: translateY(-12px);
            background: #25f4ee !important;
            border-color: #25f4ee !important;
            box-shadow: 0 6px 16px rgba(37,244,238,0.4);
        }
        .landlord-card.red {
            color: #e74c3c;
        }

        /* 排行榜 */
        .leaderboard-panel {
            background: var(--bg-card); border: 1px solid var(--border-color);
            border-radius: 20px; padding: 20px; height: fit-content;
            position: sticky; top: 100px;
        }
        .leaderboard-title {
            font-size: 16px; font-weight: 700; margin-bottom: 4px;
            display: flex; align-items: center; gap: 8px;
        }
        .leaderboard-subtitle {
            font-size: 12px; color: var(--text-secondary); margin-bottom: 14px;
        }
        .leaderboard-select {
            width: 100%; padding: 8px 12px; margin-bottom: 12px;
            background: var(--bg-secondary); border: 1px solid var(--border-color);
            border-radius: 8px; color: var(--text-primary); font-size: 13px;
            outline: none; cursor: pointer;
        }
        .leaderboard-select:focus { border-color: var(--accent-blue); }
        .leaderboard-item {
            display: flex; align-items: center; gap: 10px; padding: 10px 12px;
            border-radius: 10px; margin-bottom: 4px;
            transition: background 0.15s;
        }
        .leaderboard-item:hover { background: var(--bg-secondary); }
        .leaderboard-item .rank {
            width: 28px; height: 28px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 13px; font-weight: 700; flex-shrink: 0;
            background: var(--bg-secondary); color: var(--text-secondary);
        }
        .leaderboard-item .rank.r1 { background: #FFD700; color: #1a1a2e; }
        .leaderboard-item .rank.r2 { background: #C0C0C0; color: #1a1a2e; }
        .leaderboard-item .rank.r3 { background: #CD7F32; color: #fff; }
        .leaderboard-item .lb-user {
            flex: 1; min-width: 0; font-size: 13px; font-weight: 500;
            color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .leaderboard-item .lb-score {
            font-size: 14px; font-weight: 700; color: var(--accent-blue); flex-shrink: 0;
        }
        .leaderboard-item .lb-time {
            font-size: 10px; color: var(--text-secondary); flex-shrink: 0;
        }
        .leaderboard-empty {
            text-align: center; padding: 30px; color: var(--text-secondary); font-size: 13px;
        }

        @media (max-width: 900px) {
            .game-box-right { width: 100%; }
            .game-box-container { flex-direction: column; }
        }

        /* 动画 */
        @keyframes slideIn {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* 多人模式UI */
        .multi-lobby-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }
        @media (max-width: 700px) {
            .multi-lobby-container { grid-template-columns: 1fr; }
        }
        .multi-panel {
            background: var(--bg-card);
            border-radius: 12px;
            padding: 16px;
        }
        .multi-panel-title {
            font-weight: 700;
            font-size: 16px;
            margin-bottom: 8px;
        }
        .multi-panel-subtitle {
            color: var(--text-secondary);
            font-size: 12px;
            margin-bottom: 10px;
        }
        .multi-user-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            border-bottom: 1px solid var(--border-color);
            font-size: 13px;
        }
        .multi-user-item:last-child {
            border-bottom: none;
        }

        /* ==================== 管理员用户管理面板 ==================== */
        .admin-user-table-wrap {
            overflow-x: auto;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            background: var(--card-bg);
        }
        .admin-user-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            color: var(--text-primary);
        }
        .admin-user-table thead {
            background: var(--card-bg);
            border-bottom: 2px solid var(--border-color);
        }
        .admin-user-table th {
            padding: 12px 14px;
            text-align: left;
            font-weight: 600;
            font-size: 12px;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }
        .admin-user-table td {
            padding: 12px 14px;
            border-bottom: 1px solid var(--border-color);
            white-space: nowrap;
        }
        .admin-user-table tbody tr:last-child td {
            border-bottom: none;
        }
        .admin-user-table tbody tr:hover {
            background: var(--hover-bg);
        }
        .admin-user-table .admin-row {
            background: rgba(254, 44, 85, 0.04);
        }
        .admin-user-table .admin-row:hover {
            background: rgba(254, 44, 85, 0.08);
        }
        .role-badge {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        .role-badge.role-admin {
            background: rgba(254, 44, 85, 0.15);
            color: #fe2c55;
        }
        .role-badge.role-user {
            background: rgba(99, 102, 241, 0.12);
            color: #6366f1;
        }
        .badge-me {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 10px;
            background: var(--gradient);
            color: white;
            font-size: 10px;
            font-weight: 600;
            margin-left: 6px;
            vertical-align: middle;
        }
        .admin-user-actions {
            display: flex;
            gap: 6px;
        }
        .btn-danger-sm {
            padding: 5px 12px;
            border-radius: 6px;
            border: 1px solid rgba(254, 44, 85, 0.3);
            background: rgba(254, 44, 85, 0.1);
            color: #fe2c55;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s;
        }
        .btn-danger-sm:hover {
            background: rgba(254, 44, 85, 0.2);
            border-color: #fe2c55;
        }
        .admin-only.hidden {
            display: none !important;
        }
        #admin-users-section.hidden {
            display: none !important;
        }
