/* Innovation Chart */
.innovation-chart {
    position: relative;
    margin-bottom: 24px;
}

.chart-area {
    position: relative;
    height: 300px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(to top, rgba(139, 92, 246, 0.04), rgba(251, 191, 36, 0.02));
    border-radius: 4px 4px 0 0;
    overflow: visible;
}

.chart-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 24.8%, rgba(255,255,255,0.05) 25%, transparent 25.2%),
        linear-gradient(to bottom, transparent 49.8%, rgba(255,255,255,0.05) 50%, transparent 50.2%),
        linear-gradient(to bottom, transparent 74.8%, rgba(255,255,255,0.05) 75%, transparent 75.2%);
    pointer-events: none;
}

.chart-x-axis {
    display: flex;
    justify-content: space-between;
    padding: 8px 2% 0;
}

.chart-x-axis span {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.chart-x-axis span small {
    display: block;
    font-size: 8px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 1px;
}

.chart-y-top,
.chart-y-bottom {
    position: absolute;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.chart-y-top {
    top: 4px;
    left: 4px;
}

.chart-y-bottom {
    bottom: 4px;
    left: 4px;
}

.vision-line {
    position: absolute;
    top: 6%;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.vision-label {
    position: absolute;
    top: 6%;
    right: 6px;
    transform: translateY(-130%);
    font-size: 8px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.cp {
    position: absolute;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
    white-space: normal;
    max-width: 110px;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
    line-height: 1.4;
}

.cp-glow {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.cp-beta {
    display: inline-block;
    font-size: 7px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.35);
    color: rgba(200, 180, 255, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.4);
    margin-left: 3px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* ── Expand Button ── */
.innovation-chart-wrap {
    position: relative;
    margin-bottom: 16px;
}

.rc-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.rc-expand-btn:hover {
    color: white;
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.rc-expand-btn svg { opacity: 0.7; }
.rc-expand-btn:hover svg { opacity: 1; }

.theme-light .rc-expand-btn {
    color: rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .rc-expand-btn:hover {
    color: #4338CA;
    background: rgba(67, 56, 202, 0.08);
    border-color: rgba(67, 56, 202, 0.25);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.1);
}

/* ── Fullscreen Force Graph ── */
.rc-fs {
    position: fixed;
    inset: 0;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rc-fs.visible {
    opacity: 1;
    pointer-events: auto;
}

.rc-fs-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #0c0a1a 0%, #1a1035 30%, #0f172a 60%, #0a1628 100%);
}

.theme-light .rc-fs-bg {
    background: linear-gradient(135deg, #f8f6f3 0%, #ede9e3 50%, #f0ede8 100%);
}

.theme-dark .rc-fs-bg {
    background: linear-gradient(135deg, #060609 0%, #0a0a12 40%, #0e0e16 100%);
}

.rc-fs-close {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 10002;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rc-fs-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

.theme-light .rc-fs-close {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
}

.theme-light .rc-fs-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.8);
}

.rc-fs-graph-header {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rc-fs-eyebrow {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(139, 92, 246, 0.6);
}

.theme-light .rc-fs-eyebrow { color: rgba(67, 56, 202, 0.5); }

.rc-fs-title-sm {
    font-size: 18px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.3px;
}

.theme-light .rc-fs-title-sm { color: #1a1a2e; }

.rc-fs-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
}

.theme-light .rc-fs-hint { color: rgba(0, 0, 0, 0.3); }

.rc-fs-canvas {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    height: 100%;
}

.rc-fs-canvas svg { display: block; }

/* Tooltip */
.rc-tooltip {
    position: absolute;
    z-index: 10003;
    background: rgba(15, 10, 30, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    max-width: 280px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.theme-light .rc-tooltip {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(67, 56, 202, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.rc-tt-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.theme-light .rc-tt-title { color: #1a1a2e; }

.rc-tt-count {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
}

.theme-light .rc-tt-count { color: rgba(0, 0, 0, 0.4); }

.rc-tt-list {
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.theme-light .rc-tt-list { color: rgba(0, 0, 0, 0.6); }

/* Detail Panel (click-to-focus) */
.rc-detail-panel {
    position: absolute;
    z-index: 10003;
    right: 20px;
    top: 70px;
    bottom: 20px;
    width: 320px;
    background: rgba(15, 10, 30, 0.92);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    padding: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.rc-detail-panel.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.theme-light .rc-detail-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(67, 56, 202, 0.15);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

.rc-dp-header {
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-light .rc-dp-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.rc-dp-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
}

.theme-light .rc-dp-title { color: #1a1a2e; }

.rc-dp-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.theme-light .rc-dp-subtitle { color: rgba(0, 0, 0, 0.4); }

.rc-dp-body {
    padding: 12px 18px 18px;
}

.rc-dp-section {
    margin-bottom: 12px;
}

.rc-dp-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.theme-light .rc-dp-section-title {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.rc-dp-feature {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    padding: 3px 0;
    padding-left: 12px;
    position: relative;
    line-height: 1.4;
}

.theme-light .rc-dp-feature { color: rgba(0, 0, 0, 0.7); }

.rc-dp-feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.theme-light .rc-dp-feature::before { background: rgba(0, 0, 0, 0.25); }

.rc-dp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
    line-height: 1;
}

.rc-dp-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.theme-light .rc-dp-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.4);
}

.theme-light .rc-dp-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.7);
}

/* Fullscreen-specific */
.rc-fs:fullscreen .rc-fs-bg,
.rc-fs:-webkit-full-screen .rc-fs-bg {
    position: fixed;
    inset: 0;
}

/* ── Light Theme: Release Notes (chart) ── */

.theme-light .chart-area {
    border-bottom-color: rgba(0, 0, 0, 0.1);
    background: linear-gradient(to top, rgba(67, 56, 202, 0.04), rgba(251, 191, 36, 0.02));
}

.theme-light .chart-area::before {
    background:
        linear-gradient(to bottom, transparent 24.8%, rgba(0,0,0,0.06) 25%, transparent 25.2%),
        linear-gradient(to bottom, transparent 49.8%, rgba(0,0,0,0.06) 50%, transparent 50.2%),
        linear-gradient(to bottom, transparent 74.8%, rgba(0,0,0,0.06) 75%, transparent 75.2%);
}

.theme-light .chart-x-axis span { color: rgba(0, 0, 0, 0.5); }
.theme-light .chart-x-axis span small { color: rgba(0, 0, 0, 0.3); }
.theme-light .chart-y-top,
.theme-light .chart-y-bottom { color: rgba(0, 0, 0, 0.25); }
.theme-light .vision-line { border-top-color: rgba(0, 0, 0, 0.1); }
.theme-light .vision-label { color: rgba(0, 0, 0, 0.25); }

.theme-light .cp {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.65);
}

.theme-light .cp-beta {
    background: rgba(67, 56, 202, 0.15);
    color: #4338CA;
    border-color: rgba(67, 56, 202, 0.25);
}

.version-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    text-align: left;
}

.version {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.version:last-child {
    margin-bottom: 0;
}

.version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-family: inherit;
    transition: background 0.2s;
}

.version-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.version-number {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.version-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(251, 191, 36, 0.25);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.3);
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chevron {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.version.open .chevron {
    transform: rotate(180deg);
}

.version-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 16px;
}

.version.open .version-body {
    max-height: 2000px;
    padding: 0 16px 16px;
}

.version-body ul {
    list-style: none;
    text-align: left;
}

.version-body li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.4;
}

.version-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.version-summary {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 12px;
    text-align: left;
}

.version-category {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-top: 12px;
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.version-category:first-of-type {
    margin-top: 0;
}

/* ── Light Theme: Version Cards ── */
.theme-light .version {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .version-header { color: #1a1a2e; }
.theme-light .version-header:hover { background: rgba(0, 0, 0, 0.04); }
.theme-light .version-number { color: #1a1a2e; }

.theme-light .version-badge {
    background: rgba(67, 56, 202, 0.12);
    color: #4338CA;
    border-color: rgba(67, 56, 202, 0.25);
}

.theme-light .chevron { color: rgba(0, 0, 0, 0.4); }
.theme-light .version-date { color: rgba(0, 0, 0, 0.45); }
.theme-light .version-summary { color: rgba(0, 0, 0, 0.6); }

.theme-light .version-category {
    color: rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.theme-light .version-body li { color: rgba(0, 0, 0, 0.8); }
.theme-light .version-body li::before { background: rgba(0, 0, 0, 0.3); }

/* ── Dark Theme ── */
.theme-dark .version {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .version-header:hover { background: rgba(255, 255, 255, 0.04); }

.theme-dark .version-badge {
    background: rgba(251, 191, 36, 0.2);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.3);
}

/* ── Mobile: Innovation Chart ── */
@media (max-width: 600px) {
    /* Chart is too dense for narrow screens — hide it, version cards have the content */
    .innovation-chart { display: none; }
    .version-number { font-size: 13px; }
}

/* ── Mobile: Galaxy fullscreen overlay (iOS lacks Fullscreen API) ── */
@media (max-width: 768px) {
    .rc-fs {
        height: 100vh;
        height: 100dvh;
    }
    .rc-fs-graph-header {
        top: 10px;
        left: 12px;
    }
    .rc-fs-hint { display: none; }
    .rc-fs-close {
        top: 10px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    .rc-detail-panel {
        right: 8px;
        left: 8px;
        top: auto;
        bottom: 8px;
        width: auto;
        max-height: 55vh;
        border-radius: 14px 14px 14px 14px;
        transform: translateY(20px);
    }
    .rc-detail-panel.visible {
        transform: translateY(0);
    }
    .rc-tooltip { display: none; }
}
