/* ============================================================
   全局基础样式：重置 / 主题变量 / 通用工具
   ============================================================ */

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    margin: 0;
    min-height: 100vh;
    font-size: 1rem; /* 跟随根字号缩放（配合"我的"页字体大小设置） */
}

/* 页面容器主题色（替代 Tailwind bg-gray-50/dark:bg-gray-900 等） */
.hq-page {
    background-color: #f9fafb;
    color: #111827;
}
.dark .hq-page {
    background-color: #111827;
    color: #f3f4f6;
}

/* 主题过渡 */
.hq-theme-transition,
.hq-theme-transition * {
    transition: background-color .3s, color .3s, border-color .3s;
}

/* 涨跌色（国内习惯：红涨绿跌） */
.hq-up { color: #ef4444; }
.hq-down { color: #16a34a; }
.dark .hq-up { color: #f87171; }
.dark .hq-down { color: #4ade80; }

/* 数值变化闪烁提示（柔和，避免整列同时强闪造成视觉疲劳） */
@keyframes hq-flash {
    0% { opacity: .55; }
    100% { opacity: 1; }
}
.hq-flash { animation: hq-flash .4s ease-out; }

/* 骨架屏 */
@keyframes hq-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.hq-skeleton {
    border-radius: .5rem;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: hq-shimmer 1.4s infinite;
}
.dark .hq-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* 内容渐入 */
@keyframes hq-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.hq-fade-in { animation: hq-fade-in .3s ease-out; }

/* 安全区适配 */
.hq-safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }
.hq-safe-top { padding-top: env(safe-area-inset-top, 0); }

/* 触控命中区不小于 44px */
.hq-tap { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
