:root { --bg-color: #111827; --card-bg: #1f2937; --text-main: #f3f4f6; --text-sub: #9ca3af; --accent-char: #fbbf24; --accent-outfit: #f472b6; --btn-mix: #8b5cf6; --badge-user: #3b82f6; --badge-official: #d97706; --danger: #ef4444; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-main); display: flex; flex-direction: column; align-items: center; min-height: 100vh; margin: 0; padding: 20px; }

/* 导航栏 */
.navbar { width: 100%; max-width: 1200px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; background: #374151; padding: 15px 20px; border-radius: 12px; box-sizing: border-box; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3); }
.user-info { font-size: 0.95rem; display: flex; gap: 12px; align-items: center; }
.btn-small { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: white; transition: 0.2s; }
.btn-small:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-login { background: var(--badge-user); }
.btn-pay { background: #10b981; }
.btn-logout { background: #ef4444; }

/* 筛选区域样式 */
.filter-container { width: 100%; max-width: 1200px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 15px; }
.filter-section-title { font-size: 0.85rem; color: #6b7280; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.filter-chip { background: #374151; color: #d1d5db; padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; cursor: pointer; border: 1px solid transparent; transition: all 0.1s; user-select: none; }
.filter-chip:hover { background: #4b5563; transform: translateY(-1px); }
.filter-chip.active { background: var(--accent-char); color: #000; font-weight: 800; box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4); border-color: var(--accent-char); }

/* 主布局 */
.main-container { display: flex; gap: 20px; width: 100%; max-width: 1200px; flex-wrap: wrap; justify-content: center; }
.card-column { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 15px; }

/* 卡片样式 */
.card { background-color: var(--card-bg); border-radius: 1rem; padding: 1.5rem; border: 2px solid #374151; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; align-items: center; position: relative; min-height: 320px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.card.active-char { border-color: var(--accent-char); box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
.card.active-outfit { border-color: var(--accent-outfit); box-shadow: 0 0 20px rgba(244, 114, 182, 0.2); }
.card.locked { border-style: dashed; opacity: 0.9; background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, #374151 10px, #374151 20px); }

.card-header-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; position: relative; z-index: 5; }
.filter-trigger { background: rgba(0, 0, 0, 0.3); border: 1px solid #4b5563; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; color: #d1d5db; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; max-width: 140px; }
.filter-trigger:hover { background: #374151; border-color: var(--accent-char); color: white; }
.filter-trigger.active-filter { background: rgba(251, 191, 36, 0.15); border-color: var(--accent-char); color: var(--accent-char); font-weight: bold; }
.card-actions { display: flex; gap: 8px; }
.icon-btn { background: rgba(0,0,0,0.4); border: 1px solid #4b5563; color: #ccc; width: 32px; height: 32px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.icon-btn:hover { background: white; color: black; }
.icon-btn.active-lock { background: var(--accent-char); color: black; border-color: var(--accent-char); }
.icon-btn.liked { color: #ef4444; border-color: #ef4444; background: rgba(239, 68, 68, 0.1); animation: pulse 0.3s; }

.source-badge { font-size: 0.75rem; padding: 4px 10px; border-radius: 12px; margin-bottom: 10px; margin-top: 25px; font-weight: bold; display: inline-block; }
.source-official { background: rgba(251, 191, 36, 0.2); color: var(--accent-char); border: 1px solid #374151; }
.source-user { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid #3b82f6; }

.name-display { font-size: 1.8rem; font-weight: bold; margin-bottom: 1rem; text-align: center; min-height: 45px; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.prompt-box { font-family: 'Consolas', monospace; background-color: #000; padding: 15px; border-radius: 8px; color: #a5f3fc; font-size: 0.9rem; word-break: break-all; height: 120px; overflow-y: auto; width: 100%; text-align: left; opacity: 0.9; border: 1px solid #333; box-shadow: inset 0 2px 4px rgba(0,0,0,0.8); box-sizing: border-box; }

.big-btn { border: none; padding: 18px; border-radius: 10px; font-weight: bold; cursor: pointer; font-size: 1.1rem; width: 100%; text-transform: uppercase; transition: transform 0.1s, filter 0.2s; margin-top: 0px; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.big-btn:active { transform: scale(0.98); }
.big-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); }
.btn-roll-char { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); color: #000; }
.btn-roll-outfit { background: linear-gradient(135deg, #f472b6 0%, #db2777 100%); color: #fff; }
.btn-mix-all { width: 100%; max-width: 1200px; background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); color: white; margin-top: 20px; font-size: 1.3rem; letter-spacing: 2px; }

.mix-section { width: 100%; max-width: 1200px; margin-top: 20px; background-color: #2d3748; padding: 25px; border-radius: 1rem; border: 2px solid #4b5563; box-sizing: border-box; display: flex; flex-direction: column; gap: 15px;}
.final-prompt { background-color: #111; color: #fff; padding: 20px; border-radius: 8px; width: 100%; min-height: 100px; box-sizing: border-box; border: 1px solid #4b5563; font-family: monospace; font-size: 1rem; line-height: 1.5; resize: vertical; }

/* 留言板 */
.message-board { width: 100%; max-width: 1200px; margin-top: 30px; background: #1f2937; padding: 25px; border-radius: 16px; border: 1px solid #374151; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2); }
.message-list { max-height: 400px; overflow-y: auto; margin-bottom: 20px; padding-right: 10px; display: flex; flex-direction: column; gap: 12px; }
.message-list::-webkit-scrollbar { width: 6px; }
.message-list::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }
.message-list::-webkit-scrollbar-track { background: #111827; }
.message-item { background: #111827; padding: 12px 16px; border-radius: 10px; font-size: 0.95rem; border-left: 4px solid var(--btn-mix); transition: transform 0.1s; }
.message-item:hover { background: #161e2e; }
.message-meta { font-size: 0.8rem; color: #9ca3af; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.nickname-text { color: var(--accent-char); font-weight: bold; letter-spacing: 0.5px; }
.delete-msg-btn { color: #ef4444; cursor: pointer; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; background: rgba(239, 68, 68, 0.1); transition: 0.2s; }
.delete-msg-btn:hover { background: #ef4444; color: white; }
.message-input-area { display: flex; gap: 10px; background: #111827; padding: 8px; border-radius: 12px; border: 1px solid #4b5563; align-items: center; transition: border-color 0.2s; }
.message-input-area:focus-within { border-color: var(--btn-mix); box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2); }
.message-input { flex: 1; background: transparent; border: none; color: white; padding: 10px; font-size: 1rem; outline: none; }
.btn-send { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); color: white; border: none; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s; white-space: nowrap; }
.btn-send:hover { opacity: 0.9; transform: translateY(-1px); }

footer { margin-top: 40px; color: #6b7280; font-size: 0.85rem; text-align: center; padding-bottom: 20px; }
.wechat-box { display: inline-block; background: #064e3b; color: #6ee7b7; padding: 4px 10px; border-radius: 4px; margin-left: 5px; font-family: monospace; }

/* 模态框 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
.modal { background: var(--card-bg); padding: 30px; border-radius: 16px; width: 90%; max-width: 420px; text-align: center; position: relative; border: 1px solid #4b5563; box-shadow: 0 20px 50px rgba(0,0,0,0.7); animation: modalPop 0.3s ease-out; }
.modal-large { max-width: 600px; width: 95%; max-height: 80vh; display: flex; flex-direction: column; padding: 25px; }
@keyframes modalPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h2 { margin-top: 0; color: white; font-size: 1.5rem; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 14px; margin: 12px 0; background: #111827; border: 1px solid #4b5563; color: white; border-radius: 8px; box-sizing: border-box; font-size: 1rem; outline: none; }
.modal input:focus { border-color: var(--badge-user); }
.close-btn { position: absolute; top: 15px; right: 20px; cursor: pointer; color: #aaa; font-size: 1.8rem; line-height: 1; }
.close-btn:hover { color: white; }
.filter-scroll-area { flex: 1; overflow-y: auto; text-align: left; padding: 10px 5px; }
.filter-scroll-area::-webkit-scrollbar { width: 6px; }
.filter-scroll-area::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }

/* 投稿相关 */
.form-label { display: block; font-size: 0.85rem; color: #9ca3af; margin-bottom: 6px; font-weight: 600; }
.input-modern { width: 100%; background: #111827; border: 1px solid #4b5563; color: white; padding: 12px; border-radius: 8px; font-size: 0.95rem; outline: none; transition: all 0.2s; box-sizing: border-box; }
.input-modern:focus { border-color: var(--badge-user); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); background: #0f1522; }
.textarea-modern { font-family: 'Consolas', monospace; line-height: 1.4; resize: vertical; }
.toggle-group { display: flex; background: #111827; padding: 4px; border-radius: 8px; border: 1px solid #4b5563; }
.toggle-group input { display: none; }
.toggle-btn { flex: 1; text-align: center; padding: 8px; cursor: pointer; border-radius: 6px; font-size: 0.9rem; color: #9ca3af; transition: all 0.2s; font-weight: 600; }
.toggle-group input:checked + .toggle-btn { background: #374151; color: white; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* 排行榜 */
.leaderboard-section { width: 100%; max-width: 1200px; margin-top: 30px; }
.leaderboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 0 5px; }
.leaderboard-scroll { 
    display: flex; 
    overflow-x: auto; 
    gap: 15px; 
    padding: 15px 5px 20px 15px; 
    /* scroll-behavior: smooth;  <--- 务必删除这行！JS 驱动滚动时不能开 CSS 平滑 */
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 针对所有浏览器的滚动条隐藏设置 */
.leaderboard-scroll::-webkit-scrollbar { 
    /* 保持原有的 height: 6px; 属性，但添加 display: none; */
    height: 0px !important; /* 强制高度为 0 */
    display: none; /* 隐藏滚动条 */
}
.leaderboard-scroll::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }
.leaderboard-scroll::-webkit-scrollbar-track { background: #111827; }

.rank-card { min-width: 260px; background: #1f2937; border: 1px solid #374151; border-radius: 12px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.2s; position: relative; }
.rank-card:hover { transform: translateY(-3px); border-color: #6b7280; background: #252f3f; }
.rank-badge { position: absolute; top: -8px; left: -8px; width: 24px; height: 24px; background: #ef4444; color: white; border-radius: 50%; text-align: center; line-height: 24px; font-weight: bold; font-size: 0.8rem; box-shadow: 0 2px 4px rgba(0,0,0,0.3); z-index: 2; }
.rank-card:nth-child(n+4) .rank-badge { background: #4b5563; }
.rank-info { font-size: 0.85rem; color: #9ca3af; margin-bottom: 8px; display: flex; justify-content: space-between; }
.rank-prompt { font-family: 'Consolas', monospace; font-size: 0.8rem; color: #e5e7eb; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; background: #111827; padding: 8px; border-radius: 6px; }
.rank-actions { display: flex; justify-content: space-between; align-items: center; }
.btn-like { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: all 0.2s; }
.btn-like:hover, .btn-like.liked { background: #ef4444; color: white; border-color: #ef4444; }

/* 关键动画 */
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ========================================= */
/* 🔥 付费解锁排行榜相关样式 (核心修改) */
/* ========================================= */

/* 提示词容器，用于定位遮罩 */
.prompt-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #111827; /* 底部背景 */
}

/* 模糊特效 (未解锁时) */
.blur-secret {
    color: transparent; /* 文字透明 */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7); /* 以此形成模糊块 */
    filter: blur(4px); /* 模糊滤镜 */
    user-select: none; /* 禁止选中 */
    pointer-events: none; /* 禁止鼠标点击交互 */
    opacity: 0.6;
    background: repeating-linear-gradient(
      45deg,
      #1f2937,
      #1f2937 10px,
      #374151 10px,
      #374151 20px
    ); /* 条纹背景，显得更神秘 */
}

/* 遮罩层：半透明黑底 + 居中按钮 */
.unlock-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* 半透明遮罩 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    cursor: pointer;
    transition: background 0.2s;
}

.unlock-mask:hover {
    background: rgba(0, 0, 0, 0.6); /* 悬停变暗 */
}

/* 在 style.css 中找到 .unlock-btn-inner 并完全替换 */

.unlock-btn-inner {
    /* 🔥 核心修改：背景改为半透明黑色，不再是刺眼的纯黄 */
    background: rgba(0, 0, 0, 0.6); 
    
    /* 🔥 核心修改：边框和文字使用金色，保留高级感 */
    border: 1px solid var(--accent-char);
    color: var(--accent-char);
    
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px); /* 增加毛玻璃特效，更有质感 */
    transition: all 0.2s;
}

/* 🔥 新增：鼠标悬停时才变亮一点，作为交互反馈 */
.unlock-mask:hover .unlock-btn-inner {
    background: var(--accent-char);
    color: black;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.unlock-mask:hover .unlock-btn-inner {
    transform: scale(1.05);
}

/* 解锁后的文本区域 (移除模糊) */
.rank-prompt.unlocked {
    filter: none;
    color: #e5e7eb;
    text-shadow: none;
    opacity: 1;
    user-select: text; /* 允许复制 */
    pointer-events: auto;
    background: transparent;
    height: auto !important; /* 展开高度 */
    display: block; /* 取消行数限制 */
    -webkit-line-clamp: unset;
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; padding: 15px; text-align: center; }
    .user-info { flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
    .btn-small { flex: 1; min-width: 80px; }
    .main-container { flex-direction: column; }
    .card { min-height: 280px; }
}

/* 伪装域名标签：看起来像服务器节点或版本号 */
.server-id-tag {
    font-family: 'Consolas', 'Monaco', monospace; /* 代码字体 */
    font-size: 0.8rem;          /* 稍微调大一点点 */
    color: #9ca3af;             /* 浅灰色，在黑底上清晰可见 */
    background: rgba(31, 41, 55, 0.5); /* 半透明深底 */
    border: 1px solid #374151;  /* 加上边框，显得正式 */
    padding: 2px 8px;           /* 增加内边距 */
    border-radius: 4px;         /* 圆角 */
    margin-left: 8px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    cursor: text;               /* 鼠标放上去是文本选择状，暗示可复制 */
    transition: all 0.2s;
}

/* 鼠标悬停时稍微亮一点，增加交互感 */
.server-id-tag:hover {
    color: #e5e7eb;
    border-color: #6b7280;
    background: rgba(31, 41, 55, 0.8);
}

/* ========================================= */
/* 🖼️ 画廊优化 (竖屏适配 + 放大查看) */
/* ========================================= */

/* 1. 调整画廊卡片图片容器 */
/* 将原来的固定高度改为 9:16 比例，完美适配 810x1440 */
#galleryList .rank-card > div:first-child {
    width: 100%;
    height: auto !important; /* 覆盖原来的固定高度 */
    aspect-ratio: 9 / 16;    /* 锁定竖屏比例 */
    cursor: zoom-in;         /* 鼠标放上去显示放大镜 */
    overflow: hidden;
    position: relative;
}

#galleryList .rank-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填满容器 */
    transition: transform 0.3s;
}

#galleryList .rank-card:hover img {
    transform: scale(1.05); /* 悬停微放大特效 */
}

/* 2. 图片放大灯箱 (Lightbox) */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000; /* 层级最高 */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 2px solid #333;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    font-weight: bold;
    z-index: 2001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--danger);
}

/* ========================================= */
/* 🖼️ 画廊显示优化 (缩小尺寸 + 统一大小) */
/* ========================================= */

/* 1. 强制限制画廊卡片的宽度 */
/* 这里的 180px 是关键，调整它就能控制整体大小 */
#galleryList .rank-card {
    min-width: 180px !important;  /* 覆盖原本的 240px/280px */
    width: 180px !important;      /* 固定宽度，确保整齐 */
    flex: 0 0 auto;               /* 防止被挤压 */
    padding: 10px;                /* 稍微减小内边距，显得更紧凑 */
}

/* 2. 确保图片容器严格遵守 9:16 比例 */
#galleryList .rank-card > div:first-child {
    width: 100%;
    aspect-ratio: 9 / 16;         /* 锁定竖屏比例，图片绝对不会变形 */
    height: auto !important;      
    border-radius: 6px;           /* 给图片加个小圆角 */
    overflow: hidden;
    background: #000;             /* 图片加载前的背景色 */
}

/* 3. 优化文字区域，防止小卡片里文字换行太丑 */
#galleryList .rank-info {
    font-size: 0.75rem;           /* 字体稍微改小一点 */
    margin-bottom: 5px;
}

#galleryList .rank-card .unlock-btn-inner {
    padding: 4px 10px;            /* 按钮也稍微缩小一点 */
    font-size: 0.75rem;
}