/* ═══════════════════════════════════════════════════════════════
   Coin Detail — 重写版（2026-10-15）
   与全站紫色系 (#667eea → #764ba2) 保持一致
   ═══════════════════════════════════════════════════════════════ */

/* ── 外层容器 ──────────────────────────────────────────────── */
.coin-detail-page {
    padding: 24px 0 40px;
}

.coin-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.coin-detail-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

/* ── Hero 卡（白卡 + 顶边紫色装饰条，去掉大绿渐变）─────────── */
.coin-hero-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), 0 8px 28px rgba(102, 126, 234, 0.08);
    border: 1px solid #eef0f7;
    border-top: 4px solid #667eea;
}

/* 工具栏插槽：绝对定位在右上角 */
#coin-toolbar-slot {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
}

.coin-hero-content {
    display: flex;
    gap: 22px;
    align-items: center;
}

/* Logo */
.coin-hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f3f4ff 0%, #eef0ff 100%);
    border: 1px solid #e0e3f7;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.coin-hero-logo img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

/* 标题区 */
.coin-hero-info {
    flex: 1;
    min-width: 0;
    padding-right: 140px;   /* 给工具栏 slot 留空间 */
}
.coin-hero-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    line-height: 1.2;
}
.coin-hero-symbol {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.coin-hero-url {
    font-size: 13px;
    color: #888;
    margin: 0 0 14px;
    word-break: break-all;
    line-height: 1.4;
}
.coin-hero-url a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px dashed #c5cbef;
}
.coin-hero-url a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

/* 操作按钮 */
.coin-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.coin-website-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 22px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}
.coin-website-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
    color: white;
}
.coin-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    color: #5a6270;
    border: 1px solid #e4e6ec;
    border-radius: 22px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}
.coin-share-btn:hover {
    background: #f3f4ff;
    border-color: #667eea;
    color: #667eea;
}

/* ── Stats 卡（横条 / 竖列表 自适应二合一）────────────────────── */
.coin-stats-card {
    background: #fff;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef0f7;
    overflow: hidden;
}

/* 桌面：水平 3 列 */
.coin-stats-grid {
    display: flex;
    align-items: stretch;
}
.coin-stat-row {
    flex: 1;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
}
/* 竖线分隔（除最后一项外） */
.coin-stat-row:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 50%;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, #e4e6ec 20%, #e4e6ec 80%, transparent 100%);
}

/* SVG 图标圆圈 */
.coin-stat-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.25);
}
.coin-stat-symbol .coin-stat-icon-circle   { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.coin-stat-supply .coin-stat-icon-circle    { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.coin-stat-launch .coin-stat-icon-circle    { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

/* 值 + 标签 容器 */
.coin-stat-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.coin-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.1;
    word-break: break-all;
}
.coin-stat-label {
    font-size: 12px;
    color: #98a2b3;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ── 正文卡 ──────────────────────────────────────────────────── */
.coin-content-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef0f7;
}
.coin-section-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.coin-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}
.coin-detail-content {
    line-height: 1.9;
    font-size: 15px;
    color: #333;
}
.coin-detail-description-plain {
    word-break: break-word;
    font-size: 14.5px;
    color: #3d4460;
}
.coin-detail-description-plain p {
    margin: 0 0 12px;
}
.coin-detail-description-plain h2.coin-detail-h {
    font-size: 16.5px;
    margin: 24px 0 8px;
    padding-bottom: 6px;
    border-left: 3px solid #667eea;
    padding-left: 10px;
    color: #1a1a2e;
    font-weight: 700;
}
.coin-detail-content p {
    margin-bottom: 14px;
}
.coin-detail-content ul {
    padding-left: 20px;
    margin: 14px 0;
}
.coin-detail-content li {
    margin-bottom: 6px;
    color: #555;
}

/* 目录 */
.coin-toc {
    background: #f8f9ff;
    border: 1px solid #e3e7f5;
    border-radius: 10px;
    padding: 12px 18px 10px;
    margin: 0 0 18px;
    display: inline-block;
    min-width: 200px;
    max-width: 100%;
}
.coin-toc-title {
    font-weight: 700;
    color: #667eea;
    font-size: 13px;
    margin-bottom: 6px;
}
.coin-toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 32px;
}
.coin-toc li { padding: 2px 0; }
.coin-toc a {
    color: #3d4460;
    text-decoration: none;
    font-size: 13px;
}
.coin-toc a:hover { color: #667eea; }
.coin-lead-para {
    font-size: 15px;
    color: #22263e !important;
    font-weight: 500;
    line-height: 1.9;
}

/* Tags */
.coin-tags-section { margin-top: 22px; }
.coin-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.coin-tag {
    padding: 6px 14px;
    background: #f3f4ff;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    border-radius: 16px;
    border: 1px solid #e0e3f7;
    transition: all 0.2s;
    cursor: default;
}
.coin-tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ── 侧边栏 ──────────────────────────────────────────────────── */
.coin-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.coin-detail-sidebar .sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef0f7;
}
.coin-detail-sidebar .sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 返回列表按钮 */
.coin-back-section { margin-top: 4px; }
.coin-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #f3f4ff;
    color: #667eea;
    text-decoration: none;
    border-radius: 22px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid #e0e3f7;
}
.coin-back-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* 侧边栏条目（exchange / flash / article）*/
.coin-detail-sidebar .sidebar-exchange-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.coin-detail-sidebar .sidebar-exchange-item:last-child { margin-bottom: 0; }
.coin-detail-sidebar .sidebar-exchange-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.coin-detail-sidebar .sidebar-exchange-item:hover .sidebar-exchange-name,
.coin-detail-sidebar .sidebar-exchange-item:hover .sidebar-exchange-desc,
.coin-detail-sidebar .sidebar-exchange-item:hover .sidebar-exchange-rating {
    color: white;
}
.coin-detail-sidebar .sidebar-exchange-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    padding: 4px;
    flex-shrink: 0;
}
.coin-detail-sidebar .sidebar-exchange-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 2px;
}
.coin-detail-sidebar .sidebar-exchange-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.coin-detail-sidebar .sidebar-exchange-rating {
    font-size: 13px;
    font-weight: 700;
    color: #10b981;
    flex-shrink: 0;
}
.coin-detail-sidebar .sidebar-flash-item {
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 6px;
    background: #f8f9fa;
}
.coin-detail-sidebar .sidebar-flash-item:last-child { margin-bottom: 0; }
.coin-detail-sidebar .sidebar-flash-item:hover { background: #f3f4ff; }
.coin-detail-sidebar .sidebar-flash-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.coin-detail-sidebar .sidebar-flash-badge {
    display: inline-flex;
    padding: 2px 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    flex-shrink: 0;
}
.coin-detail-sidebar .sidebar-flash-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    flex: 1;
}
.coin-detail-sidebar .sidebar-flash-content {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.coin-detail-sidebar .sidebar-article-item {
    padding: 12px;
    border-radius: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.coin-detail-sidebar .sidebar-article-item:last-child { margin-bottom: 0; }
.coin-detail-sidebar .sidebar-article-item:hover {
    background: #f3f4ff;
    border-color: #e0e3f7;
}
.coin-detail-sidebar .sidebar-article-title {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}
.coin-detail-sidebar .sidebar-article-item:hover .sidebar-article-title { color: #667eea; }
.coin-detail-sidebar .sidebar-article-summary {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.coin-detail-sidebar .sidebar-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.coin-detail-sidebar .sidebar-article-category {
    font-size: 10px;
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}
.coin-detail-sidebar .sidebar-article-views {
    font-size: 10px;
    color: #888;
}

/* ═══════════════════════════════════════════════════════════════
   响应式 — 3 个清晰断点
   ═══════════════════════════════════════════════════════════════ */

/* ── 断点 1：≤1024px ── 主栏+侧边栏 → 单列，侧边栏下方 ── */
@media (max-width: 1024px) {
    .coin-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 760px;
    }
    .coin-detail-sidebar {
        order: 2;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .coin-back-section { grid-column: 1 / -1; }
}

/* ── 断点 2：≤768px ── hero 堆叠 / stats 2 列 / 侧边栏单列 ── */
@media (max-width: 768px) {
    .coin-detail-page { padding: 16px 0 32px; }
    .coin-detail-wrapper {
        padding: 0 14px;
        gap: 18px;
    }

    /* Hero 紧凑化 */
    .coin-hero-card {
        padding: 28px 18px 20px;  /* 顶部多 8px 给 toolbar 留空间 */
        border-radius: 14px;
    }
    #coin-toolbar-slot {
        top: 10px;
        right: 10px;
    }
    .coin-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
    .coin-hero-logo {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }
    .coin-hero-info {
        padding-right: 0;
    }
    .coin-hero-title {
        font-size: 20px;
        justify-content: center;
    }
    .coin-hero-symbol {
        font-size: 12px;
        padding: 3px 10px;
    }
    .coin-hero-url { font-size: 12px; }
    .coin-hero-actions { justify-content: center; }
    .coin-website-btn, .coin-share-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Stats → 竖列表：icon 左，值(右粗)/标签(下) */
    .coin-stats-card {
        border-radius: 14px;
    }
    .coin-stats-grid {
        display: flex;
        flex-direction: column;
    }
    .coin-stat-row {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 14px 18px;
        gap: 14px;
    }
    /* 竖线分隔 → 换成横线分隔 */
    .coin-stat-row:not(:last-child)::after {
        content: '';
        position: absolute;
        left: 72px;   /* 图标宽度 + gap 起点 */
        right: 18px;
        bottom: 0;
        top: auto;
        height: 1px;
        background: #f0f0f0;
    }
    .coin-stat-icon-circle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .coin-stat-main {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        flex: 1;
        gap: 10px;
    }
    .coin-stat-value {
        font-size: 20px;
    }
    .coin-stat-label {
        font-size: 12px;
        color: #98a2b3;
    }

    /* 正文卡紧凑化 */
    .coin-content-card {
        padding: 20px 18px;
        border-radius: 14px;
    }
    .coin-section-title { font-size: 17px; margin-bottom: 16px; }
    .coin-toc ol { columns: 1; }

    /* 侧边栏 → 只保留返回列表按钮，隐藏热门交易所/快讯/文章 */
    .coin-detail-sidebar .sidebar-card {
        display: none;
    }
    .coin-detail-sidebar .coin-back-section {
        display: block;
    }
}

/* ── 断点 3：≤480px ── 进一步压缩 ── */
@media (max-width: 480px) {
    .coin-hero-title { font-size: 18px; }
    .coin-hero-logo { width: 52px; height: 52px; padding: 0; }
    .coin-stat-row { padding: 12px 14px; gap: 12px; }
    .coin-stat-icon-circle { width: 32px; height: 32px; border-radius: 9px; }
    .coin-stat-icon-circle svg { width: 15px; height: 15px; }
    .coin-stat-value { font-size: 18px; }
    .coin-stat-row:not(:last-child)::after { left: 58px; right: 14px; }
}
