/* ==========================================
   NEWS.INTEL — 暗色情報儀表板主題
   ========================================== */

/* -- CSS Variables -- */
:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a12;
    --bg-card: #10101e;
    --bg-card-hover: #1a1a2e;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --accent-cyan: #00d4ff;
    --accent-blue: #4f6cff;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15);
    --glow-blue: 0 0 20px rgba(79, 108, 255, 0.15);
}

/* -- Glassmorphism -- */
.glass-card {
    background: linear-gradient(135deg, rgba(16, 16, 30, 0.8), rgba(26, 26, 46, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-glass {
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* -- Navigation Pills -- */
.nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-decoration: none;
}

.nav-pill:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-pill-active {
    color: var(--accent-cyan) !important;
    background: rgba(0, 212, 255, 0.08) !important;
    border-color: rgba(0, 212, 255, 0.2) !important;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.08);
}

.nav-pill-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
}

/* -- Fact Check Badges -- */
.badge-verified {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-multi-source {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-unverified {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* -- Article Card -- */
.article-card {
    background: linear-gradient(135deg, rgba(16, 16, 30, 0.7), rgba(26, 26, 46, 0.5));
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-blue), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.article-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), var(--glow-cyan);
}

.article-card:hover::before {
    opacity: 1;
}

/* -- Sentiment Bar -- */
.sentiment-bar {
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-amber), var(--accent-green));
    position: relative;
    overflow: hidden;
}

.sentiment-indicator {
    position: absolute;
    top: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: left 0.5s ease;
}

/* -- Credibility Ring -- */
.credibility-ring {
    width: 80px;
    height: 80px;
    position: relative;
}

.credibility-ring svg {
    transform: rotate(-90deg);
}

.credibility-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 6;
}

.credibility-ring .ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.credibility-ring .ring-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* -- Tag Chip -- */
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: rgba(79, 108, 255, 0.08);
    color: #93a7ff;
    border: 1px solid rgba(79, 108, 255, 0.15);
    transition: all 0.2s ease;
}

.tag-chip:hover {
    background: rgba(79, 108, 255, 0.15);
    border-color: rgba(79, 108, 255, 0.3);
}

/* -- Impact Matrix -- */
.impact-card {
    background: rgba(16, 16, 30, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.impact-card:hover {
    border-color: var(--border-hover);
    background: rgba(26, 26, 46, 0.6);
}

.impact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* -- Ripple Chain -- */
.ripple-chain {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}

.ripple-chain::-webkit-scrollbar {
    display: none;
}

.ripple-node {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #67e8f9;
    white-space: nowrap;
    flex-shrink: 0;
}

.ripple-arrow {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: rgba(0, 212, 255, 0.4);
    font-size: 1.25rem;
    flex-shrink: 0;
    animation: ripple-flow 2s ease-in-out infinite;
}

@keyframes ripple-flow {
    0%, 100% { opacity: 0.4; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
}

/* -- Four-Tier Section -- */
.insight-section {
    border-left: 3px solid;
    padding-left: 24px;
    margin-bottom: 40px;
}

.insight-section.core-fact { border-color: var(--accent-cyan); }
.insight-section.core-conflict { border-color: #f43f5e; }
.insight-section.impact-matrix { border-color: var(--accent-blue); }
.insight-section.future-outlook { border-color: var(--accent-purple, #8b5cf6); }

.insight-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* 情報內容長文排版優化：大幅提升行距與字距呼吸感 */
.insight-content-box {
    line-height: 1.95;
    letter-spacing: 0.025em;
    font-size: 1.03125rem;
    color: #e2e8f0;
}

.insight-content-box p {
    margin-bottom: 1.5rem;
    line-height: 1.95;
}

.insight-content-box p:last-child {
    margin-bottom: 0;
}

/* 受眾衝擊矩陣緊湊卡片 */
.impact-card {
    background: rgba(16, 16, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 18px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.impact-card:hover {
    border-color: rgba(0, 212, 255, 0.25);
    background: rgba(20, 20, 38, 0.8);
    transform: translateY(-2px);
}

.impact-card p {
    line-height: 1.75;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.impact-card p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   冷調奢華·極光微光畫重點 (Luxury Aurora Cyber Highlighting - 0% 黃底)
   ========================================== */

/* 1. 科技透青·極光微光 (主事實 / 主軸焦點) */
.marker-cyan, .intel-highlight, mark {
    background: linear-gradient(120deg, rgba(0, 229, 255, 0.14) 0%, rgba(79, 108, 255, 0.18) 100%);
    border-bottom: 2px solid rgba(0, 229, 255, 0.85);
    border-radius: 4px;
    padding: 1px 6px 2px 6px;
    margin: 0 1.5px;
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
    display: inline;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.marker-cyan:hover, .intel-highlight:hover, mark:hover {
    background: linear-gradient(120deg, rgba(0, 229, 255, 0.25) 0%, rgba(79, 108, 255, 0.3) 100%);
    border-bottom-color: #00e5ff;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.3);
}

/* 2. 電光紫羅蘭 / 緋紅 (取代黃底 — 用於衝突、矛盾、博弈) */
.marker-amber, .marker-purple, .intel-highlight-amber {
    background: linear-gradient(120deg, rgba(236, 72, 153, 0.15) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-bottom: 2px solid rgba(236, 72, 153, 0.85);
    border-radius: 4px;
    padding: 1px 6px 2px 6px;
    margin: 0 1.5px;
    color: #fdf2f8 !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-shadow: 0 0 12px rgba(236, 72, 153, 0.35);
    display: inline;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.marker-amber:hover, .marker-purple:hover, .intel-highlight-amber:hover {
    background: linear-gradient(120deg, rgba(236, 72, 153, 0.28) 0%, rgba(168, 85, 247, 0.35) 100%);
    border-bottom-color: #f43f5e;
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.35);
}

/* 3. 翡翠薄荷綠 (用於戰略行動、機遇) */
.marker-green, .intel-highlight-green {
    background: linear-gradient(120deg, rgba(16, 185, 129, 0.14) 0%, rgba(6, 182, 212, 0.18) 100%);
    border-bottom: 2px solid rgba(16, 185, 129, 0.85);
    border-radius: 4px;
    padding: 1px 6px 2px 6px;
    margin: 0 1.5px;
    color: #f0fdf4 !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
    display: inline;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.marker-green:hover, .intel-highlight-green:hover {
    background: linear-gradient(120deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 182, 212, 0.3) 100%);
    border-bottom-color: #10b981;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}

/* 極簡受眾微膠囊卡片 */
.impact-micro-card {
    background: linear-gradient(135deg, rgba(18, 18, 35, 0.7) 0%, rgba(12, 12, 24, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.25s ease;
}

.impact-micro-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: linear-gradient(135deg, rgba(22, 22, 42, 0.85) 0%, rgba(15, 15, 30, 0.95) 100%);
    transform: translateY(-1px);
}

/* 5. 焦點情報引言卡片 (Pull Quote Callout) */
.intel-callout {
    position: relative;
    background: linear-gradient(135deg, rgba(16, 16, 30, 0.75) 0%, rgba(26, 26, 46, 0.55) 100%);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 14px 14px 0;
    padding: 18px 22px 18px 26px;
    margin: 24px 0;
    color: #f8fafc;
    font-size: 0.95rem;
    line-height: 1.85;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
    margin: 20px 0;
    color: #f1f5f9;
    font-size: 0.9375rem;
    line-height: 1.7;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.intel-callout::before {
    content: '“';
    position: absolute;
    top: -6px;
    left: 8px;
    font-size: 2.25rem;
    font-family: Georgia, serif;
    color: rgba(0, 212, 255, 0.25);
    line-height: 1;
    pointer-events: none;
}

/* 5. 數據指標發光微徽章 */
.intel-metric {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #67e8f9;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.875em;
    display: inline-block;
}

/* -- Share Modal -- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(135deg, #10101e, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* -- Causal Graph Canvas -- */
.causal-graph-container {
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.causal-graph-container canvas {
    width: 100%;
    cursor: grab;
}

.causal-graph-container canvas:active {
    cursor: grabbing;
}

/* -- Skeleton Loading -- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* -- Hero Gradient Mesh -- */
.hero-mesh {
    position: relative;
    overflow: hidden;
}

.hero-mesh::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-mesh::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 50%;
    height: 180%;
    background: radial-gradient(ellipse, rgba(79, 108, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* -- Scrollbar -- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* -- Animations -- */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* -- Responsive -- */
@media (max-width: 640px) {
    .glass-card, .article-card {
        border-radius: 12px;
    }

    .insight-section {
        padding-left: 14px;
    }

    .modal-content {
        padding: 20px;
        border-radius: 16px;
    }
}

/* -- Copy Button Animation -- */
.copy-btn {
    position: relative;
    overflow: hidden;
}

.copy-btn::after {
    content: '已複製！';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    border-radius: inherit;
}

.copy-btn.copied::after {
    opacity: 1;
    transform: translateY(0);
}

/* -- Canvas Share Card Style -- */
.share-card-preview {
    background: linear-gradient(135deg, #0a0a12, #10101e);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
}
