/* =============================================================
   迷境网站 — 样式表 v2.0
   浅蓝色导航栏 + 暖米色背景
   ============================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f0ebe3;
    color: #2c2c2c;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #4a8ba8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- 导航栏（浅蓝色） ----- */
.navbar {
    background: #b0d4e8;        /* 浅蓝色 */
    color: #2c3e50;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.nav-logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-logo-img {
    height: 1.6rem;
    width: auto;
    display: block;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.3);
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.nav-back-btn:hover {
    background: rgba(255,255,255,0.6);
    text-decoration: none;
}
/* ----- 主体容器 ----- */
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

/* ----- 页脚 ----- */
.footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

/* ===================================================================
   首页 — 门户页（Logo + 三大功能卡片）
   =================================================================== */
.portal-section {
    text-align: center;
    padding: 60px 20px 40px;
}

.portal-logo {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 10px;
}
.portal-logo-img {
    width: 5rem;
    height: 5rem;
    display: inline-block;
}
.portal-title {
    font-size: 2.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: 6px;
}
.portal-subtitle {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 50px;
}

.portal-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.portal-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 14px;
    padding: 22px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: inherit;
}
.portal-bar:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.portal-bar-icon {
    font-size: 2.4rem;
    flex-shrink: 0;
    width: 56px;
    text-align: center;
}
.portal-bar-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.portal-bar-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: #2c3e50;
}
.portal-bar-desc {
    font-size: 0.85rem;
    color: #999;
}
.portal-bar-arrow {
    font-size: 1.3rem;
    color: #b0d4e8;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.portal-bar:hover .portal-bar-arrow {
    transform: translateX(4px);
}

.portal-stats {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4a8ba8;
}
.stat-label {
    font-size: 0.9rem;
    color: #888;
    margin-top: 4px;
}

/* ===================================================================
   地图搜索/列表页
   =================================================================== */
.section-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.search-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.search-section h2 { margin-bottom: 16px; font-size: 1.2rem; }

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
    flex: 1;
}
.filter-group label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}
.search-info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
}
#map-count { font-weight: bold; color: #4a8ba8; }

/* ----- 排序开关（淡蓝色）----- */
.sort-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}
.sort-label {
    font-size: 0.85rem;
    color: #999;
    transition: color 0.2s;
    user-select: none;
}
.sort-label.sort-active {
    color: #2c3e50;
    font-weight: 600;
}
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #c0dce8;
    transition: 0.3s;
    border-radius: 22px;
}
.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}
.switch input:checked + .switch-slider {
    background: #87CEEB;
}
.switch input:checked + .switch-slider:before {
    transform: translateX(18px);
}

/* ----- 输入控件 ----- */
.input, .select, .textarea {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.2s;
    width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: #87CEEB;
    box-shadow: 0 0 0 3px rgba(135,206,235,0.2);
}
.textarea { min-height: 80px; resize: vertical; }

/* ----- 按钮 ----- */
.btn {
    display: inline-block; padding: 10px 20px; border-radius: 6px;
    font-size: 0.95rem; cursor: pointer; border: none;
    transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: #4a8ba8; color: white; }
.btn-primary:hover { background: #5da3c0; text-decoration: none; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #d0d0d0; text-decoration: none; }
.btn-danger { background: #c0392b; color: white; }
.btn-danger:hover { background: #e74c3c; }
.btn-small { padding: 6px 14px; font-size: 0.85rem; }
.btn-tiny { padding: 3px 10px; font-size: 0.8rem; }

/* ----- 地图卡片网格（v3.0）----- */
.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.map-card {
    background: white; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.map-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.map-card-link {
    flex: 1; color: #2c2c2c; text-decoration: none; display: flex;
    flex-direction: column;
}
.map-card-link:hover { text-decoration: none; }

/* --- 卡片顶部：名称 --- */
.map-card-top {
    padding: 14px 14px 8px;
    text-align: center;
}
.map-name { font-size: 1rem; color: #4a8ba8; line-height: 1.4; font-weight: 600; }

/* --- 卡片中间：图片 --- */
.map-card-image {
    padding: 0 14px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    object-fit: contain;
}
.map-img-placeholder {
    font-size: 4rem;
    line-height: 1;
    opacity: 0.3;
}

/* --- 卡片底部：角色分列 + 结果居中 --- */
.map-card-bottom {
    display: flex;
    align-items: center;
    padding: 10px 14px 14px;
    gap: 6px;
    min-height: 48px;
}
.map-char-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.map-char-left {
    align-items: flex-start;
}
.map-char-right {
    align-items: flex-end;
}
.map-result-center {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 6px;
}
.map-result-center .escape-tag {
    font-size: 0.8rem;
    padding: 2px 8px;
}

/* 角色标签（卡片底部用的小标签）*/
.char-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.char-tag-tj {
    background: #d4edda;
    color: #155724;
}
.char-tag-my {
    background: #f8d7da;
    color: #721c24;
}

/* ----- 标签（通用）----- */
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    background: #e0edf5; color: #4a8ba8; font-size: 0.8rem;
}
.tag-large { padding: 4px 12px; font-size: 0.9rem; margin: 2px; }
.tag-tanjing { background: #d4edda; color: #155724; }
.tag-miyu { background: #f8d7da; color: #721c24; }

/* ----- 结果标签（新：逃跑数） ----- */
.escape-tag {
    display: inline-block; padding: 2px 10px; border-radius: 4px;
    font-weight: 500; font-size: 0.85rem;
}
.escape-0 { background: #f8d7da; color: #721c24; }  /* 全部被抓 */
.escape-1 { background: #fff3cd; color: #856404; }  /* 平局 */
.escape-2 { background: #d4edda; color: #155724; }  /* 双跑 */

/* ----- 删除 ----- */
.delete-form { padding: 8px 16px; border-top: 1px solid #eee; text-align: right; }
.btn-delete { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 0.85rem; padding: 4px 8px; border-radius: 4px; }
.btn-delete:hover { background: #fce4e4; }

/* ----- 管理员地图操作（编辑 + 删除） ----- */
.map-admin-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}
.map-edit-btn {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    background: none;
    color: #4a8ba8;
    text-decoration: none;
    transition: background 0.2s;
}
.map-edit-btn:hover {
    background: #e0edf5;
    text-decoration: none;
}

/* ----- 空状态 ----- */
.empty-state { text-align: center; padding: 60px 20px; color: #888; font-size: 1.1rem; }
.empty-state p { margin-bottom: 16px; }

/* ===================================================================
   表单相关
   =================================================================== */
.form-section, .detail-section, .manage-section, .page-section {
    background: white; border-radius: 12px; padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.form-hint { color: #888; font-size: 0.9rem; margin-bottom: 20px; }

.form-row {
    display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.form-group { flex: 1; min-width: 180px; }
.form-group.full-width { flex: 0 0 100%; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 0.9rem; }
.hint { font-size: 0.8rem; color: #999; margin-top: 4px; }
.required { color: #c0392b; }

.form-section-inner {
    margin-top: 24px; padding-top: 20px; border-top: 1px solid #eee;
}
.form-section-inner h3 { font-size: 1.1rem; margin-bottom: 8px; }
.form-section-inner .hint { margin-bottom: 12px; }

.checkbox-grid {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.checkbox-item {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px;
    cursor: pointer; transition: all 0.2s; font-size: 0.9rem; user-select: none;
}
.checkbox-item:hover { background: #eef5f9; border-color: #87CEEB; }
.checkbox-item input[type="checkbox"] { accent-color: #4a8ba8; }
.checkbox-item:has(input:checked) { background: #d4ecf7; border-color: #4a8ba8; }

.char-category { font-size: 0.95rem; margin: 8px 0 6px 0; padding: 4px 0; color: #555; }
.empty-hint { color: #999; font-size: 0.9rem; margin: 8px 0; }
.empty-hint a { font-weight: 500; }

.form-actions { margin-top: 24px; display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid #eee; }

/* ===================================================================
   详情页
   =================================================================== */
.detail-title { font-size: 1.5rem; color: #4a8ba8; margin: 16px 0 4px 0; }
.detail-producer { font-size: 0.9rem; color: #888; margin: 0 0 20px 0; }
.detail-card { background: #f8f6f3; border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; }
.detail-row { display: flex; padding: 8px 0; border-bottom: 1px solid #e8e4df; }
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 120px; color: #888; flex-shrink: 0; }
.detail-value { flex: 1; white-space: pre-wrap; }
.detail-section-inner { margin: 20px 0; }
.detail-section-inner h3 { font-size: 1.1rem; margin-bottom: 10px; color: #4a8ba8; }
.tag-list-large { display: flex; flex-wrap: wrap; gap: 6px; }
.notes-box { background: #f8f6f3; padding: 12px 16px; border-radius: 8px; line-height: 1.6; white-space: pre-wrap; }
.detail-meta { margin: 20px 0; font-size: 0.85rem; color: #999; }
.detail-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee; }

/* ===================================================================
   更新日志页
   =================================================================== */
.log-list { display: flex; flex-direction: column; gap: 16px; }
.log-card {
    background: white; border: 1px solid #e8e4df; border-radius: 10px;
    padding: 20px; transition: box-shadow 0.2s;
    overflow: hidden;
}
.log-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.log-card-link {
    display: block; text-decoration: none; color: inherit; cursor: pointer;
}
.log-card-link:hover { text-decoration: none; }
.log-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.log-date { font-size: 0.9rem; font-weight: 600; color: #4a8ba8; }
.log-updater { font-size: 0.8rem; color: #999; }
.log-content {
    font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; color: #444;
    max-height: 3.4em;  /* 固定最多显示2行 */
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.35s ease;
}
.log-content.expanded {
    overflow: visible;
    white-space: pre-wrap;
}
.log-actions { margin-top: 12px; display: flex; gap: 8px; }

/* 更新日志编辑表单（内联） */
.inline-edit-form { display: none; margin-top: 12px; padding: 16px; background: #f8f6f3; border-radius: 8px; }
.inline-edit-form.show { display: block; }

/* ===================================================================
   角色档案页
   =================================================================== */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.char-card {
    background: white; border: 1px solid #e8e4df; border-radius: 10px;
    padding: 16px; transition: box-shadow 0.2s;
    overflow: hidden;
}
.char-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.char-card-link {
    display: block; text-decoration: none; color: inherit;
}
.char-card-link:hover { text-decoration: none; }

.char-name {
    font-size: 1.1rem; font-weight: bold; color: #2c3e50; margin: 0 0 8px;
}
.char-skills {
    font-size: 0.85rem; color: #666; line-height: 1.5;
    max-height: 3em;  /* 固定最多显示2行 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: max-height 0.5s ease, opacity 0.35s ease;
}
.char-skills.expanded {
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    text-overflow: clip;
    white-space: pre-wrap;
}
.char-skills strong { color: #4a8ba8; }
.char-card-actions { margin-top: 10px; display: flex; gap: 8px; }

/* ===================================================================
   管理页
   =================================================================== */
.manage-block { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 2px solid #eee; }
.manage-block:last-child { border-bottom: none; }
.manage-block h3 { font-size: 1.15rem; margin-bottom: 12px; color: #4a8ba8; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.inline-input { width: 250px; max-width: 100%; }
.inline-select { width: 130px; }
.manage-list { display: flex; flex-wrap: wrap; gap: 8px; }
.manage-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #f8f6f3; border-radius: 6px; }
.manage-name { font-size: 0.9rem; }
.cat-label { color: #888; font-size: 0.75rem; }
.manage-note { background: #fff8e1; border-radius: 8px; padding: 12px 16px; font-size: 0.9rem; color: #856404; border: 1px solid #ffeeba; }

/* ===================================================================
   添加/编辑角色 表单（模态样式）
   =================================================================== */
.char-form-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 100;
    display: flex; align-items: center; justify-content: center;
}
.char-form-box {
    background: white; border-radius: 16px; padding: 30px; width: 90%; max-width: 600px;
    max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.char-form-box h3 { font-size: 1.2rem; margin-bottom: 16px; color: #2c3e50; }
.char-form-box .form-row { margin-bottom: 12px; }
.char-form-box .form-actions { margin-top: 16px; }
.char-form-box .close-btn {
    float: right; background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: #999; line-height: 1;
}
.char-form-box .close-btn:hover { color: #333; }

/* ===================================================================
   添加日志表单
   =================================================================== */
.log-add-section {
    background: white; border-radius: 12px; padding: 24px; margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ===================================================================
   手动绘图页面
   =================================================================== */
.draw-container {
    background: white; border-radius: 12px; padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.draw-header { margin-bottom: 20px; }
.draw-header h2 { font-size: 1.4rem; color: #2c3e50; margin-bottom: 4px; }
.draw-subtitle { color: #888; font-size: 0.9rem; }

.draw-topbar {
    display: flex; align-items: center; gap: 20px; margin-bottom: 20px;
    flex-wrap: wrap;
}
.draw-topbar-group {
    display: flex; align-items: center; gap: 8px;
}
.draw-topbar-group label { font-size: 0.9rem; color: #555; font-weight: 500; }
.draw-size-select { width: 120px; }
.draw-topbar-info {
    font-size: 0.85rem; color: #999; font-style: italic;
}
.draw-topbar-import {
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}

.draw-workspace {
    display: flex; gap: 16px; align-items: flex-start;
}
.draw-sidebar {
    width: 140px; flex-shrink: 0;
    background: #f8f6f3; border-radius: 10px; padding: 14px;
}
.draw-sidebar-title {
    font-size: 0.9rem; font-weight: 600; color: #4a8ba8;
    margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #d4e8f0;
}
.draw-tools-list {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}
.draw-tool {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border: 2px solid transparent; border-radius: 6px;
    background: white; cursor: pointer; font-size: 0.85rem;
    transition: all 0.15s; text-align: left; width: 100%;
}
.draw-tool:hover { background: #eef5f9; border-color: #b0d4e8; }
.draw-tool.draw-tool-active { border-color: #4a8ba8; background: #d4ecf7; font-weight: 600; }
.draw-tool-color {
    display: inline-block; width: 14px; height: 14px; border-radius: 3px;
    flex-shrink: 0; border: 1px solid rgba(0,0,0,0.1);
}
.draw-tool-icon {
    width: 20px; height: 20px; border-radius: 3px;
    flex-shrink: 0; object-fit: cover;
}

.draw-canvas-area {
    flex: 1; display: flex; justify-content: center; padding: 10px 0;
}
.draw-canvas-wrapper {
    display: inline-block; border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
#draw-canvas {
    display: block; cursor: crosshair;
}

.draw-sidebar-right {
    display: flex; flex-direction: column;
}
.draw-action-btn {
    padding: 8px 16px; border: none; border-radius: 6px;
    font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.draw-undo-btn {
    background: #e0edf5; color: #4a8ba8;
}
.draw-undo-btn:hover:not(:disabled) { background: #c8dfed; }
.draw-undo-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.draw-clear-btn {
    background: #e0edf5; color: #4a8ba8;
}
.draw-clear-btn:hover:not(:disabled) { background: #c8dfed; }
.draw-clear-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.draw-export-btn {
    background: #4a8ba8; color: white;
}
.draw-export-btn:hover { background: #5da3c0; }

/* 撤销按钮在顶栏 */
.draw-topbar-undo {
    margin-left: auto; display: flex; align-items: center;
    gap: 8px;
}

/* 导出按钮在右侧边栏底部，与撤销按钮风格一致 */
.draw-export-btn {
    background: #4a8ba8; color: white;
    padding: 8px 16px; border: none; border-radius: 6px;
    font-size: 0.85rem; cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
}
.draw-export-btn:hover {
    background: #5da3c0;
}

/* ===================================================================
   后台画板
   =================================================================== */
.drawpad-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #eee;
}
.drawpad-section h4 {
    font-size: 1rem;
    color: #4a8ba8;
    margin-bottom: 10px;
}
.drawpad-tools {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.drawpad-tool {
    padding: 5px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.drawpad-tool:hover { border-color: #b0d4e8; background: #eef5f9; }
.drawpad-tool.drawpad-tool-active { border-color: #4a8ba8; background: #d4ecf7; }
.drawpad-canvas-wrap {
    display: inline-block;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
    margin-bottom: 10px;
}
.drawpad-canvas {
    display: block;
    cursor: crosshair;
}
.drawpad-actions {
    display: flex;
    gap: 8px;
}
.drawpad-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.drawpad-preview img {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}
.drawpad-preview span {
    font-size: 0.85rem;
    color: #888;
}

/* v0.6.3: 交互功能区（位于绘图区下方） */
.draw-interact-bar {
    background: #f8f6f3;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.draw-interact-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a8ba8;
    white-space: nowrap;
    padding-bottom: 2px;
    border-bottom: 2px solid #d4e8f0;
}
.draw-interact-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.draw-interact-options .draw-tool {
    width: auto;
    white-space: nowrap;
}

/* v0.6.3: 导入代码区 */
.draw-import-section {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8f6f3;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* v0.6.3: 导出代码显示框 */
#export-code-display {
    margin-top: 8px;
}
#export-code-text {
    font-family: monospace;
    letter-spacing: 1px;
}

/* v0.6.3: 管理绘图库卡片网格 */
.drawlib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.drawlib-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}
.drawlib-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.drawlib-thumb {
    background: #f8f6f3;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}
.drawlib-thumb img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}
.drawlib-info {
    padding: 8px 12px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drawlib-code {
    font-family: monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    letter-spacing: 1px;
}
.drawlib-time {
    font-size: 0.78rem;
    color: #999;
}
.drawlib-actions {
    padding: 4px 12px 10px;
    display: flex;
    gap: 6px;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding: 12px 0;
}
.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

/* 绘图页响应式 */
@media (max-width: 900px) {
    .draw-workspace { flex-direction: column; align-items: center; }
    .draw-sidebar {
        width: 100%; flex-direction: row; flex-wrap: wrap;
    }
    .draw-sidebar .draw-tools-list {
        flex-direction: row; flex-wrap: wrap;
    }
    .draw-sidebar .draw-tool { flex: 0 0 auto; }
    .draw-canvas-area { width: 100%; }
    .draw-canvas-wrapper { width: 100%; }
    #draw-canvas { max-width: 100%; }
    .draw-topbar-undo { margin-left: 0; }
}

/* ===================================================================
   响应式
   =================================================================== */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; height: auto; padding: 10px 0; gap: 8px; }
    .filter-row { flex-direction: column; }
    .form-row { flex-direction: column; }
    .map-grid { grid-template-columns: 1fr; }
    .char-grid { grid-template-columns: 1fr; }
    .detail-row { flex-direction: column; gap: 4px; }
    .detail-label { width: auto; }
    .portal-bars { max-width: 100%; }
    .portal-stats { gap: 30px; }
    .portal-title { font-size: 2rem; letter-spacing: 3px; }
    .portal-logo { font-size: 3.5rem; }
    .portal-logo-img { width: 3.5rem; height: 3.5rem; }
}

/* ===================================================================
   v0.5.0 — 用户系统 & 聊天大厅
   =================================================================== */

/* ===== 导航栏头像 ===== */
.nav-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    border: 2px solid rgba(255,255,255,0.5);
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.nav-avatar-btn:hover {
    border-color: #4a8ba8;
    text-decoration: none;
}
.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nav-logout-btn {
    color: #888 !important;
    font-size: 0.8rem;
}

/* ===== 登录/注册页面 ===== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.auth-title {
    font-size: 1.6rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 6px;
}
.auth-subtitle {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 28px;
}
.auth-errors {
    background: #fdf0ef;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #c0392b;
}
.auth-errors p { margin-bottom: 4px; }
.auth-errors p:last-child { margin-bottom: 0; }
.auth-form {}
.auth-field {
    margin-bottom: 18px;
}
.auth-field label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #444;
}
.field-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}
.auth-actions {
    margin-top: 24px;
}
.btn-auth {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}
.auth-link {
    text-align: center;
    margin-top: 18px;
    font-size: 0.9rem;
    color: #888;
}

/* ===== 验证码 ===== */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.captcha-img {
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    height: 50px;
    width: auto;
    transition: opacity 0.2s;
}
.captcha-img:hover { opacity: 0.8; }
.captcha-hint {
    font-size: 0.8rem;
    color: #4a8ba8;
    cursor: pointer;
    user-select: none;
}
.captcha-hint:hover { text-decoration: underline; }

/* ===== 个人主页 ===== */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}
.profile-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.profile-avatar-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #eee;
}
.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-nickname {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 8px;
}
.profile-bio {
    font-size: 1rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}
.profile-join {
    font-size: 0.85rem;
    color: #bbb;
}

.profile-edit-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.profile-edit-title {
    font-size: 1.15rem;
    color: #4a8ba8;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4e8f0;
}

.avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.input-file {
    font-size: 0.9rem;
}
.avatar-preview-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* ===== 聊天大厅 ===== */
.chat-layout {
    display: flex;
    gap: 16px;
    height: calc(100vh - 160px);
    min-height: 500px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.chat-announcement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff8e1;
    border-bottom: 1px solid #ffeeba;
    font-size: 0.85rem;
    color: #856404;
    flex-shrink: 0;
}
.chat-announcement-icon {
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-system-msg {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    padding: 4px 0;
}

.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 80%;
}
.chat-msg-self {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.chat-msg-content {
    background: #f0f4f8;
    border-radius: 10px;
    padding: 8px 14px;
    min-width: 60px;
}
.chat-msg-self .chat-msg-content {
    background: #d4ecf7;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.chat-msg-nickname {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a8ba8;
}
.chat-msg-time {
    font-size: 0.7rem;
    color: #bbb;
}
.chat-msg-text {
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
.chat-input-row {
    display: flex;
    gap: 8px;
}
.chat-input-field {
    flex: 1;
}
.chat-input-hint {
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 6px;
}

/* 聊天侧边栏 */
.chat-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}
.chat-sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chat-sidebar-card h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}
.chat-sidebar-empty {
    font-size: 0.8rem;
    color: #bbb;
    text-align: center;
    padding: 12px 0;
}

.chat-online-count {
    color: #27ae60;
    font-weight: bold;
}
.chat-online-list {}
.chat-online-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f5f5f5;
}
.chat-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    flex-shrink: 0;
}

.chat-ban-list {}
.chat-ban-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f5f5f5;
}
.chat-ban-item:last-child { border-bottom: none; }
.chat-ban-time {
    font-size: 0.8rem;
    color: #c0392b;
}

/* 被封禁页面 */
.chat-banned-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}
.chat-banned-card {
    background: white;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.chat-banned-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
.chat-banned-card h2 {
    font-size: 1.4rem;
    color: #c0392b;
    margin-bottom: 12px;
}
.chat-banned-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 8px;
}
.chat-banned-hint {
    font-size: 0.85rem !important;
    color: #999 !important;
}

/* ===== 管理员聊天 ===== */
.admin-chat-layout {
    display: flex;
    gap: 16px;
    height: calc(100vh - 160px);
    min-height: 500px;
}
.admin-chat-main {
    flex: 1;
}
.admin-chat-msg {
    max-width: 95%;
}
.chat-msg-deleted {
    opacity: 0.4;
}
.chat-msg-deleted .chat-msg-content {
    background: #f5f5f5;
}
.chat-msg-type-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 3px;
    background: #e0edf5;
    color: #4a8ba8;
}
.badge-private {
    background: #fff3cd;
    color: #856404;
}
.admin-msg-actions {
    margin-top: 6px;
    display: flex;
    gap: 4px;
}
.admin-chat-sidebar {
    width: 280px;
}
.ban-form .auth-field {}
.chat-ban-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-ban-name {
    font-weight: 500;
}
.chat-ban-records {
    max-height: 300px;
    overflow-y: auto;
}
.chat-ban-record {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.8rem;
}
.chat-ban-record:last-child { border-bottom: none; }
.chat-ban-record-name {
    font-weight: 500;
    color: #c0392b;
    display: block;
    margin-bottom: 2px;
}
.chat-ban-record-info {
    color: #888;
    display: block;
}
.chat-ban-record-reason {
    color: #999;
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

/* 聊天响应式 */
@media (max-width: 768px) {
    .chat-layout, .admin-chat-layout {
        flex-direction: column;
        height: auto;
    }
    .chat-sidebar, .admin-chat-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .chat-sidebar-card {
        flex: 1;
        min-width: 200px;
    }
    .chat-msg { max-width: 95%; }
}

/* ===== v0.5.1 新增 ===== */

/* 个人主页退出按钮 */
.profile-logout {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* 编辑资料页面 */
.profile-edit-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
}
.profile-edit-heading {
    font-size: 1.2rem;
    color: #4a8ba8;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4e8f0;
}
.edit-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.avatar-upload-current {
    display: inline-block;
}
.avatar-upload-current .avatar-preview-img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #ddd;
}
.avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 可点击的头像/昵称 */
.chat-msg-avatar-link {
    display: flex;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    transition: opacity 0.2s;
}
.chat-msg-avatar-link:hover {
    opacity: 0.8;
    text-decoration: none;
}
.chat-msg-nickname-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a8ba8;
    text-decoration: none;
}
.chat-msg-nickname-link:hover {
    text-decoration: underline;
    color: #5da3c0;
}

/* 在线用户头像 */
.chat-online-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}
.chat-online-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: #2c2c2c;
}
.chat-online-user:hover {
    text-decoration: none;
    color: #4a8ba8;
    background: #f8f6f3;
    margin: 0 -8px;
    padding: 5px 8px;
    border-radius: 4px;
}

/* ===================================================================
   v0.5.4 新增样式
   =================================================================== */

/* ----- 已撤回消息 ----- */
.chat-msg-recalled {
    opacity: 0.55;
}
.chat-msg-recalled .chat-msg-text {
    font-style: italic;
}

/* ----- 撤回按钮 ----- */
.chat-msg-recall-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 3px;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}
.chat-msg-recall-btn:hover {
    background: #fce4e4;
    color: #c0392b;
}

/* ----- 地图卡片底部（收藏 + 删除） ----- */
.map-card-footer {
    display: flex;
    align-items: center;
    padding: 6px 14px 8px;
    border-top: 1px solid #f0f0f0;
}

/* ----- 收藏按钮 ----- */
.map-fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #888;
    transition: all 0.2s;
}
.map-fav-btn:hover {
    border-color: #f0c040;
    background: #fffdf0;
    color: #d4a017;
}
.map-fav-btn.map-fav-active {
    border-color: #f0c040;
    background: #fffdf0;
    color: #d4a017;
}
.map-fav-star {
    font-size: 1.1rem;
    line-height: 1;
}
.map-fav-text {
    font-size: 0.75rem;
}

/* ----- 个人主页 - 我的收藏（地图卡片网格） ----- */
.profile-favorites {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    text-align: left;
}
.profile-favorites-title {
    font-size: 1.1rem;
    color: #4a8ba8;
    margin-bottom: 16px;
}
.profile-favorites .map-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.profile-fav-empty {
    font-size: 0.9rem;
    color: #999;
    padding: 8px 0;
    text-align: center;
}
.profile-fav-empty a {
    color: #4a8ba8;
    font-weight: 500;
}

/* ===== v0.5.5：编辑弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.modal-box h3 {
    margin-bottom: 16px;
    font-size: 1.2rem;
}
.modal-box .form-group {
    margin-bottom: 12px;
}
.modal-box .form-group label {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 4px;
}
.modal-box .form-group .input,
.modal-box .form-group .textarea {
    width: 100%;
}
.modal-box .form-group .textarea {
    height: 80px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

/* v0.5.5：管理页编辑按钮组 */
.manage-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.manage-item .manage-actions .btn-tiny {
    padding: 2px 8px;
    font-size: 0.78rem;
}

/* ===== v0.6.0：排行榜 ===== */
.ranking-page {
    max-width: 1100px;
    margin: 0 auto;
}
.ranking-heading {
    font-size: 1.8rem;
    margin-bottom: 4px;
}
.ranking-subtitle {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 24px;
}

/* 交互区 */
.ranking-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.ranking-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ranking-controls-right {
    flex-shrink: 0;
}
.ranking-search-input {
    width: 220px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

.ranking-tabs {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #4a8ba8;
}
.ranking-tab {
    padding: 8px 20px;
    background: #fff;
    color: #4a8ba8;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.ranking-tab:not(:last-child) {
    border-right: 1px solid #4a8ba8;
}
.ranking-tab:hover {
    background: #eef6fa;
}
.ranking-tab-active {
    background: #4a8ba8;
    color: #fff;
}
.ranking-tab-active:hover {
    background: #3a7a98;
}
.ranking-sub-tabs {
    border-color: #7ab0c4;
}
.ranking-sub-tabs .ranking-tab {
    color: #7ab0c4;
    border-color: #7ab0c4;
    padding: 6px 16px;
    font-size: 0.85rem;
}
.ranking-sub-tabs .ranking-tab-active {
    background: #7ab0c4;
    color: #fff;
}

/* 表格区 */
.ranking-table-wrap {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.ranking-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 2px solid #d0d0d0;
    white-space: nowrap;
    user-select: none;
}
.ranking-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #f0f0f0;
}
.ranking-table td:last-child {
    border-right: none;
}
.ranking-table tr:last-child td {
    border-bottom: none;
}
.ranking-sortable {
    cursor: pointer;
    transition: background 0.15s;
}
.ranking-sortable:hover {
    background: #f5f8fa;
}
.ranking-sort-active {
    background: #eef4f8;
    font-weight: 600;
    color: #2c3e50;
}
.ranking-sort-icons {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1;
    gap: 1px;
}
.ranking-sort-up,
.ranking-sort-down {
    font-size: 0.6rem;
    color: #ccc;
    line-height: 1;
}
.ranking-sort-up.active {
    color: #4a8ba8;
}
.ranking-sort-down.active {
    color: #4a8ba8;
}
.ranking-rank {
    width: 40px;
    text-align: center;
    color: #999;
}
.ranking-name {
    font-weight: 500;
}
.ranking-cell-active {
    background: #f8fbfc;
}
.ranking-row:hover td {
    background: #fafcfe;
}
.ranking-loading,
.ranking-empty {
    text-align: center;
    padding: 40px !important;
    color: #999;
}

