/* ========================================
   REVEAL - Turkish Political Network
   Clean, modern dark theme
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a26;
    --bg-elevated: #22222e;
    --bg-glass: rgba(18, 18, 26, 0.85);

    --text-primary: #e8e8ef;
    --text-secondary: #8888a0;
    --text-muted: #55556a;

    --accent-1: #ff4d6a;    /* Politician - rose */
    --accent-2: #4d9fff;    /* Government official - blue */
    --accent-3: #ffb84d;    /* Business - amber */
    --accent-4: #4dffa6;    /* Judiciary - green */
    --accent-5: #b84dff;    /* Military - purple */
    --accent-6: #ff4ddb;    /* Media - pink */
    --accent-7: #4df5ff;    /* International - cyan */
    --accent-8: #ff8c4d;    /* Family - orange */
    --accent-9: #8cff4d;    /* Opposition - lime */
    --accent-10: #ffd84d;   /* Religious/Gülen - gold */

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 999px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(77, 159, 255, 0.15);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --grid-line: rgba(255,255,255,0.015);
    --footer-bg: rgba(13, 13, 20, 0.85);
    --modal-backdrop: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] {
    --bg-primary: #f5f5f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ee;
    --bg-elevated: #dddde5;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;

    --accent-1: #d6304a;
    --accent-2: #2b7de9;
    --accent-3: #c88a1a;
    --accent-4: #1a9960;
    --accent-5: #8a2be2;
    --accent-6: #c42aaf;
    --accent-7: #0aa5b0;
    --accent-8: #d06020;
    --accent-9: #4a9e1a;
    --accent-10: #b8950a;

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
    --shadow-glow: 0 0 30px rgba(43, 125, 233, 0.1);

    --grid-line: rgba(0,0,0,0.04);
    --footer-bg: rgba(255, 255, 255, 0.9);
    --modal-backdrop: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ========================================
   Header
   ======================================== */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #666680, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.logo-aicp {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    opacity: 0.6;
}

.logo-subtitle {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Tab Switcher */
.tab-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 2px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-weight: 600;
}

.header-center {
    display: flex;
    align-items: center;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 3px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    align-items: center;
}

.pill {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.pill:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.pill.active {
    background: var(--accent-2);
    color: #fff;
    box-shadow: 0 2px 10px rgba(77, 159, 255, 0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

#searchInput {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 7px 12px 7px 32px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    width: 200px;
    outline: none;
    transition: var(--transition);
}

#searchInput:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.1);
    width: 260px;
}

#searchInput::placeholder {
    color: var(--text-muted);
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   Legend
   ======================================== */

#legend {
    position: fixed;
    top: 70px;
    left: 24px;
    z-index: 90;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    width: 200px;
    box-shadow: var(--shadow-md);
}

.legend-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.legend-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.legend-count {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

/* ========================================
   Graph
   ======================================== */

#graph-container {
    width: 100%;
    height: 100%;
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(77, 159, 255, 0.03) 0%, transparent 70%),
        var(--bg-primary);
}

/* Subtle grid pattern */
#graph-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

#graph {
    width: 100%;
    height: 100%;
}

/* Node styles */
.node-group {
    cursor: pointer;
}

.node-circle {
    transition: r 0.3s ease, opacity 0.3s ease;
}

.node-circle.highlighted {
    filter: drop-shadow(0 0 8px currentColor);
}

.node-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    fill: var(--text-secondary);
    text-anchor: middle;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.node-label.highlighted {
    fill: var(--text-primary);
    font-weight: 600;
}

/* Link styles */
.link {
    stroke-linecap: round;
    transition: opacity 0.3s ease;
}

.link.highlighted {
    stroke-width: 2.5 !important;
}

/* ========================================
   Detail Panel
   ======================================== */

#detail-panel {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    width: 380px;
    background: var(--bg-glass);
    backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    border-left: 1px solid var(--border);
    z-index: 95;
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#detail-panel.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.panel-close:hover {
    background: var(--accent-1);
    color: #fff;
    border-color: var(--accent-1);
}

.panel-close svg {
    width: 14px;
    height: 14px;
}

.panel-content {
    padding: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.panel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

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

.panel-section {
    margin-bottom: 20px;
}

.panel-section h3 {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.panel-section p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.panel-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.erdoscore-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 6px 0 4px;
}

.erdoscore-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.4s ease, background 0.4s ease;
    min-width: 2px;
}

.erdoscore-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

#panelConnections {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#panelConnections li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#panelConnections li:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.connection-type {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    padding: 2px 6px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.scandal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.scandal-tag {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Language toggle */
.lang-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.lang-btn.active-tr {
    background: var(--accent-1);
    color: #fff;
    border-color: var(--accent-1);
}

/* Story Timeline */
.story-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 16px;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent-2), var(--accent-1));
    opacity: 0.3;
}

.story-event {
    position: relative;
    padding: 8px 0 8px 12px;
}

.story-event::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-2);
    border: 1.5px solid var(--bg-primary);
}

.story-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--accent-2);
    font-weight: 500;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.story-erdoscore {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.06);
    white-space: nowrap;
}

.story-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* References */
.references-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reference-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.reference-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
}

.ref-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    margin-top: 1px;
}

.ref-source {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-2);
    margin-bottom: 2px;
}

.ref-title {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.reference-item a {
    font-size: 11px;
    color: var(--accent-2);
    text-decoration: none;
    line-height: 1.4;
}

.reference-item a:hover {
    text-decoration: underline;
    color: #6fb5ff;
}

.reference-source {
    display: block;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========================================
   Stats Bar
   ======================================== */

#stats-bar {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 28px;
    box-shadow: var(--shadow-lg);
    z-index: 90;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Tooltip
   ======================================== */

#tooltip {
    position: fixed;
    z-index: 200;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    max-width: 280px;
    transition: opacity 0.15s ease;
}

#tooltip.hidden {
    opacity: 0;
}

.tooltip-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

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

.tooltip-connections {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Trump Visualization
   ======================================== */

#trump-container {
    width: 100%;
    height: 100%;
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(167, 139, 250, 0.03) 0%, transparent 70%),
        var(--bg-primary);
}

#trump-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

#trump-legend {
    position: fixed;
    top: 80px;
    left: 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    z-index: 10;
    width: 200px;
}

.pill-sep {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
    align-self: center;
}

.trump-pill {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.trump-pill:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.trump-pill.active {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.3);
    color: #a78bfa;
}

.stats-bar-trump {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 28px;
}

#trump-insight {
    position: fixed;
    bottom: 106px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    white-space: nowrap;
}

.insight-text {
    font-size: 12px;
    color: rgba(167, 139, 250, 0.6);
    font-style: italic;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .header-center {
        display: none;
    }

    #detail-panel {
        width: 320px;
    }

    #legend {
        display: none;
    }
}

@media (max-width: 640px) {
    .subtitle {
        display: none;
    }

    #searchInput {
        width: 140px;
    }

    #detail-panel {
        width: 100%;
    }
}

/* ===== FOOTER ===== */
#site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 20px;
    background: var(--footer-bg);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    z-index: 100;
    font-size: 11px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
    padding: 2px 4px;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-sep {
    color: var(--text-muted);
    opacity: 0.4;
}

.footer-copy {
    color: var(--text-muted);
    opacity: 0.6;
    font-size: 10px;
}

/* ===== LEGAL MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 680px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    letter-spacing: -0.3px;
}

.modal-body h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px 0;
}

.modal-body p, .modal-body li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 10px 0;
}

.modal-body ul {
    padding-left: 20px;
    margin: 0 0 12px 0;
}

.modal-body li {
    margin-bottom: 4px;
}

.modal-body a {
    color: var(--accent-1);
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* ========================================
   Light Mode Overrides
   ======================================== */

[data-theme="light"] .logo {
    background: linear-gradient(135deg, #333350, #0a0a1a);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .pill.active {
    color: #fff;
}

[data-theme="light"] .trump-pill.active {
    background: rgba(138, 43, 226, 0.12);
    border-color: rgba(138, 43, 226, 0.25);
    color: #7c3aed;
}

[data-theme="light"] .story-event::before {
    border-color: var(--bg-primary);
}

[data-theme="light"] .story-erdoscore {
    background: rgba(0,0,0,0.06);
}

[data-theme="light"] .insight-text {
    color: rgba(124, 58, 237, 0.7);
}

[data-theme="light"] #graph-container {
    background:
        radial-gradient(ellipse at center, rgba(43, 125, 233, 0.04) 0%, transparent 70%),
        var(--bg-primary);
}

[data-theme="light"] #trump-container {
    background:
        radial-gradient(ellipse at center, rgba(138, 43, 226, 0.04) 0%, transparent 70%),
        var(--bg-primary);
}

/* Override D3 inline SVG styles in light mode */
[data-theme="light"] #trump-graph text.trump-chrome {
    fill: rgba(0, 0, 0, 0.5) !important;
}
[data-theme="light"] #trump-graph text.trump-chrome[font-size="14px"] {
    fill: rgba(0, 0, 0, 0.7) !important;
}
[data-theme="light"] #trump-graph text.trump-dt-initials {
    fill: #f5f5f5 !important;
}
[data-theme="light"] #trump-graph text.trump-label {
    fill: rgba(0, 0, 0, 0.75) !important;
    stroke: rgba(255, 255, 255, 0.85) !important;
}
[data-theme="light"] #trump-graph line {
    stroke: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] #trump-graph .trump-link {
    stroke: rgba(0, 0, 0, 0.08) !important;
}
/* Phase header circles in light mode */
[data-theme="light"] #trump-graph circle[r="12"] {
    stroke: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #graph text.node-label {
    fill: var(--text-secondary) !important;
}
[data-theme="light"] #graph text.node-label.highlighted {
    fill: var(--text-primary) !important;
}
[data-theme="light"] #graph .link {
    opacity: 0.4;
}
