/**
 * 全站基础样式 — reset、排版、通用工具类
 * 用于：所有前台页面
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--space-sm);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text);
}

img {
    max-width: 100%;
    vertical-align: middle;
}

/* Vue 未编译前隐藏 */
[v-cloak] {
    display: none !important;
}

/* 页面主容器 */
.site-main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-md);
}

/* 移动端：缩小内容区左右留白，让卡片更贴近屏幕边缘 */
@media (max-width: 768px) {
    .site-main {
        padding-left: var(--space-sm);
        padding-right: var(--space-sm);
    }
}

/* 相邻主内容区（如列表 + intro）：只保留上一块 bottom 16px，避免叠成 32px */
.site-main + .site-main {
    padding-top: 0;
}

/* 响应式显示工具 */
.hide-xs { display: none !important; }
.hide-md { display: revert !important; }

@media (min-width: 769px) {
    .hide-xs { display: revert !important; }
    .hide-md { display: none !important; }
}

/* 文字省略 */
.ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 次要小字 */
.text-muted {
    color: var(--color-text-muted);
    font-size: 12px;
}

/* 次级行文本：主价格/标题下方的辅助信息（法币价、中文名等） */
.text-sub {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* 等宽数字 */
.font-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* 焦点环 */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.tj-hidden {
    display: none;
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
