/* ==========================================
   ConsensusVault - 统一样式文件
   ========================================== */

/* ===== 字体导入 ===== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:wght@400;700&family=Courier+Prime:wght@400;700&display=swap');

/* ===== 1. CSS 变量定义 ===== */
:root {
    /*  风格配色 */
    --bg: #0b0c11;
    --surface: #141826;
    --surface-2: #1d2232;
    --border: #2f3547;
    --text: #f6f7ff;
    --text-muted: #c7ccda;
    --accent: #ff7a1a;
    --accent-2: #7c5cff;
    --accent-glow: rgba(255, 122, 26, 0.3);
    --success: #22c55e;
    --danger: #ff3333;
    --shadow: rgba(0, 0, 0, 0.35);

    /* 赛博朋克字体 */
    --font-cyber-display: 'Orbitron', 'Source Han Sans', 'Source Han Sans CN', sans-serif;
    --font-cyber-mono: 'Space Mono', 'Courier Prime', monospace;
    --font-cyber-regular: 'Space Mono', 'Source Han Sans CN', 'Microsoft YaHei', sans-serif;

    /* 尺寸与动画 */
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* ===== 2. 全局重置与基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* 针对OK钱包等特殊浏览器的额外修复 */
html, body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100vw;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(124, 92, 255, 0.15), transparent),
        radial-gradient(1000px 500px at 80% 10%, rgba(255, 122, 26, 0.15), transparent),
        var(--bg);
    color: var(--text);
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.05em;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 20px;
    font-weight: 500;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 赛博朋克扫描线覆盖层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 122, 26, 0.03),
        rgba(255, 122, 26, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9998;
    animation: scanlines 8s linear infinite;
}

/* 顶部到底部的扫描线动画 */
@keyframes scanlines {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.container.vault-detail-container {
    width: 46%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
    box-sizing: border-box;
    position: relative;
}

/* 针对所有容器的通用溢出控制 */
.container,
.container * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 确保所有容器不会溢出 */
#app {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}


/* ===== 3. 排版样式 ===== */
h1,
h2,
h3,
h4,
h5,
h6,
.title,
.stat-value,
.vault-name,
.tab,
.nav {
    font-family: var(--font-cyber-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 122, 26, 0.3);
}

.subtitle,
.description,
p,
.text-muted,
.info-text {
    font-family: var(--font-cyber-regular);
    font-weight: 500;
    letter-spacing: 0.04em;
}



/* ===== 4. 导航栏 ===== */
#app {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(19, 23, 34, 0.82);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    line-height: 1;
}

.logo-mark {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111;
    box-shadow: 0 6px 24px rgba(124, 92, 255, 0.35);
    flex-shrink: 0;
    position: relative;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.1;
    text-align: center;
    letter-spacing: 0;
    text-indent: 0;
    padding: 0.3px 0 0 0.5px; /* 往下0.3px，往右0.5px - 使用padding来调整符号位置 */
    margin: 0;
}

.logo-mark::before {
    content: '';
    display: none;
}

.logo-text {
    font-size: 25px;
    font-family: var(--font-cyber-display);
    text-transform: none;
    letter-spacing: 0.12em;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 122, 26, 0.5), 0 0 40px rgba(124, 92, 255, 0.3);
    line-height: 1.2;
    display: inline-block;
    vertical-align: middle;
}

.logo-badge {
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.tab {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.tab.active,
.tab:hover {
    color: var(--text);
    background: var(--surface-2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    min-width: 0;
    flex: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.search-bar i {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    outline: none;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* 链信息和钱包信息 */
.chain-info,
.wallet-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 600;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
}

/* 网络选择下拉框样式统一 */
.chain-info select.network-select {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 0;
    margin: 0;
    height: auto;
    line-height: 1.4;
    font-family: var(--font-cyber-regular);
}

.chain-info select.network-select option {
    background: var(--surface);
    color: var(--text);
}

.chain-info:hover {
    background: #222739;
}

.balance {
    color: var(--success);
}

/* ===== 5. 按钮样式 ===== */
.btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    height: 36px;
    white-space: nowrap;
    box-sizing: border-box;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-cyber-mono);
    box-shadow: 0 0 8px rgba(255, 122, 26, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 26, 0.4), transparent);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.btn:hover::before {
    animation: energyPulse 0.6s ease-out;
}

@keyframes energyPulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

.btn-primary,
.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111;
    border-color: transparent;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255, 122, 26, 0.3);
}

/* 禁用状态按钮样式（仍然可以点击以显示提示） */
.btn-disabled,
.btn.btn-disabled {
    opacity: 0.5;
    cursor: pointer !important; /* 确保仍然可以点击 */
    pointer-events: auto !important; /* 确保事件可以触发 */
    position: relative;
}

.btn-disabled:hover,
.btn.btn-disabled:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
}

.btn-outline,
.btn.ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn.ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    justify-content: center;
}

.btn-block {
    width: 100%;
}

/* ===== 6. 控件区与过滤器 ===== */
.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 12px;
}

.filters {
    display: flex;
    gap: 8px;
}

.pill {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
}

.pill.active,
.pill:hover {
    color: var(--text);
    border-color: #343a4e;
}

.sort-chain {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chains {
    display: flex;
    gap: 8px;
}

.chain {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
}

.chain.active,
.chain:hover {
    color: var(--text);
    border-color: #343a4e;
}

/* ===== 7. 视图与区块 ===== */
.views-container {
    padding: 40px 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section {
    background: rgba(20, 24, 38, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px var(--shadow);
}

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

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--font-cyber-display);
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.4);
}

/* ===== 8. 表单样式 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.05em;
}

.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
    margin-top: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.input-large,
.input,
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.03em;
    box-sizing: border-box; /* 确保 padding 和 border 包含在高度内 */
    height: 44px; /* 固定高度，与 p 标签一致 */
}

.input-large:focus,
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.1);
}

.select-sort,
.select-small,
select {
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.05em;
}

.select-sort:hover {
    border-color: var(--accent);
    background: #1d2640;
}

select option {
    background: var(--surface);
    color: var(--text);
}

/* ===== 9. 金库卡片 ===== */
.vaults-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.vault-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* 保持 flex 布局，不改为 grid */
}

.vault-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 122, 26, 0.4) 0%,
        rgba(255, 122, 26, 0.2) 50%,
        transparent 100%
    );
    pointer-events: none;
    opacity: 0;
}

.vault-card:hover::before {
    animation: scanSweep 1.2s ease-in-out; /* 恢复为更慢的扫频速度 */
}

@keyframes scanSweep {
    0% {
        top: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.vault-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(255, 122, 26, 0.15);
    transform: translateY(-4px);
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.vault-symbol {
    background: var(--surface-2);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.08em;
    box-shadow: 0 0 8px rgba(255, 122, 26, 0.2);
}

.vault-address {
    font-family: var(--font-cyber-mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--surface-2);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
}

/* 价格和市值显示样式 */
.price-loading {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

.price-value {
    font-weight: 600;
    color: var(--accent);
}

.info-row .value.price-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.vault-status,
.status-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.status-active {
    background: rgba(255, 122, 26, 0.12);
    color: var(--accent);
}

.status-consensus,
.status-unlocked {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.vault-body {
    flex: 1;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.vault-stat {
    margin-bottom: 12px;
}

.vault-stat label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
}

.vault-stat value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.4);
}

/* 进度条 */
.vault-progress,
.progress-section {
    margin-top: 12px;
}

.interaction-section {
    margin-top: 40px;
    /* 根据需要调整距离 */
}


.vault-progress label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.3s;
}

.progress-text,
.progress-info {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.03em;
}

.vault-footer {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}

/* ===== 9.1 金库卡片内部结构样式（对齐优化） ===== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直居中，确保状态标签对齐 */
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    min-height: 48px; /* 最小高度，JavaScript会动态设置实际高度 */
    position: relative;
    z-index: 1;
    gap: 12px; /* 添加间距，避免内容紧贴 */
    transition: height 0.3s ease; /* 平滑过渡，与卡片其他效果保持一致 */
}

.card-header h3 {
    font-size: 18px; /* 稍微增大字体，更醒目 */
    font-weight: 700; /* 恢复原来的粗体，更符合赛博朋克风格 */
    color: var(--text);
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden; /* 超出部分隐藏 */
    white-space: nowrap; /* 单行显示，配合省略号 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
    font-family: var(--font-cyber-display);
    letter-spacing: 0.08em;
    text-shadow: 0 0 10px rgba(255, 122, 26, 0.4); /* 增强发光效果，更符合原风格 */
    line-height: 1.5; /* 稍微增加行高 */
    text-transform: uppercase; /* 保持大写风格，更符合赛博朋克 */
    cursor: help; /* 鼠标悬停时显示帮助光标，提示有完整名称 */
    position: relative; /* 为自定义 tooltip 定位 */
}

/* 自定义 tooltip - 快速显示（延迟约0.25秒，比浏览器默认的1秒快很多） */
.card-header h3[title]::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-cyber-regular);
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow);
    text-transform: none; /* tooltip 不转换大小写 */
    letter-spacing: 0.03em;
    pointer-events: none; /* 不阻挡鼠标事件 */
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease-out 0s, transform 0.15s ease-out 0s; /* 隐藏时立即（无延迟） */
}

.card-header h3[title]:hover::after {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.15s ease-out 0.25s, transform 0.15s ease-out 0.25s; /* 显示时延迟0.25秒 */
}

.card-header .status-badge {
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 图标和文字之间的间距 */
    height: fit-content; /* 根据内容自适应高度 */
}

.card-body {
    flex: 1;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    min-height: 24px; /* 确保所有行高度一致 */
    gap: 12px; /* 添加间距 */
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row .label {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    width: 100px; /* 固定宽度，确保所有label宽度一致，让value对齐 */
    margin-right: 0; /* 使用gap代替margin */
    line-height: 1.4; /* 确保行高一致 */
}

.info-row .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.03em;
    text-align: right;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255, 122, 26, 0.3);
    line-height: 1.4; /* 确保行高一致 */
}

.card-footer {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
    margin-top: auto; /* 确保footer在底部 */
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* 进度条在卡片中的样式 */
.card-body .progress-bar {
    margin-top: 12px;
    margin-bottom: 6px;
}

.card-body .progress-text {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.03em;
    text-align: center;
}

/* ===== 10. 表格样式 ===== */
.table-wrap {
    overflow-x: auto;
    padding: 0 20px 20px;
    margin-bottom: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 24, 38, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: var(--surface-2);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-cyber-display);
    letter-spacing: 0.08em;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.03em;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: rgba(124, 92, 255, 0.06);
}

/* ===== 11. 模态框 ===== */
.modal-overlay,
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px var(--shadow);
    overflow: hidden; /* 防止内容溢出 */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.modal-title {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-cyber-display);
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.3);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 8px; /* 增大点击区域 */
    min-width: 44px; /* 移动端最小触摸目标 */
    min-height: 44px; /* 移动端最小触摸目标 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    touch-action: manipulation; /* 优化触摸响应 */
}

.modal-close:hover,
.modal-close:active {
    color: var(--text);
    background: rgba(0, 0, 0, 0.05);
}

.modal-body {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.6;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(85vh - 140px); /* 为标题、padding和按钮留出空间 */
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
    padding-right: 12px; /* 为滚动条留出空间 */
    /* 自定义滚动条样式，让滚动条更明显 */
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--surface-2);
}

/* Webkit 浏览器滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--surface-2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* ===== 12. 加载状态 ===== */
.loading,
.loading-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.05em;
}

.loading i,
.loading-content i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-more {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
}

/* ===== 13. 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-family: var(--font-cyber-regular);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 8px 0;
}

/* ===== 14. 页脚 ===== */
.footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: rgba(19, 23, 34, 0.6);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 600px;
}

.footer-warning {
    padding: 20px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
}

/* ===== 15. 统计卡片 ===== */
.stats-section {
    background: rgba(19, 23, 34, 0.75);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.stat-icon,
.stat-value,
.stat-label {
    color: var(--text);
}

/* ===== 16. 功能卡片 ===== */
.feature-card,
.action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feature-card:hover,
.action-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(255, 122, 26, 0.1);
}

.feature-icon,
.action-header i {
    color: var(--accent-2);
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
    align-items: stretch; /* 确保所有卡片高度一致 */
}

.action-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    min-width: 0;
    height: 48px; /* 固定高度，确保所有 header 对齐 */
    flex-shrink: 0; /* 不收缩 */
}

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

/* 确保 action-body 的第一个元素（input 或 p）高度一致 */
.action-body > input.input-large,
.action-body > p.text-muted:first-of-type {
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

/* 确保投票和提现卡片的 p 标签与 input 样式一致 */
.action-body p.text-muted {
    margin: 0;
    padding: 12px 16px;
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

/* 确保按钮对齐 */
.action-body > button {
    flex-shrink: 0; /* 按钮不收缩 */
}

/* 确保 small 标签对齐 */
.action-body > small {
    flex-shrink: 0; /* small 标签不收缩 */
    min-height: 20px; /* 最小高度，即使为空也占位 */
}

/* ===== 17. 信息卡片 ===== */
.vault-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    min-width: 0;
    overflow: hidden;
}

.info-card label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
}

.info-card code {
    display: block;
    background: var(--surface-2);
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent);
    word-break: break-word;
    overflow-wrap: break-word;
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.02em;
    line-height: 1.5;
    min-height: auto;
}

.info-card value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.3);
}

.info-card-wide {
    grid-column: 1 / -1;
}


/* ===== 18. 响应式设计 ===== */
/* 移动端样式已移至 mobile.css 文件 */

/* ===== 19. 工具类 ===== */
.input-label.bright,
.feature-title-bright {
    color: var(--text);
    font-weight: 600;
    font-family: var(--font-cyber-display);
    letter-spacing: 0.08em;
}

.btn.primary.connected {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    opacity: 1;
}

.btn.primary.connected:hover {
    opacity: 0.9;
}

/* 网络选择 */
.network-item {
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.network-item:hover {
    border-color: #343a4e;
}

.network-name {
    color: var(--text);
    font-weight: 600;
    font-family: var(--font-cyber-display);
    letter-spacing: 0.08em;
}

.network-id {
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-cyber-mono);
    letter-spacing: 0.03em;
}

/* ===== 20. 赛博朋克特效 ===== */
/* 发光效果增强 */
.price-value {
    font-weight: 600;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.6), 0 0 16px rgba(255, 122, 26, 0.3);
    font-family: var(--font-cyber-mono);
}

/* 数字和金额发光 */
.stat-value {
    text-shadow: 0 0 12px rgba(255, 122, 26, 0.5), 0 0 24px rgba(124, 92, 255, 0.2);
}

/* 标签发光增强 */
.status-active {
    background: rgba(255, 122, 26, 0.12);
    color: var(--accent);
    font-family: var(--font-cyber-mono);
    text-shadow: 0 0 6px rgba(255, 122, 26, 0.4);
    letter-spacing: 0.06em;
}

.status-consensus,
.status-unlocked {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
    font-family: var(--font-cyber-mono);
    text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
    letter-spacing: 0.06em;
}

/* Tab 活跃状态增强 */
.tab.active,
.tab:hover {
    color: var(--text);
    background: var(--surface-2);
    font-family: var(--font-cyber-mono);
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.3);
}

/* 输入框焦点状态增强 */
.input-large:focus,
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.1), 0 0 12px rgba(255, 122, 26, 0.2);
}

/* 小标题和说明文字 */
small {
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.03em;
    font-size: 12px;
}

/* 金库卡片标题 */
.vault-name {
    font-family: var(--font-cyber-display);
    letter-spacing: 0.08em;
}

/* ===== 留言区（赛博朋克风格） ===== */
.comments-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.comments-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-family: var(--font-cyber-display);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.comment-count {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
}

.comment-input-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.comment-input-area:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 122, 26, 0.15);
}

.comment-input {
    width: 100%;
    min-height: 72px;
    padding: 8px 0;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font-cyber-regular);
    font-size: 14px;
    letter-spacing: 0.04em;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}

.comment-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.comment-input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.comment-char-count {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-cyber-mono);
}

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

.comments-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 24px 16px;
    font-family: var(--font-cyber-regular);
}

.comment-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    transition: var(--transition);
    min-width: 0;
    overflow: hidden;
}

.comment-card:hover {
    border-color: rgba(255, 122, 26, 0.4);
    box-shadow: 0 0 12px rgba(255, 122, 26, 0.08);
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 6px;
    font-size: 12px;
    font-family: var(--font-cyber-mono);
    color: var(--text-muted);
}

.comment-addr {
    color: var(--accent);
    letter-spacing: 0.04em;
}

.comment-action {
    padding: 2px 6px;
    background: rgba(124, 92, 255, 0.2);
    color: var(--accent-2);
    border-radius: 4px;
    font-weight: 600;
}

.comment-time {
    opacity: 0.85;
}

.comment-tx-link {
    color: var(--accent);
    text-decoration: none;
}

.comment-tx-link:hover {
    text-decoration: underline;
}

.comment-body {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.03em;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 分享按钮与成功弹窗 ===== */
.vault-header-section {
    margin-top: 24px;
    margin-bottom: 16px;
}

.vault-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.vault-header-row .section-title {
    margin-bottom: 0;
    word-break: break-word;
    white-space: normal;
    min-width: 0;
    flex: 1 1 0;
    overflow: hidden;
}

.btn-share-vault {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.04em;
    transition: var(--transition);
}

.btn-share-vault:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(255, 122, 26, 0.15);
}

.modal-success-message {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

.modal-share-input-area {
    margin-bottom: 16px;
}

.modal-share-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-cyber-regular);
    font-size: 14px;
    letter-spacing: 0.04em;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.modal-share-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 122, 26, 0.15);
}

.modal-share-char-count {
    margin-top: 6px;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-cyber-mono);
}

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

.modal-success-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-share-modal {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-share-modal:hover {
    border-color: #1da1f2;
    color: #1da1f2;
    box-shadow: 0 0 12px rgba(29, 161, 242, 0.2);
}

.btn-share-comment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-family: var(--font-cyber-regular);
    letter-spacing: 0.03em;
    transition: var(--transition);
}

.btn-share-comment:hover {
    border-color: #1da1f2;
    color: #1da1f2;
    box-shadow: 0 0 8px rgba(29, 161, 242, 0.15);
}