/* ==================== 平行宇宙增强：智能体 / 生成物 / 图鉴 ==================== */

.parallel-container {
    position: relative;
}

.universe-starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 420px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

#scenarioListView {
    position: relative;
    z-index: 1;
}

.universe-hud {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 14px;
    margin: 28px 0 18px;
}

.hud-meter {
    background: linear-gradient(145deg, rgba(243, 156, 18, 0.18), rgba(192, 57, 43, 0.12));
    border: 1px solid rgba(243, 156, 18, 0.35);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-meter .hud-kicker {
    font-size: 12px;
    color: #f39c12;
    letter-spacing: 0.12em;
}

.hud-meter strong,
.hud-meter #hubDivergence {
    font-size: 28px;
    font-weight: 900;
    color: #ffeaa7;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.hud-meter span:last-child {
    color: #bdc3c7;
    font-size: 13px;
}

.hud-meter.mini {
    display: inline-flex;
    flex-direction: column;
    margin-top: 16px;
}

.hud-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
}

.hud-stat b {
    display: block;
    font-size: 28px;
    color: #fff;
}

.hud-stat span {
    font-size: 12px;
    color: #95a5a6;
}

.era-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 16px;
}

.era-chip {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #ecf0f1;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    transition: 0.25s ease;
    font-family: inherit;
}

.era-chip:hover,
.era-chip.active {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.18);
    color: #f39c12;
}

.hub-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.hub-tool {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #c0392b, #8e44ad);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.hub-tool.ghost {
    background: transparent;
    border: 1px solid rgba(243, 156, 18, 0.5);
    color: #f39c12;
}

.hub-tool:hover { transform: translateY(-1px); }

.scenario-card {
    min-height: 280px;
}

.scenario-card .era-pill {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    margin-bottom: 8px;
}

.card-flag {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
}

.card-flag.aligned { background: rgba(39, 174, 96, 0.9); color: #fff; }
.card-flag.shifted { background: rgba(231, 76, 60, 0.9); color: #fff; }

.scenario-desc {
    padding-bottom: 56px;
}

/* 智能体议会 */
.agent-council {
    margin: 36px 0 28px;
    padding: 28px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(142, 68, 173, 0.16), rgba(26, 26, 46, 0.92));
    border: 1px solid rgba(155, 89, 182, 0.35);
}

.council-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8e44ad, #c0392b);
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.council-header h4 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 8px;
}

.council-header p {
    color: #bdc3c7;
    font-size: 14px;
}

.council-agents {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 22px 0;
}

.council-agent-card {
    text-align: center;
    padding: 16px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-avatar {
    width: 54px;
    height: 54px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.35), rgba(192, 57, 43, 0.2));
    box-shadow: 0 0 18px rgba(243, 156, 18, 0.25);
    animation: agentPulse 2.8s ease-in-out infinite;
}

@keyframes agentPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(243, 156, 18, 0.2); }
    50% { box-shadow: 0 0 22px rgba(243, 156, 18, 0.55); }
}

.agent-name { color: #fff; font-weight: 700; }
.agent-role { color: #f39c12; font-size: 12px; margin: 4px 0; }
.agent-voice { color: #95a5a6; font-size: 12px; }

.council-stream {
    min-height: 72px;
    margin-bottom: 16px;
}

.stream-bubble {
    background: rgba(0, 0, 0, 0.28);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    animation: fadeIn 0.4s ease;
}

.stream-bubble strong { color: #f39c12; font-size: 13px; }
.stream-bubble p { color: #ecf0f1; font-size: 14px; margin-top: 4px; }

.council-debate { display: none; margin-top: 16px; }
.council-debate.open { display: block; animation: fadeIn 0.35s ease; }
#toggleDebateBtn {
    margin-top: 8px;
}

.council-choice-block {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.council-choice-title {
    color: #ffeaa7;
    font-weight: 700;
    margin-bottom: 8px;
}

.council-line {
    padding: 8px 0 8px 12px;
    border-left: 3px solid rgba(243, 156, 18, 0.4);
    margin-bottom: 8px;
}

.council-who { color: #f39c12; font-size: 12px; }
.council-line p { color: #dfe6e9; font-size: 14px; }

.council-chat {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.council-chat-log {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.council-chat-log .qa {
    margin-bottom: 10px;
}

.council-chat-log .q { color: #74b9ff; font-size: 13px; }
.council-chat-log .a { color: #ecf0f1; font-size: 14px; margin-top: 4px; }

.council-chat-row {
    display: flex;
    gap: 8px;
}

.council-chat-row input {
    flex: 1;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.25);
    color: #fff;
    padding: 10px 12px;
    font-family: inherit;
}

.council-chat-row button {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    background: #c0392b;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

.council-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.council-quick button {
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #bdc3c7;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
}

.choice-risk {
    margin-top: 8px;
    font-size: 12px;
    color: #f39c12;
}

/* 生成物工作室 */
.artifact-studio {
    margin: 28px 0;
}

.artifact-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.artifact-tab {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: #ecf0f1;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-family: inherit;
}

.artifact-tab.active {
    background: linear-gradient(135deg, #c0392b, #8e44ad);
    border-color: transparent;
}

.artifact-panel { display: none; }
.artifact-panel.active { display: block; animation: fadeIn 0.35s ease; }

.artifact-paper {
    background: #f4e6c3;
    color: #3d2914;
    padding: 28px 26px;
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    background-image:
        linear-gradient(rgba(180, 140, 80, 0.12) 1px, transparent 1px);
    background-size: 100% 28px;
    transform: rotate(-0.4deg);
}

.paper-masthead {
    display: flex;
    justify-content: space-between;
    border-bottom: 3px double #3d2914;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-weight: 900;
}

.paper-name { font-size: 28px; letter-spacing: 0.4em; }
.paper-kicker { font-size: 12px; letter-spacing: 0.2em; }
.paper-headline {
    font-size: 26px;
    line-height: 1.35;
    margin: 10px 0;
    font-weight: 900;
}
.paper-lead { font-size: 15px; line-height: 1.8; }
.paper-footer { margin-top: 16px; font-size: 12px; opacity: 0.7; }

.artifact-telegram {
    background: #1a1f18;
    border: 8px solid #c8a165;
    padding: 22px;
    color: #d4e6c3;
    font-family: "Courier New", monospace;
    letter-spacing: 0.06em;
}

.tg-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.tg-grade {
    background: #c0392b;
    color: #fff;
    padding: 2px 10px;
    font-weight: 900;
}
.tg-row { display: flex; gap: 12px; margin: 6px 0; font-size: 13px; }
.tg-row label { color: #c8a165; width: 48px; }
.tg-body {
    margin: 16px 0;
    font-size: 18px;
    line-height: 1.9;
    border-top: 1px dashed #c8a165;
    border-bottom: 1px dashed #c8a165;
    padding: 14px 0;
}
.tg-stamp { text-align: right; color: #c8a165; }

.artifact-radio {
    background: radial-gradient(circle at top, #1b2a4a, #0c1020);
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(116, 185, 255, 0.3);
}

.radio-eq {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    height: 48px;
    margin-bottom: 16px;
}

.radio-eq span {
    width: 6px;
    background: #74b9ff;
    border-radius: 6px;
    animation: eq 1s ease-in-out infinite;
}

.radio-eq span:nth-child(1) { height: 18px; animation-delay: 0s; }
.radio-eq span:nth-child(2) { height: 32px; animation-delay: 0.1s; }
.radio-eq span:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.radio-eq span:nth-child(4) { height: 40px; animation-delay: 0.15s; }
.radio-eq span:nth-child(5) { height: 16px; animation-delay: 0.25s; }
.radio-eq span:nth-child(6) { height: 28px; animation-delay: 0.05s; }
.radio-eq span:nth-child(7) { height: 36px; animation-delay: 0.18s; }

@keyframes eq {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.2); }
}

.radio-meta { color: #74b9ff; font-size: 13px; margin-bottom: 10px; }
.radio-script { color: #ecf0f1; font-size: 16px; line-height: 1.8; }
.radio-hint { margin-top: 12px; color: #636e72; font-size: 12px; }

.artifact-archive {
    background: #f7f1e3;
    color: #2d3436;
    padding: 24px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #d4c4a8;
}

.arch-code { font-family: monospace; letter-spacing: 0.12em; color: #c0392b; }
.arch-level { font-size: 12px; margin: 6px 0 12px; }
.artifact-archive h3 { margin-bottom: 10px; }
.arch-mule, .arch-keeper { font-size: 13px; margin-top: 10px; color: #636e72; }

.future-echo {
    margin-top: 18px;
    padding: 18px 20px;
    border-left: 3px solid #74b9ff;
    background: rgba(116, 185, 255, 0.08);
    color: #dfe6e9;
    line-height: 1.8;
    font-size: 15px;
}

.divergence-meter {
    text-align: center;
    padding: 22px;
    border-radius: 18px;
    margin: 0 0 24px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.divergence-meter.shifted { border-color: rgba(231, 76, 60, 0.5); }
.div-label { color: #f39c12; letter-spacing: 0.2em; font-size: 12px; }
.div-value {
    font-size: 40px;
    font-weight: 900;
    color: #ffeaa7;
    font-variant-numeric: tabular-nums;
    margin: 6px 0;
}
.div-bar {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
    margin: 10px auto;
    max-width: 360px;
}
.div-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #f39c12, #e74c3c);
}
.div-caption { color: #bdc3c7; font-size: 13px; }

.narrative-typed::after {
    content: '▌';
    color: #f39c12;
    animation: hintBlink 1s infinite;
}

.comparison-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.comparison-split .comparison-box { margin-bottom: 0; }

.branch-tree {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 10px 0 28px;
    flex-wrap: wrap;
}

.branch-node {
    min-width: 160px;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.15);
    color: #bdc3c7;
    font-size: 13px;
}

.branch-node.now {
    border-style: solid;
    border-color: #f39c12;
    color: #ffeaa7;
}

.branch-node.real {
    border-style: solid;
    border-color: #27ae60;
    color: #2ecc71;
}

.value-portrait {
    margin: 28px 0;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(39, 174, 96, 0.12), rgba(26, 26, 46, 0.9));
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.portrait-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: center;
    margin: 18px 0;
}

.value-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.value-tag {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    font-size: 12px;
}

.value-bar-row {
    display: grid;
    grid-template-columns: 72px 1fr 36px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #bdc3c7;
}

.value-bar {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
}

.value-bar i { display: block; height: 100%; }

.psycho-report {
    padding: 16px 18px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.psycho-verdict {
    color: #f39c12;
    font-weight: 700;
    margin-bottom: 6px;
}

/* 图鉴 */
.atlas-wrap { padding-top: 70px; }
.atlas-hero { text-align: center; margin-bottom: 28px; }
.atlas-hero h2 { color: #fff; margin: 10px 0; }
.atlas-hero p { color: #bdc3c7; }
.atlas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.atlas-node {
    text-align: left;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: inherit;
    cursor: pointer;
    font-family: inherit;
}

.atlas-node.locked { opacity: 0.55; }
.atlas-node.aligned { border-color: rgba(39, 174, 96, 0.6); }
.atlas-node.shifted { border-color: rgba(231, 76, 60, 0.6); }
.atlas-year { display: block; color: #f39c12; font-weight: 900; font-size: 20px; }
.atlas-title { display: block; color: #fff; margin: 6px 0; font-weight: 700; }
.atlas-note { display: block; color: #95a5a6; font-size: 12px; }

/* 观测员浮窗 */
.universe-agent {
    display: none;
    position: fixed;
    right: 24px;
    bottom: 110px;
    z-index: 1600;
    width: 72px;
}

body.universe-mode .universe-agent {
    display: block;
}

.universe-agent.open { width: 340px; }

.ua-toggle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(243, 156, 18, 0.6);
    background: radial-gradient(circle at 30% 30%, #4a2a6a, #1a1a2e);
    color: #ffeaa7;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(142, 68, 173, 0.45);
    animation: agentPulse 2.4s ease-in-out infinite;
}

.ua-panel {
    display: none;
    margin-bottom: 12px;
    width: 340px;
    height: 420px;
    background: rgba(16, 18, 36, 0.96);
    border: 1px solid rgba(243, 156, 18, 0.35);
    border-radius: 18px;
    overflow: hidden;
    flex-direction: column;
}

.universe-agent.open .ua-panel { display: flex; }

.ua-head {
    padding: 12px 14px;
    background: linear-gradient(135deg, #8e44ad, #c0392b);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
}

.ua-head button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.ua-log {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.ua-msg { margin-bottom: 10px; font-size: 13px; line-height: 1.6; }
.ua-msg.bot { color: #ffeaa7; }
.ua-msg.user { color: #74b9ff; text-align: right; }

.ua-row {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.ua-row input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 8px;
    padding: 8px;
    font-family: inherit;
}

.ua-row button {
    border: none;
    background: #c0392b;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

body:has(#parallel.active) .ai-assistant {
    display: none;
}

.wormhole-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: radial-gradient(circle, rgba(142, 68, 173, 0.2), #050510 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.wormhole-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.wormhole-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #f39c12;
    border-bottom-color: #e74c3c;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 40px rgba(243, 156, 18, 0.4);
}

.wormhole-text { margin-top: 18px; color: #ffeaa7; letter-spacing: 0.2em; }

.feature-card.parallel-feature {
    border: 1px solid rgba(243, 156, 18, 0.35);
    background: linear-gradient(160deg, rgba(192, 57, 43, 0.25), rgba(26, 26, 46, 0.9));
}

.sim-progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 12px;
    color: #95a5a6;
}

.sim-progress-steps span {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.sim-progress-steps span.on {
    color: #f39c12;
    border-bottom-color: #f39c12;
}

@media (max-width: 900px) {
    .universe-hud { grid-template-columns: 1fr 1fr; }
    .council-agents, .comparison-split, .portrait-grid { grid-template-columns: 1fr; }
    .universe-agent.open { width: calc(100vw - 32px); right: 16px; }
    .ua-panel { width: 100%; }
    .paper-name { letter-spacing: 0.15em; font-size: 22px; }
}
