/* =========================================
   1. 全局设置 & 变量 (Global)
   ========================================= */
:root {
    --gold: #D4AF37;       /* 标准金 */
    --gold-light: #F4E4BC; /* 浅金 */
    --gold-dark: #B8860B;  /* 深金 */
    --black: #0D0D0D;      /* 深黑 */
    --dark-bg: #1A1A1A;    /* 板块深色背景 */
    --light-bg: #F9F9F9;   /* 板块浅色背景 */
    --text-dark: #333333;  /* 浅色背景下的深色字 */
    --text-light: #DDDDDD; /* 深色背景下的浅色字 */
    --container-width: 1200px;
    
    /* 状态颜色 */
    --c-untouched: #2ecc71;     /* 绿色: 未动用 */
    --c-accumulated: #ff8c00;   /* 橙色: 累积 */
    --c-redeemed: #CCCCCC;      /* 20% 灰 - 较亮*/
    --c-spent: #595959;         /* 65% 灰 - 较暗 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', "Microsoft YaHei", sans-serif;
    line-height: 1.8; 
    font-size: 16px;
    color: var(--text-dark);
    background-color: var(--black);
}
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   ★ 核心修复：多语言显示控制 (Language Logic)
   ========================================= */
/* 1. 默认隐藏所有语言包 */
.lang-cn, .lang-tw, .lang-en { 
    display: none !important; 
}

/* 2. 激活对应的语言块 (DIV/P/UL 等块级元素) */
body.mode-cn div.lang-cn, body.mode-cn p.lang-cn, body.mode-cn ul.lang-cn, body.mode-cn li.lang-cn,
body.mode-cn tbody.lang-cn { display: block !important; }

body.mode-tw div.lang-tw, body.mode-tw p.lang-tw, body.mode-tw ul.lang-tw, body.mode-tw li.lang-tw,
body.mode-tw tbody.lang-tw { display: block !important; }

body.mode-en div.lang-en, body.mode-en p.lang-en, body.mode-en ul.lang-en, body.mode-en li.lang-en,
body.mode-en tbody.lang-en { display: block !important; }

/* 3. 激活对应的语言行内元素 (SPAN/A/H标签内的文本，防止换行) */
body.mode-cn span.lang-cn, body.mode-cn a.lang-cn { display: inline !important; }
body.mode-tw span.lang-tw, body.mode-tw a.lang-tw { display: inline !important; }
body.mode-en span.lang-en, body.mode-en a.lang-en { display: inline !important; }

/* 表格特殊处理 */
body.mode-cn tbody.lang-cn { display: table-row-group !important; }
body.mode-tw tbody.lang-tw { display: table-row-group !important; }
body.mode-en tbody.lang-en { display: table-row-group !important; }

/* =========================================
   ★ 核心修复：多语言显示控制
   ========================================= */

/* 1. 默认隐藏所有带 lang- 标签的元素 */
.lang-cn, .lang-tw, .lang-en { 
    display: none !important; 
}

/* 2. 激活对应的语言 (当 body 有 mode-cn 时，显示 .lang-cn) */

/* 针对块级元素 (div, p, ul) */
body.mode-cn .lang-cn, 
body.mode-tw .lang-tw, 
body.mode-en .lang-en { 
    display: block !important; 
}

/* ★★★ 关键修复点：针对行内元素 (span, a) ★★★ */
/* 这一段专门管“更新时间”那种在一行里显示的文字 */
body.mode-cn span.lang-cn, 
body.mode-tw span.lang-tw, 
body.mode-en span.lang-en { 
    display: inline !important; 
}
/* =========================================
   2. 页头 (Header)
   ========================================= */
.header {
    height: 150px;
    background-color: var(--black);
    border-bottom: 2px solid var(--gold);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { text-decoration: none; }
.logo h1 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    background: linear-gradient(to bottom, #fdf5e6 0%, var(--gold) 40%, var(--gold-dark) 60%, #8b6508 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* 标题里的语言切换特殊处理 */
.logo h1 .lang-cn, .logo h1 .lang-tw, .logo h1 .lang-en { display: none !important; }
body.mode-cn .logo h1 .lang-cn { display: inline !important; font-size: 28px; }
body.mode-tw .logo h1 .lang-tw { display: inline !important; font-size: 28px; }
body.mode-en .logo h1 .lang-en { display: inline !important; font-size: 24px; max-width: 400px; }

.logo .subtitle {
    color: #888;
    font-size: 14px;
    letter-spacing: 1px;
}

.header-right { display: flex; align-items: center; gap: 30px; }
.nav-list { display: flex; list-style: none; gap: 25px; }
.nav-link {
    color: #FFF;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--gold); }

/* 导航链接里的文字处理 */
.nav-link .lang-cn, .nav-link .lang-tw, .nav-link .lang-en { display: none !important; }
body.mode-cn .nav-link .lang-cn { display: inline !important; }
body.mode-tw .nav-link .lang-tw { display: inline !important; }
body.mode-en .nav-link .lang-en { display: inline !important; }

.lang-switch {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.hamburger-menu { display: none; }


/* =========================================
   3. 轮播图 & 价格条 (Hero Section)
   ========================================= */
.hero-section { background: #000; position: relative; }
.slider-container { width: 100%; height: 600px; overflow: hidden; position: relative; }
.slider-track { display: flex; height: 100%; width: 100%; transition: transform 0.8s ease; }
.slide-img { width: 100%; height: 100%; object-fit: cover; flex-shrink: 0; }

/* 实时价格条 */
.price-ticker-bar { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.25)); padding: 20px 0; border-top: 2px solid var(--gold); z-index: 10; backdrop-filter: blur(10px); box-shadow: 0 -4px 20px rgba(0,0,0,0.3); }
.ticker-content { display: flex; justify-content: center; align-items: center; gap: 60px; font-family: 'Segoe UI', system-ui, sans-serif; font-weight: 600; }
.ticker-item, .ticker-ratio { display: flex; flex-direction: column; align-items: center; min-width: 160px; }
.t-label { font-size: 0.9rem; color: #ccc; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.8 px; font-weight: 500; }
.t-value { font-size: 1.5rem !important; font-weight: 800; color: var(--gold) !important; letter-spacing: -0.8px; text-shadow: 0 0 12px rgba(212, 175, 55, 0.6); line-height: 1; }
.ticker-ratio .t-value { color: #ffffff !important; text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
.ticker-vs { font-size: 1.6rem; font-weight: bold; color: #999; padding: 0 15px; align-self: center; }


/* =========================================
   4. 通用板块设置 (Sections)
   ========================================= */
html { scroll-behavior: smooth; }
.section { padding: 60px 0; scroll-margin-top: 150px; }
.section-light { background-color: var(--light-bg); color: var(--text-dark); }
.section-dark { background-color: var(--dark-bg); color: var(--text-light); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title { font-size: 32px; font-weight: bold; color: var(--gold); }
.section-light .section-title { color: var(--gold-dark); text-shadow: 0 1px 1px rgba(0,0,0,0.1); }

/* 标题多语言 */
.section-title .lang-cn, .section-title .lang-tw, .section-title .lang-en { display: none !important; }
body.mode-cn .section-title .lang-cn { display: inline !important; }
body.mode-tw .section-title .lang-tw { display: inline !important; }
body.mode-en .section-title .lang-en { display: inline !important; }


/* =========================================
   5. 缘起 & 铸造 (Story & Mint)
   ========================================= */
/* 三列布局 */
.grid-3-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.col-title { color: var(--gold-dark); font-size: 18px; margin-bottom: 15px; font-weight: bold; border-left: 4px solid var(--gold); padding-left: 10px; }
.section-dark .col-title { color: var(--gold); }
.col-text { font-size: 16px; text-align: justify; line-height: 1.8; }
.text-indent-block .col-text span { text-indent: 2em; }

/* 缘起图集 */
.mint-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; width: 100%; }
.mint-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--gold-dark); opacity: 0.95; transition: all 0.3s ease; cursor: pointer; }
.mint-gallery img:hover { opacity: 1; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); border-color: var(--gold); }

/* 铸造流程图 */
.process-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.process-gallery img { width: 100%; height: 220px; object-fit: cover; border-radius: 6px; border: 1px solid #444; opacity: 0.9; transition: all 0.3s; }
.process-gallery img:hover { opacity: 1; border-color: var(--gold); transform: translateY(-5px); }
.icon-title { border: none; padding-left: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }


/* =========================================
   6. 规格 (Specs)
   ========================================= */
.specs-wrapper { display: flex; gap: 40px; }
.spec-card { flex: 1; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.spec-card-title { color: var(--gold-dark); border-left: 4px solid var(--gold-dark); padding-left: 10px; margin-bottom: 20px; font-size: 18px; font-weight: bold; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 4px 0; border-bottom: 1px solid #EEE; font-size: 16px; }
.spec-table td:first-child { font-weight: bold; color: #444; width: 100px; }
.spec-table td:last-child { text-align: right; color: #000; }


/* =========================================
   7. 数据验证 (Data Verification)
   ========================================= */

/* 搜索框 (含按钮) */
.dv-search-wrapper { position: relative; max-width: 600px; margin: 0 auto 50px; }
.dv-input-group { display: flex; gap: 10px; width: 100%; }
.dv-search-input { flex: 1; padding: 15px 25px; background: #111; border: 1px solid #333; border-radius: 30px; color: #fff; font-size: 16px; outline: none; transition: all 0.3s; font-family: monospace; }
.dv-search-input:focus { border-color: var(--c-untouched); box-shadow: 0 0 15px rgba(46, 204, 113, 0.2); }
.dv-search-btn { padding: 0 30px; background: var(--gold); color: #000; border: none; border-radius: 30px; font-weight: bold; cursor: pointer; font-size: 14px; letter-spacing: 1px; transition: opacity 0.3s; }
.dv-search-btn:hover { opacity: 0.8; }
.dv-search-btn:active { transform: scale(0.95); }

/* 错误提示 */
.dv-search-error { border-color: #ff4444 !important; animation: dv-shake 0.4s ease-in-out; }
@keyframes dv-shake { 0%, 100% {transform:translateX(0)} 25%, 75% {transform:translateX(-5px)} 50% {transform:translateX(5px)} }
.dv-error-msg { position: absolute; bottom: -30px; left: 0; right: 0; text-align: center; color: #ff4444; font-size: 14px; opacity: 0; transition: 0.3s; }
.dv-show-error .dv-error-msg { opacity: 1; bottom: -25px; }

/* 统计面板 (左右等宽布局) */
.dv-stats-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.dv-card-chart, .dv-card-legend {
    flex: 1;
    min-width: 300px;
    background: #111;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #222;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dv-card-chart { align-items: center; }

/* 环形图 */
.dv-ring-chart { width: 220px; height: 220px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; }
.dv-ring-inner { width: 110px; height: 110px; background: #111; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.dv-ring-val { font-size: 2.5rem; font-weight: 800; color: #fff; line-height: 1; }
.dv-ring-label { font-size: 12px; color: #888; margin-top: 5px; letter-spacing: 1px; }

/* 图例 */
.dv-legend-title { font-size: 14px; color: #666; text-transform: uppercase; margin-bottom: 20px; border-bottom: 1px solid #222; padding-bottom: 10px; width: 100%; }
.dv-legend-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; cursor: pointer; transition: 0.2s; font-size: 14px; color: #ccc; }
.dv-legend-item:hover { color: #fff; transform: translateX(5px); }
.dv-legend-left { display: flex; align-items: center; }
.dv-dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 12px; }
.dv-count { font-weight: bold; font-family: monospace; color: #fff; }

.dv-tvl-box { margin-top: auto; padding-top: 15px; border-top: 1px solid #222; font-size: 14px; color: #ccc; display: flex; justify-content: space-between; align-items: center; width: 100%; }
.dv-tvl-val { color: var(--gold); font-weight: bold; font-size: 16px; }

/* 矩阵网格 (20列) */
.dv-matrix-section { max-width: 800px; margin: 0 auto; }
.dv-matrix-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 12px; }

/* 圆点样式 */
.dv-node { width: 100%; aspect-ratio: 1; border-radius: 50%; cursor: pointer; position: relative; transition: transform 0.2s, opacity 0.3s; }
.st-untouched { background-color: var(--c-untouched); }
.st-accumulated { background-color: var(--c-accumulated); box-shadow: 0 0 8px var(--c-accumulated); }
.st-redeemed { background-color: var(--c-redeemed); }
.st-spent { background-color: var(--c-spent); }

.dv-node:hover { transform: scale(1.6); z-index: 10; border: 1px solid #fff; }
.dv-dimmed { opacity: 0.15; transform: scale(0.8); pointer-events: none; }
.dv-highlighted { transform: scale(1.5); box-shadow: 0 0 0 2px #fff; z-index: 20; }

.dv-tooltip { position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.95); border: 1px solid #333; padding: 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 100; font-family: monospace; text-align: left; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.dv-node:hover .dv-tooltip { opacity: 1; bottom: 125%; }
.tt-row { margin-bottom: 4px; display: flex; justify-content: space-between; gap: 15px; }
.tt-val { color: #fff; font-weight: bold; }


/* =========================================
   8. 媒评 & 页脚 (Media & Footer)
   ========================================= */
.media-list { list-style: none; padding: 0 20px; }
.media-list li { margin-bottom: 10px; font-size: 16px; border-bottom: 1px dotted #ccc; padding-bottom: 8px; line-height: 1.5; }
.media-list a { color: var(--gold-dark); text-decoration: none; margin-left: 10px; font-weight: 500; }
.media-list a:hover { text-decoration: underline; color: var(--gold); }

.footer { background-color: var(--black); color: #888; padding: 30px 0; font-size: 15px; border-top: 1px solid #222; }
.footer-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-links a, .footer-email a { color: #888; text-decoration: none; margin-right: 20px; transition: color 0.3s; }
.footer-links a:hover, .footer-email a:hover { color: var(--gold); }
.footer-copy { letter-spacing: 1px; text-align: center; }


/* =========================================
   9. 响应式适配 (Responsive)
   ========================================= */
@media (max-width: 768px) {
    .header { height: auto; padding: 15px 0; }
    .header-inner { flex-wrap: wrap; }
    .header-right { display: none; width: 100%; flex-direction: column; margin-top: 20px; background: #111; padding: 20px; }
    .header-right.active { display: flex; }
    .nav-list { flex-direction: column; text-align: center; width: 100%; }
    .hamburger-menu { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
    .hamburger-menu span { width: 25px; height: 3px; background: var(--gold); }
    .grid-3-col, .specs-wrapper { grid-template-columns: 1fr; flex-direction: column; }
    .mint-gallery { grid-template-columns: repeat(3, 1fr); }
    .process-gallery { grid-template-columns: 1fr; height: auto; }
    .footer-flex { flex-direction: column; text-align: center; }
    
    /* 数据验证板块手机适配 */
    .dv-stats-container { flex-direction: column; }
    .dv-card-legend { min-width: 100%; }
    .dv-matrix-grid { grid-template-columns: repeat(10, 1fr); gap: 6px; }

    /* 价格条手机适配 */
    .price-ticker-bar { padding: 16px 0; }
    .ticker-content { gap: 30px; flex-wrap: wrap; }
    .ticker-item, .ticker-ratio { min-width: auto; }
    .t-label { font-size: 0.85rem; margin-bottom: 6px; }
    .t-value { font-size: 1.75rem !important; }
    .ticker-vs { display: none; }
}
/* =========================================
   10. 最终修正：页脚完美布局 (Footer Final)
   ========================================= */

/* 1. 容器设置：允许换行 */
.footer-flex {
    display: flex !important;
    flex-direction: row !important; 
    flex-wrap: wrap !important;     /* 必须允许换行 */
    justify-content: space-between; /* 两端对齐 */
    align-items: center;            /* 垂直居中 */
    gap: 0;                         /* 间距由内部元素控制 */
}

/* 2. 第一行：免责声明 (强制独占一行 + 居中) */
.footer-disclaimer {
    flex: 0 0 100% !important; /* 【关键】强制占据100%宽度，绝不与其他元素共存 */
    width: 100% !important;
    order: -1;                 /* 强制排在第一位 */
    text-align: center;        /* 文字居中 */
    margin-bottom: 15px;       /* 与下面一行的距离 */
    
    /* 样式微调 */
    font-size: 14px;           /* 字体大小同 bitcoin.org */
    color: #888;               /* 颜色同 bitcoin.org */
    line-height: 1.6;
}
.footer-disclaimer span {
    display: block;            /* 确保多语言各占一行 */
}

/* 3. 第二行：左中右三段式布局 */
/* 通过给这三个元素都设置 flex:1，让它们平分空间，从而实现中间的文字绝对居中 */

/* 左侧：链接 */
.footer-links {
    flex: 1;                /* 占 1/3 空间 */
    text-align: left;       /* 内部文字靠左 */
    white-space: nowrap;    /* 防止链接换行 */
}

/* 中间：版权 */
.footer-copy {
    flex: 1;                /* 占 1/3 空间 */
    text-align: center;     /* 内部文字居中 */
    white-space: nowrap;    /* 防止版权信息换行 */
    color: #888;
}

/* 右侧：邮箱 */
.footer-email {
    flex: 1;                /* 占 1/3 空间 */
    text-align: right;      /* 内部文字靠右 */
}


/* =========================================
   11. 手机端适配 (Mobile)
   ========================================= */
@media (max-width: 900px) {
    /* 屏幕变窄时，取消强制分栏，改为垂直堆叠 */
    .footer-flex {
        flex-direction: column !important;
        gap: 15px;
    }
    
    .footer-links, 
    .footer-copy, 
    .footer-email {
        flex: auto;         /* 恢复自动宽度 */
        text-align: center; /* 全部居中 */
        width: 100%;
    }
    
    .footer-copy {
        white-space: normal; /* 手机上允许换行 */
        font-size: 12px;
    }
}