/* --- START OF FILE style.css --- */

:root {
    --bg-color: #050505;
    --sidebar-bg: #0a0a0a;
    --card-bg: #111;
    --text-main: #fff;
    --text-dim: #888;
    --accent-blue: #0070f3;
    --accent-purple: #bc13fe; /* 幸运紫 */
    --accent-glow: rgba(0, 112, 243, 0.4);
    --purple-glow: rgba(188, 19, 254, 0.4);
    --border-color: #333;
    --font-tech: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-tech);
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
}

/* 布局 */
.app-container { display: flex; min-height: 100vh; transition: 0.3s; }

/* --- 侧边栏 (核心修复：增加滚动条) --- */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
    transition: transform 0.3s ease;
    /* 关键修复：允许垂直滚动，防止小屏幕下底部按钮被遮挡 */
    overflow-y: auto; 
    /* 隐藏滚动条样式(可选，为了美观) */
    scrollbar-width: none; /* Firefox */
}
.sidebar::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

.logo { font-size: 1.5rem; font-weight: bold; margin-bottom: 2rem; letter-spacing: 2px; flex-shrink: 0; }
.dot { color: var(--accent-blue); }

/* 用户卡片 & 经验条 */
.user-card {
    background: #161616;
    padding: 15px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 2rem;
    flex-shrink: 0; /* 防止被挤压 */
}
.user-header-row { display: flex; align-items: center; gap: 15px; width: 100%; }
/* --- 修改 style.css 中关于用户卡片的部分 --- */

/* 1. 确保用户信息区域占满右侧剩余空间 */
.user-info {
    flex: 1; /* 关键：占满剩余宽度 */
    min-width: 0; /* 防止文字溢出 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 侧边栏名字样式优化 */
.user-info h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 确保渐变名字能显示出来 */
    display: inline-block; 
    max-width: 100%;
}

/* 鼠标悬停在侧边栏名字或头像上时 */
.user-info h3:hover, 
#avatarContainer .post-avatar-box:hover {
    opacity: 0.8;
}

/* 2. 重新设计等级徽章区域 (将作为等级和退出按钮的容器) */
/* --- 侧边栏徽章区域优化 (防挤压) --- */
#badgesArea {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* 关键：允许换行 */
    gap: 5px; /* 徽章之间的间距 */
    width: 100%;
    margin-top: 5px;
}

/* 统一徽章样式 (Admin/Title/Level) */
.badge { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    padding: 2px 6px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    border: 1px solid transparent; 
    height: 20px;
    white-space: nowrap; /* 防止文字折行 */
}

/* Admin 徽章 */
.badge.admin-tag {
    background: #ff3333;
    color: white;
    border: none;
    box-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
}

/* 自定义头衔徽章 */
.badge.custom-tag {
    border: 1px solid currentColor; /* 边框颜色跟随文字颜色 */
    background: rgba(255,255,255,0.05);
}

/* 3. 退出按钮样式优化 */
/* 退出按钮 (放在徽章流中) */
#logoutBtn {
    font-size: 0.7rem;
    color: #ff3333;
    border: 1px solid #ff3333;
    padding: 1px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    height: 20px;
    display: inline-flex;
    align-items: center;
    margin-left: auto; /* 把它推到该行的最右边 */
}

#logoutBtn:hover {
    background: #ff3333;
    color: white;
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

.xp-container { width: 100%; margin-top: 5px; }
.xp-info { display: flex; justify-content: space-between; font-size: 0.7rem; color: #888; margin-bottom: 2px; }
.xp-bar-bg { width: 100%; height: 4px; background: #333; border-radius: 2px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, #0070f3, #00c6ff); width: 0%; transition: width 0.5s ease; }

/* 导航 */
nav { flex-shrink: 0; }
nav a {
    display: flex; align-items: center; color: var(--text-dim); text-decoration: none; padding: 12px 0;
    transition: 0.2s; border-left: 2px solid transparent; padding-left: 10px;
}
nav a:hover, nav a.active { color: #fff; border-left-color: var(--accent-blue); padding-left: 15px; background: rgba(255,255,255,0.02); }

/* VIP 区域 */
.vip-sidebar-box {
    margin-top: 20px; padding: 15px; border: 1px solid gold;
    background: rgba(255, 215, 0, 0.05); text-align: center;
    flex-shrink: 0; /* 防止被挤压 */
}
.vip-sidebar-box h4 { color: gold; margin: 0 0 5px 0; }
.vip-sidebar-box p { font-size: 0.8rem; margin: 0 0 10px 0; color: #ccc; }
.vip-mini-btn { background: gold; color: black; border: none; padding: 5px 15px; cursor: pointer; font-weight: bold; font-family: var(--font-tech); }

/* 底部状态栏 & 按钮 */
.status-panel { 
    margin-top: auto; /* 这会让它尽量靠底，但如果空间不够会被挤出去，所以配合上面的 overflow-y: auto */
    border-top: 1px solid var(--border-color); 
    padding-top: 20px; 
    flex-shrink: 0; 
    padding-bottom: 20px; /* 底部留点空隙，防止紧贴边缘 */
}
.status-item { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 0.9rem; }
.value.blue { color: var(--accent-blue); text-shadow: 0 0 8px var(--accent-glow); }

/* 通用按钮 (蓝色) */
.cyber-btn {
    width: 100%; background: transparent; border: 1px solid var(--accent-blue);
    color: var(--accent-blue); padding: 10px; cursor: pointer; font-family: var(--font-tech);
    transition: 0.3s; margin-bottom: 10px;
}
.cyber-btn:hover { background: var(--accent-blue); color: white; box-shadow: 0 0 15px var(--accent-glow); }
.cyber-btn:disabled { border-color: #333; color: #555; cursor: not-allowed; box-shadow: none; background: transparent; }

/* 幸运抽奖按钮 (紫色) */
.lucky-draw-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
    padding: 10px;
    cursor: pointer;
    font-family: var(--font-tech);
    transition: 0.3s;
}
.lucky-draw-btn:hover {
    background: var(--accent-purple);
    color: white;
    box-shadow: 0 0 15px var(--purple-glow);
}
.lucky-draw-btn:disabled {
    border-color: #333;
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
    background: transparent;
}

/* 主内容区 */
.content { flex: 1; padding: 3rem; width: 100%; max-width: 1000px; margin: 0 auto; }
header { display: flex; justify-content: space-between; color: var(--text-dim); margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }

/* 视图切换 */
.view-section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.hero-section { margin-bottom: 3rem; }
.hero-section h1 { font-size: 2.5rem; margin: 0; }

/* 文章列表卡片 */
.posts-grid { display: grid; gap: 20px; }
.post-card {
    border: 1px solid var(--border-color); padding: 1.5rem; background: rgba(20,20,20,0.5);
    transition: 0.3s; cursor: pointer;
}
.post-card:hover { border-color: var(--accent-blue); transform: translateY(-3px); }
.post-meta { color: var(--accent-blue); font-size: 0.8rem; margin-bottom: 0.5rem; }
.post-card h2 { margin: 0 0 10px 0; font-size: 1.3rem; }
.post-snippet { color: var(--text-dim); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 表单 */
.cyber-input, .cyber-textarea {
    width: 100%; background: #000; border: 1px solid #333; color: white;
    padding: 12px; margin-bottom: 15px; font-family: var(--font-tech);
}
.cyber-textarea { height: 200px; resize: vertical; }
.cyber-input:focus, .cyber-textarea:focus { border-color: var(--accent-blue); outline: none; }

/* 文章详情页布局 - 修复双层边框问题 */
.full-article { 
    border: none;       /* 去掉外框 */
    padding: 0;         /* 去掉内边距，让卡片撑满 */
    margin-top: 1rem; 
    background: transparent; /* 背景透明 */
}.article-body { white-space: pre-wrap; line-height: 1.6; color: #ddd; }
.back-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; margin-bottom: 10px; font-family: var(--font-tech); }
.back-btn:hover { color: #fff; }

.post-header-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 15px;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.post-avatar-box {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-meta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--text-dim);
    overflow: hidden; 
    text-overflow: ellipsis;
}

/* 删除按钮 */
.delete-btn {
    background-color: transparent;
    border: 1px solid #ff3333;
    color: #ff3333;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-family: var(--font-tech);
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap; 
    flex-shrink: 0;
}
.delete-btn:hover { background-color: #ff3333; color: white; box-shadow: 0 0 10px rgba(255, 51, 51, 0.5); }

/* SVG */
.pixel-avatar { width: 100%; height: 100%; image-rendering: pixelated; }

/* Badge */
.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; border: 1px solid transparent; vertical-align: middle; }
.badge.lv-1 { border-color: #666; color: #aaa; }
.badge.lv-2 { border-color: #fff; color: #fff; }
.badge.lv-3 { border-color: #00ff00; color: #00ff00; box-shadow: 0 0 5px rgba(0,255,0,0.2); }
.badge.lv-4 { border-color: #00ccff; color: #00ccff; box-shadow: 0 0 8px rgba(0,204,255,0.3); }
.badge.lv-5 { border-color: #9933ff; color: #9933ff; box-shadow: 0 0 10px rgba(153,51,255,0.4); }
.badge.lv-6 { border-color: #ff00ff; color: #ff00ff; box-shadow: 0 0 12px rgba(255,0,255,0.5); }
.badge.lv-7 { border-color: #ff9900; color: #ff9900; box-shadow: 0 0 15px rgba(255,153,0,0.6); }
.badge.lv-8 { border-color: #ff3333; color: #ff3333; box-shadow: 0 0 18px rgba(255,51,51,0.7); }
.badge.lv-9 { border-color: gold; color: gold; box-shadow: 0 0 20px gold; }
.badge.lv-10 { background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000); background-size: 400%; animation: rainbow 5s linear infinite; color: #fff; border: none; }
@keyframes rainbow { 0% {background-position: 0%;} 100% {background-position: 400%;} }
.badge.vip-tag { margin-right: 5px; background: linear-gradient(45deg, #FFD700, #FFA500); color: #000; border: none; padding: 2px 5px; }

/* Giscus */
.comments-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px dashed #333; }
#giscus-container { min-height: 200px; width: 100%; margin-top: 20px; background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 10px; }

/* 移动端适配 */
.mobile-menu-btn { display: none; position: fixed; top: 15px; right: 15px; z-index: 1000; font-size: 1.5rem; background: #000; color: white; padding: 5px 10px; border: 1px solid #333; cursor: pointer; }

@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar { 
        position: fixed; 
        left: -280px; 
        top: 0; 
        height: 100%; 
        box-shadow: 5px 0 15px rgba(0,0,0,0.5); 
        width: 250px;
        /* 移动端关键配置：z-index 必须比内容高 */
        z-index: 1001; 
    }
    .sidebar.open { transform: translateX(280px); }
    .content { padding: 1.5rem; margin-top: 40px; }
    .mobile-menu-btn { display: block; }
}

footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    text-align: center; /* 文字水平居中 */
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 20px 0; /* 上下留白 */
    width: 100%;
    display: flex;       /* 使用弹性布局 */
    justify-content: center; /* 确保内容绝对居中 */
    align-items: center;
}

/* 消息通知红点 */
.notify-badge {
    background-color: #ff3333;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

/* 评论列表样式 */
.comment-item {
    border-bottom: 1px solid #222;
    padding: 15px 0;
    display: flex;
    gap: 15px;
}
.comment-item:last-child { border-bottom: none; }

.comment-avatar {
    width: 40px; height: 40px;
    flex-shrink: 0;
    border: 1px solid #333;
    border-radius: 4px;
}

.comment-content-box { flex: 1; }

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #666;
}
.comment-author { color: var(--accent-blue); font-weight: bold; }
.comment-text { color: #ccc; line-height: 1.5; }

/* 通知列表项 */
.notify-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 15px;
    border-left: 3px solid var(--accent-blue);
    cursor: pointer;
    transition: 0.3s;
}
.notify-item:hover { background: rgba(255, 255, 255, 0.05); }
.notify-item.unread { border-left-color: #ff3333; background: rgba(255, 51, 51, 0.05); }
.notify-time { font-size: 0.7rem; color: #666; margin-top: 5px; }

/* --- 等级表优化 (横线、对齐) --- */
.tech-table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    margin-top: 20px;
    color: #ccc;
    font-size: 0.9rem;
}

.tech-table th, .tech-table td {
    border: 1px solid #333; /* 表格线 */
    padding: 12px;
}

.tech-table th {
    background: #111;
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
}

/* 左中右对齐核心 */
.tech-table th:nth-child(1), .tech-table td:nth-child(1) { text-align: left; }   /* 等级 */
.tech-table th:nth-child(2), .tech-table td:nth-child(2) { text-align: center; } /* 称号 */
.tech-table th:nth-child(3), .tech-table td:nth-child(3) { text-align: right; }  /* XP */

/* 分类标签样式 */
.category-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 8px;
    border: 1px solid #666;
    color: #aaa;
    vertical-align: middle;
}

/* 特殊分类颜色 */
.cat-tech { border-color: #0070f3; color: #0070f3; }
.cat-life { border-color: #00c6ff; color: #00c6ff; }
.cat-question { border-color: #ff9900; color: #ff9900; }

/* 公告样式 - 显眼 */
.cat-announce { 
    border-color: #ff3333; 
    color: #ff3333; 
    background: rgba(255, 51, 51, 0.1);
    box-shadow: 0 0 5px rgba(255, 51, 51, 0.3);
}

/* 如果是公告贴，整个卡片边框也可以稍微变红一点 (可选) */
.post-card.is-announce {
    border: 1px solid rgba(255, 51, 51, 0.3);
}

/* 点赞按钮 */
.like-btn {
    background: transparent;
    border: 1px solid #666;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.like-btn:hover { border-color: #ff3333; color: #ff3333; }
.like-btn.liked {
    background: rgba(255, 51, 51, 0.1);
    border-color: #ff3333;
    color: #ff3333;
}

/* --- 修复：长文本强制换行 (解决 ====== 溢出问题) --- */
.article-body, .comment-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere; /* 强制在任意字符间断行 */
}

/* --- 优化：LV.10 炫彩经验条 --- */
.xp-bar-fill.rainbow-bar {
    background: linear-gradient(90deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 200% 100%;
    animation: rainbowMove 2s linear infinite;
}
@keyframes rainbowMove { 0% {background-position: 100% 0;} 100% {background-position: 0 0;} }

/* --- 任务列表样式 --- */
.task-card {
    background: rgba(0, 255, 0, 0.05);
    border: 1px dashed #0f0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}
.task-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.task-progress-bg { width: 100%; height: 10px; background: #111; border-radius: 5px; overflow: hidden; margin-bottom: 10px; }
.task-progress-fill { height: 100%; background: #0f0; width: 0%; transition: 0.3s; }

/* --- CSS Update for Replies & Likes --- */

/* 子评论容器 */
.replies-container {
    margin-left: 50px; /* 缩进 */
    border-left: 2px solid #333;
    padding-left: 15px;
    margin-top: 10px;
}

/* 移动端缩进调整 */
@media (max-width: 768px) {
    .replies-container {
        margin-left: 20px;
        padding-left: 10px;
    }
}

/* 子评论微调 */
.sub-comment {
    border-bottom: 1px dashed #222; /* 子评论分割线虚线 */
    padding: 10px 0;
}
.sub-comment:last-child {
    border-bottom: none;
}

/* 评论区小按钮 (回复/点赞) */
.reply-action-btn {
    color: #666;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 10px;
    transition: 0.3s;
}
.reply-action-btn:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.like-btn.mini {
    padding: 1px 6px;
    font-size: 0.7rem;
    border: none; /* 评论区点赞去掉边框，保持简洁 */
    background: rgba(255,255,255,0.05);
}
.like-btn.mini:hover {
    background: rgba(255, 51, 51, 0.2);
}

/* --- 新增样式 (分页 & 置顶) --- */

#loadMoreBtn {
    margin: 20px auto;
    display: block;
    max-width: 300px;
    text-align: center;
}

/* 置顶文章的特殊边框 */
.post-card.pinned {
    border-left: 3px solid #0f0;
    background: rgba(0, 255, 0, 0.02);
}

/* 置顶评论样式 */
.comment-item.pinned {
    border: 1px solid rgba(0,255,0,0.3);
    background: rgba(0,255,0,0.05);
}

/* 回复指示器样式 */
.reply-indicator {
    color: #888;
    margin-right: 8px;
    font-size: 0.9em;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* 已编辑标签样式 */
.edited-tag {
    font-size: 0.7rem;
    color: #888;
    font-style: italic;
    margin-left: 5px;
    border-bottom: 1px dotted #666;
}

/* 开关 Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--accent-blue);
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* 表格响应式优化 */
.table-responsive {
    overflow-x: auto;
}
.mini-action-btn {
    background: transparent;
    border: 1px solid #666;
    color: #ccc;
    padding: 2px 6px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-right: 5px;
}
.mini-action-btn:hover {
    background: #333;
    color: #fff;
}

/* --- 新增：样式 (楼层 & 帖子底部) --- */

.floor-tag {
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.post-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-footer {
        flex-direction: row; /* 保持横向，或者改为 column 看个人喜好 */
    }
}

#loadCommentsBtn {
    margin: 20px auto;
    display: block;
    max-width: 300px;
    text-align: center;
}

/* --- Feature 6: New Post Badge --- */
.new-badge {
    background: #ff00de; /* 赛博粉 */
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 5px;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

/* --- Feature 7: Author Tag --- */
.author-tag {
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    font-size: 0.7rem;
    padding: 0 4px;
    border-radius: 3px;
    margin-right: 5px;
    display: inline-block;
}

/* --- Feature 1: Reply Fold Button --- */
.reply-fold-btn {
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    margin-top: 5px;
    padding: 5px;
    border-top: 1px dashed #333;
}
.reply-fold-btn:hover {
    color: var(--accent-blue);
}

/* --- Feature 9: Mobile Responsive Actions --- */
.comment-meta-row {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* 允许换行 */
    gap: 5px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 移动端调整 */
@media (max-width: 768px) {
    .post-actions-mobile {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .comment-meta-row {
        align-items: flex-start;
        flex-direction: column; /* 时间和按钮分两行 */
    }
    
    .comment-actions {
        margin-top: 2px;
    }
    
    .action-link {
        padding: 5px; /* 增加点击区域 */
        display: inline-block;
    }
}

.action-link {
    cursor: pointer;
    margin-left: 5px;
}

/* --- Markdown 样式 --- */
.article-body blockquote {
    border-left: 4px solid var(--accent-blue);
    margin: 10px 0;
    padding-left: 15px;
    background: rgba(255,255,255,0.05);
    color: #aaa;
}
.article-body code {
    background: #222;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: var(--font-tech);
    color: #ff3333;
}
.article-body pre {
    background: #111;
    padding: 15px;
    border: 1px solid #333;
    overflow-x: auto;
    border-radius: 5px;
}
.article-body pre code {
    background: transparent;
    color: #0f0; /* 终端绿 */
    padding: 0;
}
.article-body img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #333;
    margin: 10px 0;
}
.article-body a {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Toast 容器 */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Toast 消息卡片 */
.cyber-toast {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--accent-blue);
    color: #fff;
    padding: 12px 24px;
    min-width: 300px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 112, 243, 0.3);
    font-family: var(--font-tech);
    animation: slideDown 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.cyber-toast.error {
    border-color: #ff3333;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}
.cyber-toast.success {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* --- style.css 追加内容 --- */

/* 1. 评论高亮动画 (定位跳转用) */
@keyframes highlightFlash {
    0% { background-color: rgba(0, 112, 243, 0.5); }
    100% { background-color: transparent; }
}
.highlight-comment {
    animation: highlightFlash 2s ease-out;
    border: 1px solid var(--accent-blue) !important;
}

/* 2. 图片查看器 (Lightbox) */
.lightbox {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 99999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border: 1px solid var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 112, 243, 0.5);
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.lightbox-close:hover { color: var(--accent-blue); }

/* 文章内的图片样式优化，鼠标放上去变手型 */
.article-body img {
    cursor: zoom-in;
    transition: transform 0.2s;
}
.article-body img:hover {
    transform: scale(1.01);
    opacity: 0.9;
}

/* --- Lightbox 样式修复版 --- */

/* 旋转按钮容器 */
.lightbox-rotate {
    position: absolute;
    /* 关键修复：位置改用百分比，防止手机底部工具栏遮挡 */
    bottom: 10%; 
    left: 50%;
    transform: translateX(-50%);
    
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 关键修复：强制鼠标变成手型 */
    cursor: pointer !important;
    
    /* 关键修复：防止文本被选中 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* 关键修复：层级必须极高 */
    z-index: 100002;
    transition: 0.3s;
}

/* 鼠标悬停效果 */
.lightbox-rotate:hover {
    background: var(--accent-blue);
    transform: translateX(-50%) scale(1.1) rotate(180deg); /* 悬停时稍微变大并旋转 */
}

/* 确保 SVG 不会拦截点击事件 */
.lightbox-rotate svg {
    pointer-events: none; 
}

/* 图片过渡效果 */
.lightbox-content {
    transition: transform 0.1s ease-out;
    cursor: grab; /* 抓手光标 */
    max-height: 80vh; /* 防止图片太大把按钮挤出去 */
    object-fit: contain;
}

.lightbox-content:active {
    cursor: grabbing;
}

@media (max-width: 768px) {
    /* 让用户信息区域独占一行，防止被按钮挤压 */
    .post-author-info {
        width: 100%;
        margin-bottom: 15px; /* 给下方按钮留出空隙 */
        overflow: visible; /* 防止内容被裁切 */
    }

    /* 确保文字部分能完整显示 */
    .post-meta-text {
        white-space: normal; /* 允许文字换行 */
        width: 100%;
    }

    /* 操作按钮区域 (保持原有逻辑，但加上 flex 布局让按钮排开) */
    .post-actions-mobile {
        width: 100%;
        justify-content: flex-start; /* 按钮左对齐 */
        gap: 10px; /* 按钮间距 */
    }
    
    /* 修复删除/置顶等按钮在手机上可能太宽的问题 */
    .delete-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

/* --- 消息筛选按钮样式 --- */
.filter-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
    white-space: nowrap;
    border-color: #333;
    color: #888;
}
.filter-btn.active {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 112, 243, 0.1);
}

/* --- style.css 新增 --- */

/* 帖子列表缩略图 */
.post-thumbnail-container {
    margin-top: 10px;
    width: 100%;
    /* 去掉固定高度，让图片撑开 */
    display: none; 
}
.post-thumbnail {
    width: 100%;
    height: auto; /* 高度自适应 */
    border-radius: 4px;
    border: 1px solid #333;
}

/* @提及 链接样式 */
.mention-link {
    color: #ff00de; /* 赛博粉 */
    font-weight: bold;
    text-decoration: none;
    background: rgba(255, 0, 222, 0.1);
    padding: 0 4px;
    border-radius: 4px;
    cursor: pointer;
}
.mention-link:hover {
    background: rgba(255, 0, 222, 0.2);
    text-decoration: underline;
}

/* 关注按钮 */
.follow-btn {
    padding: 5px 20px;
    border: 1px solid var(--accent-blue);
    background: transparent;
    color: var(--accent-blue);
    cursor: pointer;
    font-family: var(--font-tech);
}
.follow-btn.following {
    background: var(--accent-blue);
    color: #fff;
    content: "已关注";
}

/* --- 移动端快捷发帖按钮 --- */
#mobile-post-btn {
    position: fixed;
    bottom: 30px; /* 距离底部的位置 */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-blue), #00c6ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--accent-glow);
    z-index: 9999; /* 保证在最上层 */
    cursor: pointer;
    transition: 0.3s;
    /* 默认隐藏 (电脑端不显示) */
    display: none; 
}

#mobile-post-btn:active {
    transform: translateX(-50%) scale(0.9);
}

/* 只在屏幕宽度小于 768px (手机/平板) 时显示 */
@media (max-width: 768px) {
    #mobile-post-btn {
        display: flex;
    }
    
    /* 为了防止按钮挡住列表最底部的内容，给列表加个底部内边距 */
    #posts-list {
        padding-bottom: 80px; 
    }
}

/* --- 排行榜样式 --- */
.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.rank-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 15px;
    border-radius: 8px;
}

.rank-card h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 10px;
    font-size: 1.1rem;
    color: var(--accent-blue);
}

.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #222;
}

.rank-num {
    width: 30px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #666;
    text-align: center;
}

/* 前三名金银铜 */
.rank-item:nth-child(1) .rank-num { color: #FFD700; text-shadow: 0 0 5px #FFD700; }
.rank-item:nth-child(2) .rank-num { color: #C0C0C0; }
.rank-item:nth-child(3) .rank-num { color: #CD7F32; }

.rank-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    cursor: pointer;
}

.rank-value {
    font-family: var(--font-tech);
    color: #fff;
    font-weight: bold;
}

/* --- 任务按钮样式 (精致版) --- */

/* 1. 可领取按钮 (金色小巧风格) */
.task-claim-btn {
    border-color: #FFD700 !important; /* 金色边框 */
    color: #FFD700 !important;       /* 金色文字 */
    font-size: 0.75rem;              /* 字体改小 */
    padding: 2px 10px;               /* 内边距改小，变扁 */
    font-weight: bold;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
    animation: pulse-gold 2s infinite; /* 金色呼吸动画 */
    cursor: pointer;
    white-space: nowrap;
    border-radius: 2px; /*稍微圆角一点点*/
    width: auto;       /* 宽度自适应 */
    margin: 0;         /* 去掉多余边距 */
}

.task-claim-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
    transform: scale(1.05); /* 鼠标放上去微微放大 */
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.7); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.4); }
}

/* 2. 已领取徽章 */
.task-status-badge.claimed {
    font-size: 0.7rem;
    color: #666;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #333;
    white-space: nowrap;
}

/* 3. 移动端微调 */
@media (max-width: 768px) {
    .task-claim-btn {
        padding: 3px 8px; /* 手机上稍微好点一点 */
        font-size: 0.7rem;
    }
}

/* --- 首页帖子卡片新布局 --- */

/* 1. 顶部作者行 */
.post-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

/* 作者名字：加大加粗，但小于标题 */
.post-author-name-large {
    font-size: 1.15rem; /* 比普通文字大，比标题(1.3rem)小 */
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    margin-right: 5px;
}

/* 2. 标题微调 */
.post-card h2 {
    margin: 5px 0 5px 0 !important; /* 标题上下间距 */
    font-size: 1.3rem;
    line-height: 1.4;
}

/* 3. 日期行 (在标题下方) */
.post-date-sub {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 4. 标签/分类行 (在正文上方) */
.post-tags-mid {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* 5. 底部数据项优化 */
.post-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .post-author-name-large {
        font-size: 1.1rem;
    }
    .post-card h2 {
        font-size: 1.2rem;
    }
}

/* --- 聊天模块样式 --- */
.chat-item {
    padding: 10px;
    border-bottom: 1px dashed #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-item:hover { background: rgba(255,255,255,0.05); }

/* 聊天气泡 */
.msg-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    word-break: break-word;
    line-height: 1.4;
}
.msg-left {
    align-self: flex-start;
    background: #222;
    border: 1px solid #444;
    color: #eee;
    border-top-left-radius: 0;
}
.msg-right {
    align-self: flex-end;
    background: var(--accent-blue);
    color: #fff;
    border-top-right-radius: 0;
    box-shadow: 0 0 10px rgba(0,112,243,0.3);
}

@media (max-width: 768px) {
    .chat-layout { flex-direction: column; height: auto; }
    #chatBox { position: fixed; top:0; left:0; width:100%; height:100%; z-index:9999; background:#000; }
}

/* --- 按钮样式扩展 --- */

/* 实心蓝色按钮 (用于已关注) */
.cyber-btn.filled {
    background: var(--accent-blue);
    color: #fff;
}
.cyber-btn.filled:hover {
    background: #005bb5; /* 深一点的蓝 */
    box-shadow: 0 0 15px var(--accent-blue);
}

/* 红色危险按钮 (用于拉黑) */
.cyber-btn.danger {
    border-color: #ff3333;
    color: #ff3333;
}
.cyber-btn.danger:hover {
    background: rgba(255, 51, 51, 0.2);
    box-shadow: 0 0 10px #ff3333;
}

/* --- 聊天界面最终修复版 --- */

/* 1. 消息行容器 */
.msg-row {
    display: flex !important;
    align-items: flex-start; /* 顶部对齐，防止气泡字多时头像跑到底部 */
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

/* 2. 对方消息 (左对齐) */
.msg-row.left {
    justify-content: flex-start;
}
.msg-row.left .msg-bubble {
    background: #222;
    border: 1px solid #444;
    color: #eee;
    border-top-left-radius: 0; /* 左上角尖角 */
}

/* 3. 我的消息 (右对齐) */
.msg-row.right {
    justify-content: flex-end;
}
.msg-row.right .msg-bubble {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-top-right-radius: 0; /* 右上角尖角 */
    text-align: left; /* 气泡内文字依然左对齐 */
}

/* 4. 头像容器 (锁死大小，防止变形) */
.msg-avatar {
    /* PC端尺寸 */
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0; /* 禁止缩小 */
}

.msg-avatar img, .msg-avatar svg {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* 5. 气泡容器 */
.msg-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    word-break: break-all; /* 强制换行 */
    white-space: pre-wrap; /* 保留换行符 */
    line-height: 1.5;
    position: relative;
    margin-top: 0; /* 跟头像顶部对齐 */
}

/* === 移动端适配 === */
@media (max-width: 768px) {
    /* 强制缩小头像 */
    .msg-avatar {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
    }

    /* 气泡变宽 */
    .msg-bubble {
        max-width: 75%;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    /* 布局防溢出 */
    .chat-layout {
        height: calc(100vh - 110px); /* 减去顶部导航高度 */
    }
    
    /* 聊天框全屏 */
    #chatBox {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: 9999;
        background: #050505;
    }
    
    /* 调整输入框位置 */
    .chat-input-area {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #111;
        padding: 10px;
    }
    #chatMessages {
        padding-bottom: 60px; /* 让出底部空间 */
    }
}
/* --- 聊天列表与按钮修复 --- */

/* 1. 修复按钮对齐与样式 */
.chat-sidebar .cyber-btn {
    margin: 0 !important; /* 强制去除边距 */
    border-radius: 0;     /* 变成直角，拼接感更强 */
    border-bottom: 2px solid transparent;
    background: rgba(0,0,0,0.5);
    color: #888;
    transition: 0.3s;
}

/* 选中/悬停状态 */
.chat-sidebar .cyber-btn:hover,
.chat-sidebar .cyber-btn.active { /* 需要JS配合添加active类 */
    color: #fff;
    border-bottom-color: var(--accent-blue);
    background: rgba(0, 112, 243, 0.1);
    box-shadow: none; /* 去掉发光，保持扁平 */
}

/* 2. 修复头像白边/遮挡 */
.chat-item .msg-avatar, 
.chat-item div[style*="border-radius:50%"] {
    background: transparent !important; /* 去掉背景色 */
    border: none !important; /* 去掉边框 */
    box-shadow: none;
}
.chat-item img, .chat-item svg {
    display: block; /* 防止 inline 元素的间隙 */
}

/* 3. 列表项红点样式 */
.chat-unread-dot {
    width: 8px;
    height: 8px;
    background-color: #ff00de; /* 赛博粉 */
    border-radius: 50%;
    box-shadow: 0 0 5px #ff00de;
    margin-left: auto; /* 靠右对齐 */
}

/* ===========================
   === 道具商城样式系统 ===
   =========================== */
/* --- 1. 全局大背景 (Body Backgrounds) --- */

/* 通用设置：所有背景层固定，不随页面滚动，且不阻挡点击 */
body[class^="bg-"] {
    background-color: #050505;
    position: relative;
    transition: background 0.5s ease;
}
body[class^="bg-"]::before,
body[class^="bg-"]::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

/* =========================================
   1. 矩阵数据流 (Matrix) - 2.0 潜行版
   优化：去掉了廉价的亮绿色，改为深邃的黑+暗墨绿，光流更细腻
   ========================================= */
body.bg-matrix {
    background-color: #000;
}

/* 背景：极暗的数字雨痕迹 */
body.bg-matrix::before {
    z-index: -2;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 50%, rgba(0, 50, 0, 0.2) 50%, rgba(0, 50, 0, 0.2) 50.5%),
        repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(0, 30, 0, 0.1) 20px, rgba(0, 30, 0, 0.1) 21px);
    background-size: 100% 100%;
}

/* 前景：垂直下坠的高亮数据流 */
body.bg-matrix::after {
    z-index: -1;
    background: 
        linear-gradient(180deg, transparent 0%, rgba(0, 255, 70, 0) 50%, rgba(0, 255, 120, 0.3) 90%, transparent 100%);
    background-size: 100% 150%;
    animation: matrix-drop 3s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
    opacity: 0.6;
    /* 核心：混合模式让光效更高级 */
    mix-blend-mode: screen; 
}

@keyframes matrix-drop {
    0% { background-position: 0 -150%; }
    100% { background-position: 0 150%; }
}


/* =========================================
   2. 深空星系 (Space) - 保持原版好评效果
   ========================================= */
body.bg-space {
    background-color: #050505;
}
body.bg-space::before {
    z-index: -2;
    background: 
        radial-gradient(circle at 50% 50%, rgba(76, 29, 149, 0.4), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.3), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.3), transparent 50%);
    filter: blur(40px);
    animation: nebula-rotate 60s linear infinite;
}
body.bg-space::after {
    z-index: -1;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: stars-move 100s linear infinite;
    opacity: 0.8;
}
@keyframes nebula-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes stars-move { from { transform: translateY(0); } to { transform: translateY(-1000px); } }


/* =========================================
   3. 赛博都市 (Cyber) - 2.0 视界线版
   优化：Synthwave 风格，深紫黑底色，发光的移动网格地板，顶部是极光
   ========================================= */
body.bg-cyber {
    background: #090014; /* 极深紫 */
}

/* 顶部：数码极光 */
body.bg-cyber::before {
    z-index: -2;
    background: radial-gradient(ellipse at top, rgba(0, 243, 255, 0.15), transparent 70%);
    animation: cyber-sky 10s ease-in-out infinite alternate;
}

/* 底部：无限延伸的网格地板 */
body.bg-cyber::after {
    z-index: -1;
    height: 60vh;
    top: auto; bottom: 0;
    /* 这种渐变能画出网格线 */
    background-image: 
        linear-gradient(transparent 95%, rgba(188, 19, 254, 0.4) 95%),
        linear-gradient(90deg, transparent 95%, rgba(188, 19, 254, 0.4) 95%);
    background-size: 40px 40px;
    /* 3D透视变换，制造空间感 */
    transform: perspective(500px) rotateX(60deg);
    transform-origin: bottom center;
    animation: grid-move 20s linear infinite;
    /* 远端渐隐，避免生硬 */
    mask-image: linear-gradient(to bottom, transparent 10%, black 100%);
}

@keyframes cyber-sky { 0% { opacity: 0.5; } 100% { opacity: 0.8; } }
@keyframes grid-move { 0% { background-position: 0 0; } 100% { background-position: 0 400px; } }


/* =========================================
   4. 落樱缤纷 (Sakura) - 2.0 幽夜版
   优化：绝对护眼！深蓝背景，粒子状的发光花瓣，不再是具象的图案
   ========================================= */
body.bg-sakura {
    background: radial-gradient(circle at bottom, #1a0b2e 0%, #000000 100%);
}

/* 氛围光：微弱的月光 */
body.bg-sakura::before {
    z-index: -2;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05), transparent 30%);
    filter: blur(20px);
}

/* 粒子：飘落的发光点 */
body.bg-sakura::after {
    z-index: -1;
    background-image: 
        radial-gradient(circle, rgba(255, 182, 193, 0.6) 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 192, 203, 0.4) 1.5px, transparent 3px);
    background-size: 100px 100px, 150px 150px;
    background-position: 0 0, 50px 50px;
    animation: sakura-drift 30s linear infinite;
}

@keyframes sakura-drift {
    0% { background-position: 0 0, 50px 50px; }
    100% { background-position: 100px 500px, 150px 600px; }
}


/* =========================================
   5. 地狱烈焰 (Fire) - 保持原版好评效果
   ========================================= */
body.bg-fire {
    background-color: #0a0000;
}
body.bg-fire::before {
    z-index: -2;
    background: radial-gradient(circle at 50% 120%, #4a0000 0%, #200000 40%, #000 80%);
    animation: fire-pulse 4s ease-in-out infinite alternate;
}
body.bg-fire::after {
    z-index: -1;
    background-image: 
        radial-gradient(circle, rgba(255, 69, 0, 0.8) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 215, 0, 0.6) 1px, transparent 1px);
    background-size: 40px 60px, 70px 90px;
    animation: fire-rise 5s linear infinite;
    mask-image: linear-gradient(to top, black, transparent 80%);
}
@keyframes fire-pulse { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 1; transform: scale(1.1); } }
@keyframes fire-rise { 0% { background-position: 0 0, 0 0; } 100% { background-position: 0 -100px, 20px -200px; } }


/* =========================================
   6. 深渊幽蓝 (Abyss) - 保持原版好评效果
   ========================================= */
body.bg-abyss {
    background-color: #001f24;
}
body.bg-abyss::before {
    z-index: -2;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 200, 0.15), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 100, 255, 0.2), transparent 50%);
    filter: blur(30px);
    animation: abyss-shift 15s ease-in-out infinite alternate;
}
body.bg-abyss::after {
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: abyss-bubble 10s linear infinite;
}
@keyframes abyss-shift { 0% { opacity: 0.5; } 100% { opacity: 0.8; } }
@keyframes abyss-bubble { 0% { transform: translateY(0) scale(1); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-200px) scale(0.5); opacity: 0; } }

/* --- 2. 帖子装饰 (Post Styles) --- */
/* 霓虹边框 (售价 200) */
.post-card.style-neon {
    border: 1px solid #00f3ff;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2), inset 0 0 20px rgba(0, 243, 255, 0.05);
}

/* 黄金传说 (售价 500) */
.post-card.style-gold {
    border: 1px solid #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(0,0,0,0) 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* 故障艺术 (售价 300) */
.post-card.style-glitch {
    border: 1px dashed #ff00de;
    border-left: 3px solid #00f3ff !important;
    border-right: 3px solid #ff00de;
}

/* --- 3. 聊天气泡 (Chat Bubbles) - 重构版 --- */

/* 1. 赛博粉 (Cyber Pink) - 霓虹渐变 */
.msg-bubble.bubble-pink {
    background: linear-gradient(135deg, #b000b5 0%, #680080 100%) !important;
    border: 1px solid #ff00de !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(255, 0, 222, 0.3) !important;
}

/* 2. 黑客绿 (Hacker Green) - 终端矩阵 */
.msg-bubble.bubble-hacker {
    background: linear-gradient(180deg, #001a00 0%, #003300 100%) !important;
    border: 1px solid #00ff00 !important;
    color: #00ff00 !important;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.1) !important;
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.5);
}

/* 3. 土豪金 (Tuhao Gold) - 金属拉丝质感 */
.msg-bubble.bubble-gold {
    /* 模拟黄金反光的复杂渐变 */
    background: linear-gradient(135deg, #BF953F 0%, #FCF6BA 40%, #B38728 60%, #FBF5B7 100%) !important;
    border: 1px solid #B38728 !important;
    /* 金色背景下，黑色文字才看得清，且显高级 */
    color: #2c2005 !important; 
    font-weight: bold;
    text-shadow: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
}

/* 4. 深海蓝 (Deep Sea) - 强化版 */
.msg-bubble.bubble-sea {
    /* 使用 background-image 确保覆盖 background-color */
    background-image: linear-gradient(180deg, #000046 0%, #1CB5E0 100%) !important;
    background-color: #000046 !important; /* 回退颜色 */
    border: 1px solid #1CB5E0 !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(28, 181, 224, 0.4) !important; /* 增加一点发光区别于默认 */
}

/* --- 4. 彩色昵称 (Name Colors) --- */
/* 使用 !important 并指定 display 确保渐变生效 */
.color-rainbow {
    background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 900;
    display: inline-block; /* 必须加上这个，否则有些浏览器渐变不显示 */
}

.color-fire {
    background: linear-gradient(to top, #f00 0%, #ff0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: 0 0 2px rgba(255, 0, 0, 0.5); /* 加一点发光 */
    font-weight: bold;
    display: inline-block;
}

.color-ice {
    background: linear-gradient(to bottom, #00f3ff, #0066ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
    font-weight: bold;
    display: inline-block;
}

.color-gold {
    background: linear-gradient(to bottom, #cfc09f 22%,#634f2c 24%, #cfc09f 26%, #cfc09f 27%,#ffecb3 40%,#3a2c0f 78%); 
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
}

/* --- 5. 道具卡片 (Inventory Item) --- */
.item-card {
    position: relative;
    background: rgba(255,255,255,0.05);
    border: 1px solid #333;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    transition: 0.2s;
}
.item-card:hover { transform: translateY(-2px); border-color: #666; }
.item-card.equipped { border-color: #0f0; box-shadow: 0 0 10px rgba(0,255,0,0.2); }
.item-tag {
    position: absolute; top: 5px; right: 5px;
    font-size: 0.6rem; padding: 2px 4px; border-radius: 3px;
}
.tag-equipped { background: #0f0; color: #000; }
.tag-count { background: var(--accent-blue); color: #fff; }

/* --- 道具商城样式统一 --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 统一所有商品卡片的高度和内边距 */
.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 20px;
    min-height: 220px; /* 固定高度，防止参差不齐 */
    background: rgba(255,255,255,0.03);
    border: 1px solid #333;
    border-radius: 8px;
    transition: 0.3s;
}
.shop-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    background: rgba(255,255,255,0.05);
}

/* 图标大小统一 */
.item-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* 价格样式 */
.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin: 10px 0;
}

/* =========================================
   修复：分类导航栏 (支持横向滑动)
   ========================================= */
.shop-tabs-container {
    display: flex;
    
    /* PC端默认居中，但如果内容太多也会自动变成从左开始 */
    justify-content: center; 
    
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;

    /* === 核心修复 吸顶固定 === */
    position: sticky;
    top: 0;           /* 吸附在视口顶部 */
    z-index: 100;     /* 层级高于下方商品 */
    background: rgba(5, 5, 5, 0.95); /* 深色背景，遮挡下方滚动的文字 */
    backdrop-filter: blur(5px);      /* 磨砂玻璃效果 */
    /* 核心修复 启用横向滚动 */
    flex-wrap: nowrap;        /* 强制不换行 */
    overflow-x: auto;         /* 允许横向滑动 */
    -webkit-overflow-scrolling: touch; /* 开启 iOS 惯性滚动 */
    scrollbar-width: none;    /* Firefox */
}

/* 隐藏滚动条 (Chrome/Safari) */
.shop-tabs-container::-webkit-scrollbar { 
    display: none; 
}

/* 移动端强制适配 */
@media (max-width: 768px) {
    .shop-tabs-container {
        /* 关键：移动端强制从左侧开始对齐，防止居中导致左侧内容滑不出来 */
        justify-content: flex-start; 
        
        /* 增加一点内边距，防止第一个按钮贴边太紧 */
        padding-left: 15px;
        padding-right: 15px;
        top: 0; 
    }
    
    /* 确保按钮不被挤压变形 */
    .shop-tab-btn, .inv-tab-btn {
        flex-shrink: 0; /* 禁止缩小 */
        white-space: nowrap; /* 禁止文字换行 */
        background: rgba(255,255,255,0.05); /* 给按钮加个浅底色，更像按钮 */
        border-radius: 20px;
    }
}

.shop-tab-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1rem;
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    font-family: var(--font-tech);
}

.shop-tab-btn:hover {
    color: #fff;
}

.shop-tab-btn.active {
    color: var(--accent-blue);
    font-weight: bold;
}

.shop-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -11px; /* 贴合下划线 */
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-blue);
    box-shadow: 0 -2px 10px var(--accent-blue);
}

/* --- 道具稀有度边框 (Rarity) --- */
/* 普通 (Common) - 默认 */

/* 稀有 (Rare) - 蓝色 */
.item-card.rare {
    border-color: #0070f3;
    box-shadow: inset 0 0 20px rgba(0, 112, 243, 0.1);
}

/* 史诗 (Epic) - 紫色 */
.item-card.epic {
    border-color: #bd00ff;
    box-shadow: inset 0 0 20px rgba(189, 0, 255, 0.1);
}

/* 传说 (Legendary) - 金色流动 */
.item-card.legendary {
    border: 1px solid #FFD700;
    animation: border-flow 3s infinite linear;
    background: linear-gradient(135deg, rgba(255,215,0,0.05), rgba(0,0,0,0.5));
}

@keyframes border-flow {
    0% { box-shadow: 0 0 5px #FFD700; }
    50% { box-shadow: 0 0 20px #FFD700; }
    100% { box-shadow: 0 0 5px #FFD700; }
}

/* === 补充缺失的商城道具样式 === */

/* 背景：赛博都市 */
body.bg-cyber {
    background: #0f0c29;
    background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29);
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
}
/* 背景：落樱缤纷 */
body.bg-sakura {
    background-color: #fad0c4;
    background-image: linear-gradient(315deg, #fad0c4 0%, #ffd1ff 74%);
}
/* 背景：地狱烈焰 */
body.bg-fire {
    background-color: #000;
    background-image: radial-gradient(circle at 50% 50%, #4a0000 0%, #000 70%);
    animation: bg-pulse 5s infinite alternate;
}
@keyframes bg-pulse { from {background-size:100% 100%} to {background-size:110% 110%} }

/* 帖子：复古像素 */
.post-card.style-pixel {
    border: 4px solid #fff;
    border-image: linear-gradient(to right, #fff 25%, #000 25%, #000 50%, #fff 50%, #fff 75%, #000 75%) 4;
    font-family: 'Courier New', monospace;
}
/* 帖子：燃烧之魂 */
.post-card.style-fire {
    border: 2px solid #ff4500;
    box-shadow: 0 0 15px #ff4500, inset 0 0 20px #ff4500;
    animation: burn 1s infinite alternate;
}
@keyframes burn { from {box-shadow:0 0 10px #ff4500} to {box-shadow:0 0 20px #ff4500} }

/* 名字：至尊金名 */
.color-gold {
    background: linear-gradient(to bottom, #cfc09f 22%,#634f2c 24%, #cfc09f 26%, #cfc09f 27%,#ffecb3 40%,#3a2c0f 78%); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
}

/* 复用商城 Tab 样式给背包用 */
.inv-tab-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.9rem;
    padding: 8px 15px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    font-family: var(--font-tech);
    white-space: nowrap; /* 防止手机端换行太难看 */
}

.inv-tab-btn:hover { color: #fff; }

.inv-tab-btn.active {
    color: var(--accent-blue);
    font-weight: bold;
}

.inv-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-blue);
    box-shadow: 0 -2px 10px var(--accent-blue);
}

/* =========================================
   === 移动端终极适配合并版 (Mobile Final Fix) ===
   ========================================= */

@media (max-width: 768px) {
    /* --- 1. 全局基础滚动修复 --- */
    html, body {
        overflow-x: hidden; /* 禁止左右晃动 */
        overflow-y: auto;   /* 允许垂直滚动 */
        -webkit-overflow-scrolling: touch; /* 开启 iOS 惯性滚动 */
        height: auto;
        min-height: 100%;
    }

    /* 内容区域修复 */
    .content {
        height: auto;
        overflow-y: visible; 
        padding-bottom: 100px; /* 防止被底部遮挡 */
        touch-action: pan-y;
    }

    /* 消息通知列表修复 */
    #notifyList {
        display: block;
        width: 100%;
        overflow-y: visible;
        touch-action: pan-y;
    }

    /* 侧边栏修复 (防止菜单无法滑动) */
    .sidebar {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* --- 2. 聊天界面私信修复 (Chat Box) --- */
    
    /* 主容器：强制全屏、黑底白字、Flex布局 */
    /* 1. 聊天主容器：强制覆盖全屏，不留死角 */
    #chatBox {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh !important;
        z-index: 2147483647 !important;
        background-color: #000000 !important;
        color: #fff !important;
        
        /* === 关键修改：去掉 !important，允许 JS 控制显隐 === */
        display: flex; 
        flex-direction: column;
        
        overflow: hidden !important;
    }
    
    /* 补充：当 JS 设置 display:none 时，确保它真的隐藏 */
    #chatBox[style*="display: none"] {
        display: none !important;
    }

    /* 顶部标题栏 */
    .chat-header {
        flex: 0 0 auto; /* 固定高度 */
        height: 60px;
        background: #111;
        border-bottom: 1px solid #333;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        z-index: 10;
        color: #fff !important;
    }
    .chat-header span { color: #fff !important; }
    .chat-header button {
        border: 1px solid #666;
        background: #333;
        color: #fff !important;
    }

    /* 消息列表：核心修复点 */
    #chatMessages {
        flex: 1 1 auto !important; /* 自动伸缩 */
        height: 0 !important;      /* 关键：必须设为0才能启用Flex内部滚动 */
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch; 
        overscroll-behavior: contain;      
        padding: 15px !important;
        background-color: #000 !important;
    }

    /* 气泡文字修复 */
    .msg-bubble {
        color: #fff !important;
        max-width: 85% !important;
    }
    /* 对方气泡颜色修正 */
    .msg-row.left .msg-bubble {
        background-color: #222 !important; 
        border: 1px solid #333 !important;
        color: #ddd !important;
    }

    /* 底部输入框：固定在Flex底部 */
    .chat-input-area {
        flex: 0 0 auto; /* 固定高度 */
        position: relative !important; 
        width: 100%;
        background: #111 !important;
        border-top: 1px solid #333;
        padding: 10px;
        /* 适配 iPhone 底部黑条 */
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        display: flex;
        gap: 10px;
        z-index: 20;
    }

    /* 输入框样式修正 */
    #chatInput {
        background-color: #222 !important;
        color: #fff !important;
        border: 1px solid #444 !important;
        border-radius: 4px;
        flex: 1;
        padding: 8px;
        -webkit-appearance: none;
    }
    
    /* 发送按钮 */
    .chat-input-area button {
        background: var(--accent-blue) !important;
        color: #fff !important;
        border: none !important;
        width: auto !important;
        padding: 0 15px !important;
    }
}

/* --- N.O.D.E Console Styles (Void Hologram Theme) --- */

.node-console-wrapper {
    background: 
        linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
        url('https://img.1eak.cool/background.jpeg') center/cover no-repeat;
    
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 16px;
    padding: 30px;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 
        0 0 30px rgba(0, 243, 255, 0.1),
        inset 0 0 50px rgba(0, 0, 0, 0.8);
    max-width: 650px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 顶部装饰条 */
.node-console-wrapper::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00f3ff, #bd00ff, transparent);
    box-shadow: 0 0 10px #00f3ff;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    padding-bottom: 15px;
}
.node-header h2 { 
    margin: 0; 
    color: #fff; 
    font-size: 1.2rem; 
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    letter-spacing: 2px;
}
.node-status { 
    color: #00f3ff; 
    font-size: 0.8rem; 
    background: rgba(0, 243, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

/* 雷达/地图可视区域 (全息投影感) */
.node-visualizer {
    height: 320px;
    position: relative;
    /* 网格背景 */
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
    box-shadow: inset 0 0 20px #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 动态扫描雷达 */
.radar-circle {
    position: absolute;
    width: 280px; height: 280px;
    border: 1px dashed rgba(0, 243, 255, 0.3);
    border-radius: 50%;
    animation: pulse-ring 4s infinite ease-out;
}
.radar-line {
    position: absolute;
    width: 280px; height: 280px;
    border-radius: 50%;
    /* 扇形扫描渐变 */
    background: conic-gradient(from 0deg, transparent 70%, rgba(0, 243, 255, 0.1) 90%, rgba(0, 243, 255, 0.4) 100%);
    animation: radar-spin 3s linear infinite;
    z-index: 1;
}

.central-node {
    position: relative;
    z-index: 10;
    width: 160px; 
    height: 160px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    
    /* === 修改部分开始 === */
    
    /* 填入你的核心/按钮图片链接 */
    background: url('https://img.1eak.cool/button.jpeg') center/contain no-repeat;
    
    /* 去掉 CSS 边框，因为 AI 画的球体通常很立体 */
    border: none; 
    
    /* 保留发光效果，让它看起来像是在发光 */
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    
    /* === 修改部分结束 === */

    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 文字样式 (SCAN) */
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    letter-spacing: 1px;
}

/* 鼠标放上去的效果：放大 + 增加光晕 */
.central-node:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.8);
}
.central-node:active { transform: scale(0.95); }

/* 扫描时的动画 */
.central-node.scanning {
    animation: node-pulse 0.5s infinite alternate;
}

@keyframes node-pulse {
    from { box-shadow: 0 0 20px #00f3ff; }
    to { box-shadow: 0 0 60px #bd00ff, 0 0 100px #00f3ff; }
}

/* 随机浮动的数据点 */
.node-point {
    position: absolute;
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
    animation: floatPoint 3s ease-in-out infinite;
    z-index: 2;
}
.node-point:nth-child(1) { animation-delay: 0s; background: #00f3ff; box-shadow: 0 0 10px #00f3ff; }
.node-point:nth-child(2) { animation-delay: 1s; background: #bd00ff; box-shadow: 0 0 10px #bd00ff; }
.node-point:nth-child(3) { animation-delay: 2s; background: #ffd700; box-shadow: 0 0 10px #ffd700; }

@keyframes floatPoint {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.4; }
}

@keyframes radar-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse-ring { 0% { transform: scale(0.8); opacity: 0; } 50% { opacity: 0.3; } 100% { transform: scale(1.2); opacity: 0; } }

/* 控制区 & 按钮 */
.node-controls { text-align: center; margin-bottom: 20px; }
#nodeCostDisplay { 
    color: #aaa; font-size: 0.9rem; margin-bottom: 15px; 
    font-family: var(--font-tech);
}

/* 探索按钮 - 升级版 */
#exploreBtn {
    background: linear-gradient(90deg, #0066ff, #00c6ff);
    border: none;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px; /* 圆角胶囊 */
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.4);
    position: relative;
    overflow: hidden;
}
#exploreBtn::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}
#exploreBtn:hover::before { left: 100%; }
#exploreBtn:hover { box-shadow: 0 0 40px rgba(0, 198, 255, 0.6); transform: translateY(-2px); }

/* 日志终端 (玻璃面板) */
.console-log {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    height: 160px;
    padding: 15px;
    overflow-y: auto;
    text-align: left;
    font-size: 0.85rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* 滚动条美化 */
.console-log::-webkit-scrollbar { width: 4px; }
.console-log::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* 日志颜色系统 */
.log-line { margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 2px; }
.log-line { color: #888; } /* 默认灰色 */
.log-line.info { color: #00f3ff; text-shadow: 0 0 5px rgba(0, 243, 255, 0.3); } /* 信息青色 */
.log-line.warn { color: #ffd700; text-shadow: 0 0 5px rgba(255, 215, 0, 0.3); } /* 奖励金色 */
.log-line.error { color: #ff3333; text-shadow: 0 0 5px rgba(255, 51, 51, 0.3); } /* 故障红色 */

/* 按钮微调 */
.glitch-effect:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #00ff00; border-color: #00ff00;
}
@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* --- N.O.D.E 移动端适配 --- */
@media (max-width: 768px) {
    .node-console-wrapper {
        margin: 10px;       /* 减少外边距，让出更多宽度 */
        padding: 15px;      /* 减少内边距，防止内容被挤压 */
        border-radius: 12px;
    }

    .node-header {
        flex-direction: column; /* 标题和状态分两行显示 */
        align-items: flex-start;
        gap: 5px;
    }
    
    .node-header h2 {
        font-size: 1rem;    /* 缩小标题字体 */
    }

    .node-visualizer {
        height: 260px;      /* 降低可视区域高度 */
    }

    /* 缩小雷达圈，防止撑爆小屏幕 */
    .radar-circle, .radar-line {
        width: 220px;
        height: 220px;
    }

    /* 缩小中间的大按钮 */
    .central-node {
        width: 130px;
        height: 130px;
        font-size: 0.9rem;
    }

    /* 调整底部按钮大小 */
    #exploreBtn {
        width: 100%;       /* 按钮撑满宽度，方便手指点击 */
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* 缩小日志字体 */
    .console-log {
        font-size: 0.75rem;
        height: 120px;
    }
}

/* --- N.O.D.E Rarity Colors (稀有度特效) --- */

/* 通用日志行样式优化 */
.log-line {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

/* 🟢 Common */
.rarity-common { color: #888; }

/* 🔵 Rare (蓝光) */
.rarity-rare { 
    color: #00f3ff; 
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
}

/* 🟣 Epic (紫光 + 边框闪烁) */
.rarity-epic { 
    color: #bd00ff;
    text-shadow: 0 0 8px rgba(189, 0, 255, 0.6);
    font-weight: bold;
    border-left: 3px solid #bd00ff;
    padding-left: 8px;
    background: linear-gradient(90deg, rgba(189, 0, 255, 0.1), transparent);
}

/* 🟡 Legendary (金光流转 + 脉冲) */
.rarity-legendary { 
    color: #FFD700;
    font-weight: 900;
    text-shadow: 0 0 10px #FFD700, 0 0 20px #FF4500;
    border: 1px solid #FFD700;
    padding: 8px;
    background: rgba(255, 215, 0, 0.1);
    animation: legendary-pulse 1s infinite alternate;
}
@keyframes legendary-pulse {
    from { box-shadow: 0 0 5px #FFD700; }
    to { box-shadow: 0 0 20px #FFD700, inset 0 0 10px #FFD700; }
}

/* 🔴 Glitch (故障红) */
.rarity-glitch { 
    color: #ff3333; 
    text-shadow: 2px 0 #000, -1px 0 #000;
    font-family: 'Courier New', monospace;
}

/* --- 全服广播跑马灯 (Broadcast Ticker) --- */
.node-broadcast {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 10px;
    height: 20px;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px dashed rgba(0, 255, 0, 0.3);
    display: flex;
    align-items: center;
}
.broadcast-content {
    display: inline-block;
    animation: ticker 15s linear infinite;
    color: #00ff00;
}
@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* --- 全服播报 HUD 特效 --- */

/* 全屏遮罩层 (穿透点击，不影响用户操作) */
.broadcast-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 99999;
    pointer-events: none; /* 关键：不阻挡鼠标点击下面内容 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 轻微背景变暗，聚焦视线 */
    background: radial-gradient(circle, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6) 100%);
}

/* 核心盒子动画 */
.hud-center-box {
    position: relative;
    padding: 30px 60px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 玻璃拟态 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* 边框切角效果 (高级感) */
    clip-path: polygon(
        0 0, 100% 0, 100% 80%, 95% 100%, 5% 100%, 0 80%
    );
    border-top: 2px solid #fff;
    text-align: center;
    
    /* 进场动画: 中心扩散 */
    animation: hud-enter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0); 
    opacity: 0;
}

@keyframes hud-enter {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* 离场动画类 (JS添加) */
.hud-exit {
    animation: hud-leave 0.5s ease-in forwards;
}
@keyframes hud-leave {
    to { transform: scale(1.5); opacity: 0; filter: blur(20px); }
}

/* 扫描光效 */
.hud-scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: hud-scan 2s infinite;
    pointer-events: none;
}
@keyframes hud-scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* 文本样式 */
.hud-label {
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.hud-content {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

/* 底部装饰 */
.hud-footer-deco {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    opacity: 0.5;
}
.hud-footer-deco .line {
    width: 50px; height: 1px; background: #fff;
}
.hud-footer-deco .dot { font-size: 0.5rem; color: #fff; }

/* 彩蛋模式：超载 (红色故障风) */
.hud-overload .hud-center-box {
    border-color: #ff3333;
    box-shadow: 0 0 30px rgba(255, 51, 51, 0.3);
    animation: hud-enter 0.5s ease, glitch-shake 0.2s infinite;
}
.hud-overload .hud-label { color: #ff3333; }
@keyframes glitch-shake {
    0% { transform: translate(0,0) scale(1); }
    25% { transform: translate(-2px, 2px) scale(1); }
    50% { transform: translate(2px, -2px) scale(1); }
    75% { transform: translate(-2px, -2px) scale(1); }
    100% { transform: translate(0,0) scale(1); }
}

/* --- 弹窗样式 --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-card {
    width: 90%; max-width: 400px;
    background: #111;
    border: 1px solid var(--accent-blue);
    padding: 20px;
}
.color-picker-row {
    display: flex; gap: 10px; margin-top: 5px;
}
.color-dot {
    width: 25px; height: 25px; border-radius: 50%;
    cursor: pointer; border: 2px solid #333;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}
.color-dot.selected { border-color: #fff; box-shadow: 0 0 10px #fff; }
.rainbow-dot {
    background: linear-gradient(135deg, red, orange, yellow, green, blue, indigo, violet);
}

/* --- 数据格斗场基础 --- */
.duel-wrapper { max-width: 800px; margin: 0 auto; }
.duel-header { text-align: center; margin-bottom: 20px; border-bottom: 1px solid #ff3333; padding-bottom: 10px; }
.duel-header h2 { color: #ff3333; text-shadow: 0 0 10px rgba(255, 51, 51, 0.5); margin: 0; }

.duel-list-header { display: flex; justify-content: space-between; padding: 10px 20px; color: #888; font-size: 0.8rem; border-bottom: 1px solid #333; }
.duel-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #222; background: rgba(255, 51, 51, 0.05); transition: 0.3s; }
.duel-item:hover { background: rgba(255, 51, 51, 0.1); border-left: 3px solid #ff3333; }
.duel-stake { color: #FFD700; font-weight: bold; font-family: var(--font-tech); }

.arena-stage {
    display: flex; justify-content: space-between; align-items: center;
    width: 80%; max-width: 800px; height: 300px; position: relative;
}

.arena-player { display: flex; flex-direction: column; align-items: center; width: 150px; }
.player-name { color: #888; margin-bottom: 20px; font-size: 0.9rem; letter-spacing: 2px; }

/* =========================================
   1. 核心美术资源替换 (R2 图片)
   请将 url(...) 中的链接替换为您真实的 R2 图片地址
   ========================================= */

/* 通用球体样式调整 */
.data-orb {
    width: 100px; height: 100px;
    border-radius: 50%;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: #fff; /* 底色 */
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    
    /* 关键：确保图片居中且适应圆形 */
    background-position: center;
    background-size: 98%; /* 图片大小，可根据实际图片调整 (60%-80%) */
    background-repeat: no-repeat;
    overflow: hidden;
}

/* 移除之前的 Emoji 伪元素 */
.orb-cube::after, .orb-membrane::after, .orb-blade::after, .orb-unknown::after {
    content: none !important;
}

/* --- 1. 立方体 (Rock) --- */
.orb-cube {
    border-color: #ff3333;
    box-shadow: 0 0 30px rgba(255, 51, 51, 0.4);
    /* 👇在此处填入您的 R2 图片链接 */
    background-image: url('https://img.1eak.cool/stone.png'); 
}

/* --- 2. 薄膜 (Paper) --- */
.orb-membrane {
    border-color: #00f3ff;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.4);
    /* 👇在此处填入您的 R2 图片链接 */
    background-image: url('https://img.1eak.cool/bu.png');
}

/* --- 3. 利刃 (Scissors) --- */
.orb-blade {
    border-color: #FFD700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    /* 👇在此处填入您的 R2 图片链接 */
    background-image: url('https://img.1eak.cool/jiandao.png');
}

/* 未知状态 (问号图片，或者保持原来的 CSS 问号) */
.orb-unknown {
    border: 2px dashed #666;
    background-image: none; /* 未知状态不显示图片 */
    display: flex; justify-content: center; align-items: center;
}
.orb-unknown::after {
    content: '?' !important; /* 只有问号保留文字 */
    color: #666; font-size: 3rem; font-weight: bold;
}

/* =========================================
   2. 加入对局弹窗样式 (数据芯片风格优化)
   ========================================= */

/* 容器：为了适应长方形卡片，间距稍微拉开一点 */
.join-modal-grid {
    display: flex;
    justify-content: center;
    gap: 25px; /* 增加间距 */
    margin: 30px 0;
}

/* 核心样式：数据芯片卡槽 */
.join-option {
    /* 1. 改变形状：竖向矩形，模拟芯片/卡牌 */
    width: 80px; 
    height: 110px; 
    
    /* 2. 边框与圆角 */
    border-radius: 8px; /* 稍微圆角，不要太圆 */
    border: 2px solid #00f3ff; /* 霓虹青色边框 */
    
    /* 3. 关键：背景同化策略 */
    /* 使用极浅的青白色作为底色，掩盖图片的白底 */
    background-color: #f0fbff; 
    
    /* 4. 图片显示方式 */
    background-position: center;
    background-size: 85%; /* 图片稍微留点白边，像印在卡片上 */
    background-repeat: no-repeat;
    
    /* 5. 阴影与发光 (让它看起来是发光的实体) */
    box-shadow: 
        0 0 10px rgba(0, 243, 255, 0.3), /* 外发光 */
        inset 0 0 20px rgba(0, 243, 255, 0.2); /* 内发光 */
    
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    
    /* 文字兜底颜色 (如果图片没加载出来) */
    color: transparent; 
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none; 
}

/* 选中状态：高亮爆发 */
.join-option.selected {
    transform: translateY(-10px) scale(1.05); /* 上浮效果 */
    border-color: #ff00de; /* 选中变赛博粉 */
    background-color: #fff; /* 选中变纯白，更亮 */
    box-shadow: 
        0 0 25px rgba(255, 0, 222, 0.6),
        0 0 50px rgba(255, 0, 222, 0.3);
    z-index: 10;
}

/* 
   👇 请在此处填入 R2 图片链接 
   因为背景已经是浅色，你的白底/透明底图片放上去都会很自然
*/
.opt-blade { 
    background-image: url('https://img.1eak.cool/jiandao.png'); 
}
.opt-cube  { 
    background-image: url('https://img.1eak.cool/stone.png'); 
}
.opt-membrane { 
    background-image: url('https://img.1eak.cool/bu.png'); 
}

/* 移动端适配 */
@media (max-width: 768px) {
    .join-modal-grid {
        gap: 15px;
    }
    
    .join-option {
        width: 70px !important;
        height: 95px !important; /* 保持比例 */
        background-size: 80%;
    }
}

/* 动画定义 */
@keyframes float-slow { 0%,100% {transform:translateY(0)} 50% {transform:translateY(-10px)} }
@keyframes float-wobble { 0%,100% {border-radius:10px} 50% {border-radius:50%} }
@keyframes float-sharp { from {transform:rotate(180deg) scale(1)} to {transform:rotate(180deg) scale(1.1)} }

/* === 撞击动画 === */
.arena-center { width: 100px; display: flex; justify-content: center; align-items: center; position: relative; }
.vs-text { font-size: 2rem; font-weight: 900; color: #333; font-style: italic; }

.collision-flash {
    position: absolute; width: 10px; height: 10px; background: #fff; border-radius: 50%; opacity: 0; pointer-events: none;
}
.flash-active {
    animation: flash-bang 0.5s ease-out forwards;
}
@keyframes flash-bang {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(50); opacity: 0.8; }
    100% { transform: scale(100); opacity: 0; }
}

/* ✅ 修复后的代码 */
.duel-result-panel {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    /* 默认状态保持居中 */
    transform: translate(-50%, -50%);
    text-align: center; 
    z-index: 10;
    /* 使用修复后的动画 */
    animation: duelZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* 优化：防止文字换行导致排版丑陋 */
    width: 100%; 
    max-width: 600px;
    pointer-events: auto; /* 确保按钮可点 */
}

/* 核心修复：在缩放的同时，强制保持 translate 居中 */
@keyframes duelZoomIn { 
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0); 
    } 
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1); 
    } 
}
.duel-result-panel h1 { font-size: 3rem; margin: 0; text-shadow: 0 0 20px currentColor; letter-spacing: 5px; }
.win-text { color: #00ff00; }
.lose-text { color: #ff3333; }
.draw-text { color: #fff; }

/* 胜利者放大，失败者破碎 */
.winner-anim { transform: scale(1.5); z-index: 5; filter: drop-shadow(0 0 20px currentColor); }
.loser-anim { transform: scale(0.5); opacity: 0.5; filter: grayscale(1); }

/* --- 移动端适配：数据格斗场 --- */
@media (max-width: 768px) {
    /* 1. 调整对战舞台尺寸 */
    .arena-stage {
        width: 100%;
        height: 200px; /* 变矮 */
        padding: 0 10px;
    }

    /* 2. 缩小数据球 */
    .data-orb {
        width: 70px;
        height: 70px;
        font-size: 1.5rem; /* 图标变小 */
    }
    
    /* 3. 玩家名字和间距 */
    .arena-player {
        width: 80px; /* 容器变窄 */
    }
    .player-name {
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    /* 4. VS 文字和中心区域 */
    .arena-center {
        width: 50px;
    }
    .vs-text {
        font-size: 1.2rem;
    }

    /* 5. 结果面板 */
    .duel-result-panel h1 {
        font-size: 2rem;
    }
    
    /* 6. 列表操作区适配 */
    .duel-controls div {
        flex-direction: column; /* 竖排 */
        width: 100%;
    }
    .duel-controls input, .duel-controls select, .duel-controls button {
        width: 100% !important; /* 撑满 */
    }
}

/* === 修复：数据格斗场控制栏间距 (问题3) === */
.duel-controls div[style*="display:flex"] {
    gap: 25px !important; /* 强制拉大间距 */
}

/* =========================================
   发起挑战区域美化 (Initiate Duel UI)
   ========================================= */

/* 1. 容器：PC端保持三角形，移动端改为横排 */
.rps-triangle-container {
    position: relative;
    width: 200px;
    height: 180px;
    margin: 0 20px;
}

/* 2. 按钮基础样式：改为发光卡片风格 */
.rps-btn {
    position: absolute;
    width: 60px; 
    height: 60px;
    
    /* 样式美化 */
    border: 2px solid #333;
    border-radius: 50%; /* PC端保持圆形，移动端可以改 */
    background-color: rgba(0,0,0,0.6);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    
    /* 图片设置 */
    background-position: center;
    background-size: 105%; /* 图片大小 */
    background-repeat: no-repeat;
    
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

/* 3. 选中状态：高亮发光 */
.rps-btn.active {
    border-color: var(--accent-blue);
    background-color: rgba(0, 112, 243, 0.2);
    box-shadow: 0 0 20px var(--accent-blue);
    transform: scale(1.2);
    z-index: 10;
}

/* 
   👇👇👇 4. 图片链接替换 (R2 URL) 👇👇👇 
   请确保这里填入的是您真实的 R2 链接
*/
.rps-btn[data-val="blade"] {
    /* 剪刀 */
    background-image: url('https://img.1eak.cool/jiandao.png'); 
    top: 0; left: 50%; transform: translateX(-50%); /* 三角形顶点 */
}
.rps-btn[data-val="blade"].active {
    transform: translateX(-50%) scale(1.2); /* 选中时保持居中并放大 */
}

.rps-btn[data-val="cube"] {
    /* 石头 */
    background-image: url('https://img.1eak.cool/stone.png');
    bottom: 0; left: 0; /* 三角形左下 */
}

.rps-btn[data-val="membrane"] {
    /* 布 */
    background-image: url('https://img.1eak.cool/bu.png');
    bottom: 0; right: 0; /* 三角形右下 */
}


/* =========================================
   📱 移动端强力修复 (Mobile Fix)
   目标：横向居中排列，不再堆叠
   ========================================= */
@media (max-width: 768px) {
    /* 1. 容器改为 Flex 布局，横向排列 */
    .rps-triangle-container {
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important; /* 强制横向 */
        justify-content: center !important; /* 居中 */
        align-items: center !important;
        gap: 25px !important; /* 按钮间距 */
        margin: 20px 0 !important;
        position: static !important; /* 取消绝对定位依赖 */
    }

    /* 2. 隐藏原本的三角形背景线 */
    .rps-triangle-bg {
        display: none !important;
    }

    /* 3. 按钮样式重置 */
    .rps-btn {
        position: static !important; /* 取消绝对定位 */
        transform: none !important;  /* 取消位移 */
        
        /* 稍微变大一点，方便点击 */
        width: 70px !important;
        height: 70px !important;
        border-radius: 12px !important; /* 改为圆角矩形，更像卡片 */
        
        /* 确保图片填充 */
        background-size: 80% !important; 
        
        /* 加上一点底部边距防止太挤 */
        margin: 0 !important;
    }

    /* 4. 选中状态微调 */
    .rps-btn.active {
        transform: scale(1.1) !important; /* 选中轻微放大 */
        border-color: #ff3333 !important; /* 发起挑战用红色高亮，更醒目 */
        box-shadow: 0 0 15px #ff3333 !important;
    }
    
    /* 5. 修正特定按钮的定位干扰 */
    .rps-btn[data-val="blade"],
    .rps-btn[data-val="cube"],
    .rps-btn[data-val="membrane"] {
        top: auto; left: auto; right: auto; bottom: auto; /* 清除 PC 端定位 */
    }
}
/* === 修复 VIP 徽章显示问题 === */
.badge.vip-tag {
    /* 强制文字颜色为黑色，确保在金色背景上可见 */
    color: #000 !important; 
    
    /* 强制重置背景裁剪，防止文字变成透明 */
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #000 !important;
    
    /* 确保背景是金色渐变 */
    background: linear-gradient(45deg, #FFD700, #FFA500) !important;
    
    /* 字体调整 */
    font-weight: 900 !important;
    font-family: 'JetBrains Mono', monospace;
    padding: 2px 6px !important;
    min-width: 30px; /* 确保有最小宽度 */
    text-align: center;
    border: 1px solid rgba(0,0,0,0.2); /* 加个微弱边框增加层次感 */
}

/* === 📱 移动端终极修复：数据格斗场 === */
@media (max-width: 768px) {
    /* 1. 整体控制栏垂直排列 (输入框 - 按钮组 - 发起按钮) */
    .duel-controls > div {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px 0;
        width: 100%;
    }

    /* 2. 容器改为横向 Flex 布局，取消固定宽高 */
    .rps-triangle-container {
        position: static !important; /* 取消相对定位 */
        width: 100% !important;      /* 撑满宽度 */
        height: auto !important;     /* 高度自适应 */
        display: flex !important;    /* 启用 Flex */
        justify-content: center !important; /* 居中对齐 */
        gap: 30px !important;        /* 按钮之间的间距 */
        margin: 10px 0 !important;
        transform: none !important;  /* 取消缩放 */
    }

    /* 3. 按钮改为静态流式布局 (取消绝对定位) */
    .rps-btn {
        position: static !important; /* 关键：取消 absolute */
        transform: none !important;  /* 取消位移 */
        width: 50px !important;      /* 稍微加大，方便手指点击 */
        height: 50px !important;
        font-size: 1.4rem !important;
        margin: 0 !important;
    }

    /* 4. 隐藏三角形背景装饰线 (手机上横排不需要这个) */
    .rps-triangle-bg {
        display: none !important;
    }

    /* 5. 输入框和发起按钮适配 */
    #duelBetAmount {
        width: 80% !important;
        font-size: 1rem;
        padding: 10px;
    }
    
    .duel-controls button {
        width: 80% !important;
        height: 50px !important;
        font-size: 1rem !important;
    }

    /* ... 之前的移动端适配代码 ... */

    /* === 修复：全服播报 HUD 移动端适配 === */
    
    /* 1. 限制盒子宽度，防止撑破屏幕 */
    .hud-center-box {
        width: 90%;          /* 宽度不超过屏幕90% */
        max-width: 90%;
        padding: 20px 15px;  /* 减小内边距 */
        box-sizing: border-box; /* 确保内边距包含在宽度内 */
    }

    /* 2. 允许文字换行，调整字号 */
    .hud-content {
        font-size: 1.1rem;       /* 缩小字号 */
        white-space: normal;     /* 允许自动换行 */
        word-wrap: break-word;   /* 长单词强制换行 */
        line-height: 1.4;        /* 增加行高，防止拥挤 */
    }

    /* 3. 调整顶部标签和底部装饰 */
    .hud-label {
        font-size: 0.6rem;
        margin-bottom: 5px;
    }
    .hud-footer-deco {
        margin-top: 8px;
    }
}

/* --- 🛡️ 修复：回放遮罩层级与显示 --- */
.duel-overlay {
    position: fixed !important;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95) !important; 
    z-index: 2147483647 !important; 
    
    /* 默认隐藏 */
    display: none; 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    
    /* Flex 布局居中 */
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    backdrop-filter: blur(10px);
}

/* 当 JS 设置 display: flex 时，利用这个类来控制透明度，或者直接依赖 JS 的 display */
.duel-overlay[style*="display: flex"] {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* 确保球体不被遮罩挡住 */
.data-orb {
    z-index: 2147483648 !important; 
}

/* === ⚔️ 数据格斗场 Tab 样式修复 === */
.duel-tab-btn {
    cursor: pointer;
    padding-bottom: 5px;
    color: #666;
    border-bottom: 2px solid #333; /* 默认灰色下划线 */
    transition: 0.3s;
}

.duel-tab-btn:hover {
    color: #fff;
}

/* 选中状态：亮色文字 + 红色下划线 */
.duel-tab-btn.active {
    color: #fff;
    border-bottom-color: #ff3333;
}

/* 优化结算时的 VS 文字 */
.arena-center .vs-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem; /* 加大 */
    opacity: 0.1; /* 变淡作为背景 */
    z-index: 0;
}

/* 优化结算时的球体大小 */
.duel-overlay .data-orb {
    /* 结算时稍微放大图标，更有冲击力 */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.recharge-option {
    border: 1px solid #333;
    background: rgba(255,255,255,0.05);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    min-width: 100px;
}
.recharge-option.active {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.home-grid-container {
    display: grid;
    /* 改为 3 列 */
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
    margin: 0 auto;
    /* 稍微调宽一点，容纳3列 */
    max-width: 500px; 
}

/* 移动端适配 */
@media (max-width: 768px) {
    .home-grid-container {
        gap: 8px;
    }
    /* 让图标稍微小一点，防止撑破 */
    .slot-icon { 
        width: 40px; 
        height: 40px; 
    }
    .slot-name { 
        font-size: 0.6rem; 
        transform: scale(0.9); 
    }
}

/* 每一个槽位 */
.home-slot {
    aspect-ratio: 1; /* 保持正方形 */
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.home-slot:hover {
    border-color: #0f0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.1);
    background: rgba(0, 40, 0, 0.4);
}

/* 空槽位样式 */
.home-slot.empty {
    border-style: dashed;
    color: #444;
}
.home-slot.empty:hover {
    color: #0f0;
}

/* 槽位内部元素 */
.slot-icon { font-size: 2rem; margin-bottom: 5px; text-shadow: 0 0 10px rgba(0,255,0,0.5); }
.slot-name { font-size: 0.7rem; color: #ccc; text-align: center; line-height: 1.2; }
.slot-timer { font-size: 0.6rem; color: #888; margin-top: 5px; font-family: 'JetBrains Mono', monospace; }

/* 成熟发光特效 */
.ready-glow {
    border-color: #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
    animation: pulse-green 1.5s infinite alternate;
}
@keyframes pulse-green {
    from { box-shadow: 0 0 5px rgba(0, 255, 0, 0.2); }
    to { box-shadow: 0 0 20px rgba(0, 255, 0, 0.6); }
}

/* 任务卡片样式 */
.work-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid #005f66;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
}
.work-active {
    border-color: #00f3ff;
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .work-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .work-card button {
        width: 100%;
        margin: 0;
    }
}

/* --- style.css 修改/新增 --- */

/* 1. 槽位里的植物图标 */
.slot-icon {
    width: 60px;
    height: 60px;
    background-position: center;
    background-size: contain; /* 保持图片比例 */
    background-repeat: no-repeat;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.3)); /* 给图片加一点赛博辉光 */
    /* 去掉之前的 font-size */
}

/* 2. 弹窗里的列表小图标 */
.item-icon-small {
    width: 40px;
    height: 40px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 15px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.5);
}

/* 3. 移动端适配 */
@media (max-width: 768px) {
    .slot-icon {
        width: 45px;
        height: 45px;
    }
}

/* --- style.css 新增/修改 --- */

/* 5连抽按钮：复用探索按钮的结构，但改为紫色系 */
#multiExploreBtn {
    background: linear-gradient(90deg, #7a00ff, #bd00ff); /* 紫色渐变 */
    border: none;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px; /* 统一为胶囊圆角 */
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(189, 0, 255, 0.4);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
}

/* 按钮扫光特效 (与左侧按钮保持一致) */
#multiExploreBtn::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

/* 悬停效果 */
#multiExploreBtn:hover::before { left: 100%; }
#multiExploreBtn:hover { 
    box-shadow: 0 0 40px rgba(189, 0, 255, 0.6); 
    transform: translateY(-2px); 
}

/* 禁用状态 */
#multiExploreBtn:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
    transform: none;
}

/* --- style.css 修改 --- */

/* 统一图标容器的大小和对齐方式 */
.item-icon {
    width: 80px;           /* 限制容器宽度 */
    height: 80px;          /* 限制容器高度 */
    margin: 0 auto 15px;   /* 居中显示，并与下方文字保持间距 */
    
    display: flex;         /* 使用 Flex 布局 */
    align-items: center;   /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    
    font-size: 3.5rem;     /* 调整 Emoji 图标的大小，使其与图片接近 */
}

/* 专门限制图片的大小，防止撑爆容器 */
.item-icon img {
    max-width: 100% !important;  /* 宽度不超过容器 */
    max-height: 100% !important; /* 高度不超过容器 */
    object-fit: contain;         /* 保持图片比例，不拉伸 */
    display: block;
}

/* --- style.css 新增内容 --- */

/* 1. 侧边栏快捷按钮组 (一排两个) */
.sidebar-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-shrink: 0;
}
.sidebar-actions-row .action-btn {
    flex: 1; /* 均分宽度 */
    margin: 0;
    font-size: 0.8rem;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. 预览弹窗舞台 */
.preview-stage {
    width: 100%;
    min-height: 150px;
    background: #000;
    border: 1px dashed #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 预览：背景图模式 */
.preview-bg-mode {
    width: 100%; height: 100%;
    position: absolute; top:0; left:0;
    background-size: cover;
    background-position: center;
}

/* 3. 侧边栏排序列表项 */
.sort-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 5px;
    border-radius: 4px;
    border: 1px solid #333;
}
.sort-controls button {
    background: transparent;
    border: 1px solid #666;
    color: #fff;
    width: 25px; height: 25px;
    line-height: 23px;
    padding: 0;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
}

/* --- 创业系统样式 --- */

.biz-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.plan-card {
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
    border: 2px solid transparent;
}
.plan-card:hover, .plan-card.selected {
    border-color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
    transform: translateY(-5px);
}

.plan-icon { font-size: 3rem; margin-bottom: 10px; }
.plan-cost { font-size: 1.2rem; color: #FFD700; font-weight: bold; margin: 5px 0; }

.strategy-selector .cyber-btn {
    margin-bottom: 5px;
    font-size: 0.8rem;
    padding: 8px;
}
.strategy-selector .cyber-btn.active {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 0 10px var(--accent-blue);
}

/* 股市 Tab */
.stock-tab {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 5px 15px;
    cursor: pointer;
    font-family: var(--font-tech);
    margin-right: 5px;
}
.stock-tab.active {
    border-color: #00f3ff;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
}

/* --- style.css 新增 --- */

.stat-box {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}
.stat-box .label {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 2px;
}
.stat-box .val {
    color: #fff;
}

@media (max-width: 768px) {
    .stock-stats-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .stat-box {
        flex: 1 1 40%; /* 移动端一行两个 */
        border: 1px solid #222;
        padding: 5px;
        background: rgba(255,255,255,0.02);
    }
}

#stockCanvas {
    cursor: crosshair; /* 鼠标放上去变成十字准星 */
}

#stockCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none; /* 关键：禁止在图表上滑动时触发页面滚动 */
}

/* --- 股市布局优化 (style.css) --- */

/* 1. 主布局容器 */
.stock-main-layout {
    display: flex;
    gap: 15px;
    /* 稍微增高一点，让K线和日志都能展示更多内容 */
    height: 340px; 
    margin-bottom: 15px;
}

/* 2. 左侧图表区 (占比缩小一点，给右边腾位置) */
.stock-chart-wrapper {
    /* flex: 1.6;  代表占约 60% 宽度 */
    flex: 1.6;
    border: 1px solid #333;
    background: rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    /* 确保内部 Canvas 能自适应 */
    display: flex;
    flex-direction: column;
}

.stock-chart-container {
    flex: 1;
    width: 100%;
    min-height: 0; /* 防止 flex 子元素溢出 */
    position: relative;
}

/* 3. 右侧日志区 (变宽) */
.stock-log-wrapper {
    /* flex: 1; 代表占约 40% 宽度 */
    flex: 1; 
    border: 1px solid #333;
    background: rgba(0, 10, 0, 0.3);
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    min-width: 0; /* 防止文字撑爆容器 */
}

.log-header {
    padding: 10px;
    background: rgba(0, 243, 255, 0.1);
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
    color: #00f3ff;
    font-weight: bold;
    flex-shrink: 0;
}

.log-list {
    flex: 1;
    overflow-y: auto; /* 允许垂直滚动 */
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem; /* 字体稍微调大一点点 */
    word-wrap: break-word; /* 强制换行，防止撑开 */
}

/* 4. 美化滚动条 (让它变细变黑，不再是白色大条) */
.log-list::-webkit-scrollbar {
    width: 6px;
}
.log-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3); 
}
.log-list::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 3px;
}
.log-list::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

/* --- 📱 移动端深度适配 --- */
@media (max-width: 768px) {
    /* 1. 布局改为竖排 */
    .stock-main-layout {
        flex-direction: column;
        height: auto; /* 高度由内容撑开 */
    }

    /* 2. 图表高度固定 */
    .stock-chart-wrapper {
        width: 100%;
        height: 220px; /* 手机上不需要太高 */
        flex: none;
    }

    /* 3. 日志栏高度固定且放在下面 */
    .stock-log-wrapper {
        width: 100%;
        height: 250px; /* 给日志足够的高度 */
        flex: none;
    }

    /* 4. 顶部数据看板改为 2x2 排列 */
    .stock-stats-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .stat-box {
        flex: 1 1 45%; /* 每个占 45% 宽度 */
        border: 1px solid #222;
        padding: 5px;
        background: rgba(255,255,255,0.02);
        margin-bottom: 0; /* 去掉旧样式 */
    }
    
    /* 5. 操作区适配 */
    #stockTradeAmount {
        width: 60px !important; /* 输入框小一点 */
    }
    .shop-tabs-container button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}
.stock-chart-container {
    width: 100%;
    /* 强制最小高度，防止高度为0 */
    min-height: 220px; 
    height: 220px;
    border: 1px solid #333;
    background: rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    /* 确保它是块级元素 */
    display: block; 
}

/* 杠杆按钮样式 */
.lev-btn {
    flex: 1;
    margin: 0;
    padding: 5px 0;
    font-size: 0.8rem;
    border-color: #444;
    color: #888;
}
.lev-btn.active {
    border-color: #00f3ff;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

/* 适配移动端：按钮不换行，文字缩小 */
@media (max-width: 768px) {
    .leverage-selector {
        gap: 5px;
    }
    .lev-btn {
        font-size: 0.75rem;
    }
}

/* 压力条背景 */
.pressure-bar-bg {
    box-shadow: inset 0 0 5px #000;
    border: 1px solid #444;
}

/* 压力条滑块 */
#pressureBar {
    transition: width 0.5s ease-out, background 0.5s ease;
}

@keyframes pulse-red {
    0% { opacity: 1; text-shadow: 0 0 5px red; }
    50% { opacity: 0.5; text-shadow: none; }
    100% { opacity: 1; text-shadow: 0 0 5px red; }
}



