/* ==========================================================================
   CoinOk Web3 媒体聚合站 - 全局核心样式库 (common.css)
   覆盖范围：全站基础布局、导航栏、首页(index)、详情页(detail)、作者页(author)、专题页(topic)
   ========================================================================== */

/* ================= 1. 全局色彩系统 (Variables) ================= */
:root {
    /* --- 基础设计令牌 --- */
    --bg-body: #FFFFFF;
    --text-main: #0D1421;
    --text-sub: #616E85;
    --border-color: #EFF2F5;
    --hover-bg: #F8FAFD;
    --btn-active: #1541fb;
    --up-color: #16C784;
    --down-color: #EA3943;
    --skeleton-bg: #F0F2F5;
    --skeleton-wave: linear-gradient(90deg, #F0F2F5 0%, #E6E8EB 50%, #F0F2F5 100%);
    --star-color: #808A9D;
    --star-active: #F6B87E;
    --line-border: #dfe5ea;
    --btn-hover: #E2E8F0;
    --text03: #d1d5dc;
    --btn-active-text: #FFFFFF;
    --toast-bg-color: #0D1421;
    --theme-light-blue-color: #e6f0ff;
    --theme-color: #3861fb;

    /* --- 核心业务组件变量 (保留首页架构体系) --- */
    --sidebar-bg: #f8f9fa;
    --home-border: #eaedf3;
    --home-text-main: #131926;
    --home-text-sub: #58667e;
    --home-hover-bg: #f0f3f7;
    --home-primary: #1541fb;
    --home-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    /* --- 基础设计令牌 (暗黑) --- */
    --bg-body: #0D1421;
    --text-main: #FFFFFF;
    --text-sub: #A1A7BB;
    --border-color: #2B3139;
    --hover-bg: #1E232F;
    --btn-active: #4c6dfb;
    --up-color: #16C784;
    --down-color: #EA3943;
    --skeleton-bg: #1B2130;
    --skeleton-wave: linear-gradient(90deg, #1B2130 0%, #283044 50%, #1B2130 100%);
    --star-color: #858CA2;
    --star-active: #F6B87E;
    --line-border: #232730;
    --btn-hover: #3B4252;
    --text03: #4a5565;
    --toast-bg-color: #FFFFFF;
    --theme-color: #6188ff;
    --klinecharts-pro-background-color: #0D1421 !important;

    /* --- 核心业务组件变量 (暗黑) --- */
    --sidebar-bg: #1a1d22;
    --home-border: #222531;
    --home-text-main: #ffffff;
    --home-text-sub: #a1a7bb;
    --home-hover-bg: #1e2336;
    --home-primary: #4c6dfb;
    --home-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ================= 2. 基础复位与排版 (Reset & Base) ================= */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0 0 46px 0;
    transition: background 0.2s, color 0.2s;
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html {
    scrollbar-width: thin;
    scrollbar-color: #c8cbd0 transparent;
}
html::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
html::-webkit-scrollbar-track {
    background: transparent;
}
html::-webkit-scrollbar-thumb {
    background: #c8cbd0;
    border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover {
    background: #a6aab1;
}
a {
    text-decoration:none;
}
[data-theme="dark"]::-webkit-scrollbar-thumb {
    background: #5a5f6b;
}
[data-theme="dark"]::-webkit-scrollbar-thumb:hover {
    background: #747985;
}

/* ================= 3. 导航栏与底部组件 (Nav & Footer) ================= */
/* 底部全局数据条 */
.global-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 46px;
    background: var(--hover-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #58667e;
    overflow: visible !important;
}
[data-theme="dark"] .global-strip {
    color: #a1a7bb;
}
.global-strip::-webkit-scrollbar {
    display: none;
}
.global-strip .value {
    color: var(--btn-active);
    margin-left: 2px;
}
[data-theme="dark"] .global-strip .value {
    color: #5b7fff;
}
.global-strip .change-box {
    background: transparent !important;
    padding: 0 !important;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.global-strip .change-box.up {
    color: var(--up-color);
}
.global-strip .change-box.down {
    color: var(--down-color);
}

/* 顶部导航 */
.nav-logo span {
    color: var(--btn-active);
}

/* 导航基础结构：具体尺寸与响应式规则统一在下方 CoinOK 导航栏区域维护 */
.nav-left {
    display: flex;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* 导航小控件 (图标、按钮、主题切换) */
.circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-main);
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}
.circle-btn:hover {
    border-color: var(--btn-active);
    background: rgba(56, 97, 251, 0.05);
    transform: translateY(-1px);
}
.pill-btn {
    height: 36px;
    padding: 0 10px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.pill-btn:hover {
    border-color: var(--btn-active);
    background: rgba(56, 97, 251, 0.05);
    transform: translateY(-1px);
}
[data-theme="dark"] .pill-btn {
    border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="dark"] .pill-btn:hover {
    border-color: var(--btn-active);
    background-color: rgba(56, 97, 251, 0.15);
}

.login-btn {
    background: var(--btn-active);
    color: var(--bg-body);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.login-btn:hover {
    background: #2a4bc8;
}

.flag-icon {
    font-size: 18px;
    line-height: 1;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 2px rgba(0,0,0,0.1);
}
.item-flag {
    width: 30px;
    height: 20px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 2px rgba(0,0,0,0.1);
}

.theme-icon-wrapper {
    position: relative;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-icon-wrapper svg {
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
:root:not([data-theme="dark"]) .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}
:root:not([data-theme="dark"]) .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
[data-theme="dark"] .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}
[data-theme="dark"] .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* 下拉菜单通用逻辑 (多语言、超级菜单、Gas等) */
.lang-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
}
.lang-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.lang-arrow {
    color: var(--text-sub);
    transition: transform 0.25s ease, color 0.2s ease;
}
.lang-dropdown-wrapper:hover .lang-arrow {
    transform: rotate(180deg);
    color: var(--btn-active);
}
.lang-dropdown-wrapper:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 130px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}
.lang-dropdown::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    font-weight: 600;
}
.lang-option:hover {
    background: var(--hover-bg);
    color: var(--btn-active);
}
.lang-option.active {
    color: var(--btn-active);
    background: rgba(56, 97, 251, 0.05);
}

.nav-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.nav-dropdown-wrapper > a {
    padding: 22px 0;
    display: block;
}
.nav-dropdown {
    position: absolute;
    top: 58px;
    left: -20px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    gap: 20px;
}
.nav-dropdown-wrapper:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.nav-dropdown::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 24px;
    background: transparent;
}
.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 36px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent var(--bg-body) transparent;
}
[data-theme="dark"] .nav-dropdown::after {
    border-bottom-color: var(--bg-body);
    filter: drop-shadow(0 -1px 1px rgba(255,255,255,0.05));
}
.mega-column {
    display: flex;
    flex-direction: column;
    min-width: 170px;
}
.mega-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 10px;
    padding: 0 12px;
    letter-spacing: 0.5px;
}
.mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}
.mega-item:hover {
    background: var(--hover-bg);
}
.mega-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mega-icon svg {
    width: 18px;
    height: 18px;
}
.mega-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}
.mega-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 8px;
}

.gas-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 0;
}
.gas-wrapper:hover .gas-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}
.gas-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    left: auto;
    transform: translateY(8px);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 16px 18px 12px 18px;
    width: 290px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 99999 !important;
}
.gas-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
}
.gas-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 28px;
    transform: none;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: var(--bg-body) transparent transparent transparent;
}
.gas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: left;
    margin-bottom: 12px;
}
.gas-col {
    padding: 0 8px;
    position: relative;
}
.gas-col:first-child {
    padding-left: 0;
}
.gas-col:last-child {
    padding-right: 0;
}
.gas-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--border-color);
}
.gas-label {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 6px;
    font-weight: 500;
}
.gas-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}
.gas-time {
    font-size: 11px;
    color: var(--text-sub);
    margin-top: 4px;
    font-weight: 500;
}
.gas-footer {
    background: var(--hover-bg);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--text-sub);
    font-weight: 600;
    text-align: left;
}

/* ================= 4. 业务通用组件 (Cards, Tickers, News) ================= */
.home-card-box {
    background: var(--sidebar-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

/* 跑马灯 */
.home-ticker {
    width: 100%;
    height: 36px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}
.ht-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.ht-label {
    display: flex;
    position: relative;
    font-size: 10px;
    line-height: 1;
    color: #9EA9B7;
    z-index: 2;
    align-items: center;
    flex: 0 0 auto;
    height: 100%;
    padding: 0 10px 0 25px;
    background: var(--bg-body);
    white-space: nowrap;
    box-sizing: border-box;
}
.ht-label svg {
    margin-left: 5px;
}
.ht-track {
    display: flex;
    align-items: center;
    width: max-content;
    flex-shrink: 0;
}
.ht-item {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-right: 1px solid var(--border-color);
    text-decoration: none;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ht-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 2px;
}
.ht-name {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-main);
}
.ht-symbol {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-sub);
    margin-right: 4px;
}
.ht-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}
/* ================= 跑马灯数字防抖与颜色过渡 ================= */
    .ht-price, .ht-change {
        font-variant-numeric: tabular-nums;
        font-family: 'Inter', -apple-system, sans-serif;
        transition: color 0.3s ease;
    }
.ht-price.up {
    color: #16c784 !important;
}
.ht-price.down {
    color: #ea3943 !important;
}
.ht-change {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
}
.ht-change.up {
    color: var(--up-color);
}
.ht-change.down {
    color: var(--down-color);
}
.ht-triangle {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}
.ht-triangle.up {
    border-bottom: 6px solid var(--up-color);
}
.ht-triangle.down {
    border-top: 6px solid var(--down-color);
}
.flash-up {
    animation: priceFlashUp 1s ease-out;
}
.flash-down {
    animation: priceFlashDown 1s ease-out;
}
@keyframes priceFlashUp {
    0% {
        background-color: rgba(22, 199, 132, 0.2);
    }
    100% {
        background-color: transparent;
    }
}
@keyframes priceFlashDown {
    0% {
        background-color: rgba(234, 57, 67, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* 本周精选 & 侧边栏卡片头 */

.hot-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top:12px;
}
.hot-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s;
}
.hot-item:hover {
    transform: translateX(4px);
}
.hot-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}
.hot-title-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hot-date {
    font-size: 12px;
    color: var(--text-sub);
}
.hot-img {
    width: 90px;
    height: 63px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 热门标签 */
.hot-tags-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top:12px;
}
.hot-tag {
    padding: 6px 14px;
    background: var(--line-border);
    color: var(--text-sub);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
}
.hot-tag:hover {
    background: var(--btn-active);
    color: #fff;
}

/* 7x24h 快讯流 (首页、详情页共用) */
.flash-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px dashed var(--line-border);
    line-height: 16px;
}
.flash-header::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--home-primary);
    border-radius: 2px;
    margin-right: 10px;
}
.flash-more {
    margin-left: auto;
    font-size: 13px;
    color: var(--home-text-sub);
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s;
}
.flash-more:hover {
    color: var(--home-primary);
}
.flash-timeline {
    border-left: 2px solid var(--home-border);
    margin-left: 8px;
    padding-left: 24px;
    margin-top: 12px;
}
.flash-item {
    position: relative;
    margin-bottom: 24px;
}
.flash-item:last-child {
    margin-bottom: 0;
}
.flash-item::before {
    content: '';
    position: absolute;
    width: 11px;
    height: 11px;
    left: -25px;
    transform: translateX(-50%);
    top: 1px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAYRJREFUSEu1lT1LA0EQhp/JByZGSCmKjVEsbVIoWIiVvahg0ljZCGLtD7AWxcbKRpuIf8FK0MImpfjRCVcGjIkkdyN78ZK75BI85BauuZl5dnbenVlh2NrTNHUmUfebwCbjuiZpInwiWOSwuJBWGEIGfm5pEpglQQElNXRjYxDaOLwB71TE9vsGwbua4YsikB8JHDTWGOeJS2l6ph7YQJus4DAWEdpxT/BNhnsP3gGb4wvLIZlmSbCBsgRM/274gfCIwy3Q6EuihvJgyuKB5xEWAk7CIsKhK164OhbKCUo1YFaeqciLYNSvsRYQykDh2JVn9FLgKAA3gua5E8o6Q8sFecsc/3xopv0bmWvnsB8oS5qqUNIibd9xE5RRSpEEFK5xuOrGpLCEHV3FJtf9KZwBhUhgeEU56MYkqQvbuu72U+8C3gDZiOAGyqYvxo4RPFiKU2AuYsYhpYhNvNiuW2wN0pkVMbT034aQGVBT0YeQiYhlbHp3K5ZB78FjeZr8XfHPx/QHsOm5VZH88cgAAAAASUVORK5CYII=');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--sidebar-bg);
    border-radius: 50%;
}
.flash-time {
    font-size: 12px;
    color: #7b88a0;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1;
    font-family: Source Han Sans SC;
}
.flash-title {
    font-size: 14px;
    color: var(--text-main);
    line-height: 20px;
    transition: color 0.2s;
    font-weight:400;
    text-decoration:none;
}
.flash-title:hover {
    color: var(--btn-active);
}
/* 快讯精选标题高亮颜色 */
.title-highlight {
    color: #e44d66;
}

/* 底部标签容器布局 */
.flash-tags {
    display: flex;
    gap: 24px;
    font-size: 12px;
    font-weight: 400;
    margin-top: 8px;
}

/* 标签默认颜色（灰色） */
.ft-tag {
    color: #a0a0a9;
    transition: color 0.3s ease;
}

/* 利好高亮颜色（绿色） */
.ft-tag.bull-active {
    color: #17a888;
}

/* 利空高亮颜色（红色） */
.ft-tag.bear-active {
    color: #e44d66;
}

/* 通用图文文章流 (.article- 和 .ai- 前缀兼容) */
.article-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.2s;
}
.article-item:first-child {
    padding-top: 0;
}
.article-item:last-child {
    border-bottom: none;
    padding-bottom: 8px;
}
.article-item:hover {
    transform: translateX(6px);
}

.article-content, .ai-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
}
.article-title, .ai-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.article-item:hover .article-title, .article-item:hover .ai-title {
    color: var(--btn-active);
}
.article-desc, .ai-desc {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta, .ai-meta {
    font-size: 13px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
}
.ai-date {
    display: flex;
    align-items: center;
    gap: 6px;
}
.meta-author, .ai-author {
    color: var(--btn-active);
    font-weight: 600;
}

.ai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    display: inline-block;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 8px;
}
.tag.primary {
    background: var(--btn-active);
    color: #fff;
    border: none;
}
.tag.purple {
    background: #8A3FFC;
    color: #fff;
    border: none;
}
.tag.green {
    background: var(--up-color);
    color: #fff;
    border: none;
}

.ai-tag {
    font-size: 12px;
    color: var(--text-sub);
    background: var(--hover-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
}
.ai-tag:hover {
    background: var(--btn-active);
    color: #fff;
}

.article-img, .ai-img-wrap {
    display: block;
    flex-shrink: 0;
    width: 210px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.article-img img, .ai-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-item:hover .article-img img, .article-item:hover .ai-img-wrap img {
    transform: scale(1.05);
}

/* 返回顶部组件 */
#backToTop {
    position: fixed;
    bottom: 60px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: #0D1421;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 999;
    pointer-events: none;
    border: none;
}
[data-theme="dark"] #backToTop {
    background: #FFFFFF;
    color: #000000;
}
#backToTop.show {
    opacity: 0.85;
    transform: translateY(0);
    pointer-events: auto;
    cursor: pointer;
}
/* 仅在支持真实鼠标悬停的设备上启用 hover 效果。
   手机端可能保留 :hover 状态，覆盖按钮隐藏时的 opacity/transform。 */
@media (hover: hover) and (pointer: fine) {
    #backToTop:hover {
        transform: translateY(-5px);
        opacity: 0.7;
    }
}

/* 防止移动端残留的伪悬停状态覆盖隐藏效果 */
#backToTop:not(.show) {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.ios-toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    padding: 12px 24px;
    background: var(--toast-bg-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    color: var(--bg-body);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ios-toast.show {
    top: 40px;
    opacity: 1;
}
/* 图标颜色区分 */
.ios-toast-icon.success { color: #07C160;
} /* 微信绿 */
.ios-toast-icon.error { color: #FF3B30;
}   /* 苹果红 */

/* ================= 5. 右列：行情微件 & 数据榜单 ================= */
.col-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
        position: sticky;
        top: 105px;
    }
.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.widget-title-link {
    font-size: 13px;
    color: var(--home-text-sub);
    font-weight: 400;
}

/* ================= 6. 导航栏胶囊搜索框 ================= */
/* 点击聚焦时搜索框优雅变长 */

/* ================= 暗黑模式适配 ================= */

/* ================= 7. AI 播客卡片专属样式 ================= */
.podcast-card {
    padding: 20px;
}

.podcast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.podcast-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.podcast-date {
    font-size: 12px;
    color: var(--text-sub, #848e9c);
    background: rgba(132, 142, 156, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
}

.podcast-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(132, 142, 156, 0.05);
    padding: 16px;
    border-radius: 12px;
    transition: background 0.3s;
}
.podcast-controls:hover {
    background: rgba(132, 142, 156, 0.08);
}

/* 播放按钮采用你偏好的亮蓝色 (可换成 var(--btn-active)) */
.podcast-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0080ff;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.3);
    outline: none;
}
.podcast-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 128, 255, 0.4);
}
.podcast-play-btn:active {
    transform: scale(0.95);
}
.podcast-play-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.podcast-track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}
.podcast-track-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podcast-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.podcast-time {
    font-size: 12px;
    color: var(--text-sub, #848e9c);
    font-family: 'Inter', monospace;
    min-width: 38px;
}

.podcast-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(132, 142, 156, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.podcast-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #0080ff;
    border-radius: 3px;
    pointer-events: none;
}
/* 小圆点滑块 */
.podcast-progress-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ================= 8. 全局响应式降级 & 移动端极简信息流 (适配参考图) ================= */
@media (max-width: 1200px) {
.global-strip {
    display: none !important;
}
}

/* =========================================================
   移动端极简信息流 (严格对照参考图)
   放置于 CSS 文件最底部以确保优先级
========================================================= */

@media (max-width: 768px) {
    /* 1. 暴力清理：隐藏跑马灯、侧边栏、分类Tab、其他无用卡片 */
    .home-ticker, .col-left, .col-right, .feed-tabs, .hero-hot-list {
        display: none !important;
    }

    /* 2. 核心布局重置 */
.home-container {
    padding: 12px 16px 0 !important;
}
.home-layout {
    display: block !important;
}
.col-mid {
    gap: 0 !important;
    display: block !important;
}
.home-card-box {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

    /* 3. Hero 幻灯片 */
.hero-section {
    display: block !important;
    margin-bottom: 20px;
}
.hero-slider {
    height: 200px !important;
    border-radius: 8px;
    width: 100%;
}
.hero-slider-overlay {
    padding: 40px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}
    /* 精致版幻灯片标题 */
    .hero-slider-title {
        font-size: 15px !important;
        /* 强制缩小到 15px */
        font-weight: 500 !important;
        /* 取消过于沉重的粗体，改为中等字重 */
        line-height: 1.4 !important;
        /* 舒适的行高 */
        margin: 0 !important;
        /* 消除多余外边距 */
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        /* 最多显示两行，防止文字太多挡住图片 */
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
        /* 增加一点文字阴影，防止在浅色图片上看不清 */
    }
.slider-btn {
    display: none !important;
}

    /* 4. 信息流列表（完美适配左文右图） */
    .article-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        gap: 16px !important;
        padding: 16px 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        transform: none !important;
        /* 取消悬浮动画 */
    }
.article-item:last-child {
    border-bottom: none !important;
}

    .article-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-width: 0 !important;
    }

    .article-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.5 !important;
        margin-bottom: 8px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* 利用 :has 伪类：如果有图，隐藏摘要；如果是纯文本，保留摘要 */
.article-item:has(.article-img) .article-desc {
    display: none !important;
}
    .article-desc {
        font-size: 14px !important;
        color: var(--text-sub) !important;
        margin-bottom: 8px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

.article-meta {
    margin-top: auto !important;
    font-size: 12px !important;
    gap: 12px !important;
}
.meta-author {
    font-weight: 400 !important;
    color: var(--text-sub) !important;
}

    /* 缩略图固定尺寸 */
    .article-img {
        width: 115px !important;
        height: 75px !important;
        flex-shrink: 0 !important;
        border-radius: 6px !important;
        border: none !important;
    }
.article-img img {
    border-radius: 6px !important;
}
#backToTop {
        width: 40px;
        height: 40px;

        /* 靠近屏幕右侧 */
        right: 14px;

        /* 避开底部固定栏，并预留安全距离 */
        bottom: calc(46px + 14px + env(safe-area-inset-bottom, 0px));

        /* 适当减弱阴影 */
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);

        /* 确保显示在页面内容上方 */
        z-index: 999;
    }

    /* 点击时提供触摸反馈 */
    #backToTop:active {
        transform: scale(0.92);
    }
}

/* 恢复导航栏基础 Flex 布局（原始基础规则在清理重复代码时被误删） */
.top-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

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

.nav-right {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-search-form {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

/* =========================================================
   CoinOK 导航栏视觉升级
   放在 common.css 最底部
========================================================= */

/* 1. 顶部导航整体 */
.top-nav {
    width: 100%;
    height: 55px;
    margin: 0 auto;
    padding: 0 25px;
    gap: 28px;
    background: var(--bg-body);
    position: relative;
    z-index: 1001;
    transition: background .2s, border-color .2s;
}

.top-nav::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    transform: translateX(-50%);
    border-bottom: 1px solid var(--border-color);
    pointer-events: none;
}

/* 2. 左侧品牌与菜单 */
.nav-left {
    min-width: 0;
    flex: 1;
    gap: clamp(22px, 2.2vw, 40px);
}

.nav-logo {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.nav-logo img {
    display: block;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* 3. 导航菜单 */
.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(16px, 1.5vw, 26px);
    min-width: 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.nav-dropdown-wrapper {
    height: 55px;
    flex-shrink: 0;
    position: relative;
}

.nav-dropdown-wrapper > a {
    height: 100%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    position: relative;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .2s ease;
}

/* 菜单底部轻量指示线 */
.nav-dropdown-wrapper > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--btn-active);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.nav-dropdown-wrapper > a:hover,
.nav-dropdown-wrapper > a.active {
    color: var(--btn-active);
}

.nav-dropdown-wrapper > a:hover::after,
.nav-dropdown-wrapper > a.active::after {
    transform: scaleX(1);
}

/* 4. 下拉菜单更精致 */
.nav-dropdown {
    top: 60px;
    left: -18px;
    padding: 14px;
    border-radius: 14px;
    border-color: var(--border-color);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .10);
}

[data-theme="dark"] .nav-dropdown {
    box-shadow: 0 12px 36px rgba(0, 0, 0, .35);
}

.mega-item {
    border-radius: 10px;
    transition: background .2s ease, transform .2s ease;
}

.mega-item:hover {
    background: var(--hover-bg);
    transform: translateX(2px);
}

/* 5. 右侧操作区 */
.nav-right {
    flex-shrink: 0;
    gap: 12px;
}

.nav-search-form {
    margin-right: 0;
}

.nav-search-box {
    display: flex;
    align-items: center;
    width: 190px;
    height: 38px;
    padding: 0 13px;
    gap: 0;
    background: var(--hover-bg);
    border: 1px solid transparent;
    border-radius: 22px;
    box-sizing: border-box;
    transition: width .25s ease, border-color .2s ease,
                background .2s ease, box-shadow .2s ease;
}

.nav-search-box:focus-within {
    width: 230px;
    background: var(--bg-body);
    border-color: var(--btn-active);
    box-shadow: 0 0 0 3px rgba(21, 65, 251, .08);
}

.nav-search-box svg {
    flex-shrink: 0;
    margin-right: 9px;
    color: var(--text-sub);
}

.nav-search-box input {
    border: 0;
    background: transparent;
    outline: 0;
    width: 100%;
    min-width: 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-main);
}

.nav-search-box input:focus {
    width: 100%;
}

.nav-search-box input::placeholder {
    color: var(--text-sub);
    opacity: .8;
}

/* 6. 主题切换按钮 */
.circle-btn {
    width: 38px;
    height: 38px;
    border-color: var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    transition: background .2s, border-color .2s,
                color .2s, transform .2s;
}

.circle-btn:hover {
    background: var(--hover-bg);
    border-color: var(--btn-active);
    color: var(--btn-active);
    transform: translateY(-1px);
}

/* 7. 暗黑模式搜索框 */
[data-theme="dark"] .nav-search-box {
    background: #171e2b;
    border-color: transparent;
}

[data-theme="dark"] .nav-search-box:focus-within {
    background: var(--bg-body);
    border-color: var(--btn-active);
    box-shadow: 0 0 0 3px rgba(97, 136, 255, .12);
}

/* 8. 中等桌面屏幕：压缩间距 */
@media (min-width: 993px) and (max-width: 1350px) {
    .top-nav {
        padding: 0 20px;
        gap: 16px;
    }

    .nav-left {
        gap: 20px;
    }

    .nav-links {
        gap: 14px;
        font-size: 13px;
    }

    .nav-dropdown-wrapper > a {
        font-size: 13px;
    }

    .nav-search-box {
        width: 155px;
    }

    .nav-search-box:focus-within {
        width: 185px;
    }

    .nav-right {
        gap: 8px;
    }
}

/* 9. 移动端：保留原来的两行导航结构 */
@media (max-width: 992px) {
    .top-nav {
        width: 100%;
        min-height: 0;
        height: auto !important;
        padding: 12px 16px 0;
        gap: 0;
        overflow: visible;
    }

    .nav-left {
        display: block;
        width: 100%;
        flex: none;
    }

    .nav-logo {
        display: flex;
        width: fit-content;
        margin: 0 0 12px;
    }

    .nav-logo img {
        height: 30px;
        max-width: 140px;
    }

    .nav-links {
        width: 100%;
        gap: 24px;
        padding: 0 0 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none !important;
    }

    .nav-dropdown-wrapper {
        height: auto;
    }

    .nav-dropdown-wrapper > a {
        height: auto;
        padding: 0;
        font-size: 14px;
        font-weight: 500;
    }

    .nav-dropdown-wrapper > a::after {
        bottom: -11px;
        height: 2px;
    }

    /* 不再默认把第一个菜单强行标记为选中 */
    .nav-dropdown-wrapper:first-child > a {
        color: var(--text-sub);
        font-weight: 500;
    }

    .nav-dropdown-wrapper:first-child > a.active {
        color: var(--btn-active);
        font-weight: 700;
    }

    .nav-right {
        position: absolute;
        top: 10px;
        right: 16px;
        gap: 8px;
    }

    .nav-right .nav-search-form,
    .nav-right .login-btn {
        display: none !important;
    }

    .circle-btn {
        width: 34px;
        height: 34px;
    }

    .nav-dropdown {
        display: none !important;
    }
}

/* 10. 极窄屏幕 */
@media (max-width: 380px) {
    .nav-links {
        gap: 19px;
    }

    .nav-dropdown-wrapper > a {
        font-size: 13px;
    }

    .nav-logo img {
        height: 27px;
    }
    #backToTop {
        width: 36px;
        height: 36px;
        right: 10px;
        bottom: calc(46px + 12px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-dropdown-wrapper > a,
    .nav-dropdown-wrapper > a::after,
    .nav-search-box,
    .circle-btn {
        transition: none !important;
    }
}

/* =========================================================
   CoinOK 顶部悬浮导航栏
   桌面端、平板端、手机端统一生效
========================================================= */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1001;

    /* 半透明悬浮背景 */
    background: rgba(255, 255, 255, 0.92);

    /* 背景模糊 */
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    
}

/* 暗黑模式 */
[data-theme="dark"] .top-nav {
    background: rgba(13, 20, 33, 0.92);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

/* 保留导航栏底部分隔线 */
.top-nav::after {
    z-index: 1;
    pointer-events: none;
}

/* 手机端：两行导航整体吸顶 */
@media (max-width: 992px) {
    .top-nav {
        position: sticky;
        top: 0;
        z-index: 1001;
    }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
    .top-nav {
        transition: none;
    }
}
/* =========================================================
   合作伙伴行情栏：固定标签 + 独立滚动区域
========================================================= */

.home-ticker .ht-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}



.home-ticker .ht-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


/* =========================================================
   首页行情栏悬浮：始终贴在顶部导航下方
========================================================= */

.home-ticker {
    position: sticky;
    top: 55px;
    z-index: 1000;
    width: 100%;
    height: 30px;
    margin-bottom: 16px;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

/* 暗黑模式 */
[data-theme="dark"] .home-ticker {
    background: rgba(13, 20, 33, 0.92);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}



/* 手机端导航是两行结构，高度会随内容变化 */
@media (max-width: 992px) {
    .home-ticker {
        top: 0;
        z-index: 1000;
    }
}