/* ========================================
   成人成事財經簡報 - 组件样式
   ======================================== */

/* ---- Crypto Cards ---- */
.coin-card {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.1s;
}

.coin-card:active {
    transform: scale(0.98);
    opacity: 0.7;
}

.coin-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.coin-sym {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-left: 3px;
    text-transform: uppercase;
}

.coin-price {
    font-size: 19px;
    font-weight: 500;
    color: var(--text-primary);
}

.coin-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Index Cards ---- */
.index-card {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.index-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.index-val {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ---- Stock Rows ---- */
.stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.stock-row:last-child {
    border-bottom: none;
}

.stock-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.stock-code {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.stock-right {
    text-align: right;
}

.stock-price {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ---- Metal Cards ---- */
.metal-card {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metal-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.metal-sym {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-left: 3px;
}

.metal-price {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
}

.metal-unit {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.metal-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Rate Cards ---- */
.rate-card {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.rate-val {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ---- Macro Rows ---- */
.macro-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.macro-row:last-child {
    border-bottom: none;
}

.macro-left {
    flex: 1;
}

.macro-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.macro-date {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.macro-right {
    text-align: right;
    min-width: 90px;
}

.macro-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.macro-prev {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.macro-trend {
    font-size: 11px;
}

.macro-trend.up { color: var(--accent-green); }
.macro-trend.down { color: var(--accent-red); }
.macro-trend.neutral { color: var(--text-tertiary); }

/* ---- FX Rows ---- */
.fx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.fx-row:last-child {
    border-bottom: none;
}

.fx-pair {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.fx-desc {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

/* ---- News Cards ---- */
.news-card {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    transition: transform 0.1s;
}

.news-card:active {
    transform: scale(0.98);
    opacity: 0.7;
}

.news-source {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-block;
}

.news-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.45;
}

.news-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-time {
    font-size: 10px;
    color: var(--text-tertiary);
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* ---- Filter Buttons ---- */
.news-filter-btn {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 0.5px solid rgba(0, 0, 0, 0.18);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.news-filter-btn.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.news-filter-btn:active {
    transform: scale(0.95);
}

/* ---- Mover Rows ---- */
.mover-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.mover-row:last-child {
    border-bottom: none;
}

.mover-symbol {
    font-weight: 500;
}

/* ---- Error Messages ---- */
.err-msg {
    font-size: 12px;
    color: var(--accent-red);
    padding: 6px 0;
    line-height: 1.5;
}

.err-detail {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* ---- Coming Soon ---- */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 12px;
    opacity: 0.5;
}

.coming-soon-icon {
    font-size: 48px;
}

.coming-soon-title {
    font-size: 16px;
    font-weight: 500;
}

.coming-soon-sub {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

/* ---- Progress Bar (Crypto Dominance) ---- */
.progress-bar {
    height: 5px;
    border-radius: 3px;
    background: var(--skeleton-bg);
    overflow: hidden;
}

.progress-segment {
    height: 100%;
    float: left;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 360px) {
    .coins-grid,
    .indices-grid,
    .metals-grid,
    .rates-grid {
        grid-template-columns: 1fr;
    }
    
    .movers-section {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
