/* ============================================
   平行人生 · Life Simulator
   沉浸式视觉设计系统
   ============================================ */

/* ========== 基础重置 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 背景色系 */
    --bg-deep: #060818;
    --bg-cosmic: #0a0e2e;
    --bg-panel: rgba(255, 255, 255, 0.04);
    --bg-panel-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(255, 255, 255, 0.06);

    /* 主色系 */
    --gold: #e8b86d;
    --gold-bright: #f5d491;
    --purple: #8b7ed8;
    --purple-soft: #a99bf0;
    --teal: #6dd5c4;
    --rose: #e87a8e;

    /* 属性色系 */
    --stat-health: #6dd5c4;
    --stat-intel: #7ba7f0;
    --stat-charm: #e87a8e;
    --stat-wealth: #e8b86d;
    --stat-mood: #c77df0;
    --stat-luck: #7ed957;

    /* 文字色系 */
    --text-primary: #f0ece8;
    --text-secondary: #a8a4b8;
    --text-muted: #6b6880;
    --text-gold: #e8b86d;

    /* 边框 */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(232, 184, 109, 0.3);

    /* 阴影 */
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(139, 126, 216, 0.15);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    /* 过渡 */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ========== 星空背景 ========== */
.starfield {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(139, 126, 216, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(232, 184, 109, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(109, 213, 196, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-cosmic) 100%);
}

.stars {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-repeat: repeat;
}

.stars.layer-1 {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 60px 120px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 200px 50px, rgba(232,184,109,0.7), transparent),
        radial-gradient(1px 1px at 280px 160px, rgba(255,255,255,0.4), transparent);
    background-size: 300px 200px;
    animation: drift-1 120s linear infinite;
    opacity: 0.8;
}

.stars.layer-2 {
    background-image:
        radial-gradient(1px 1px at 40px 60px, rgba(168,164,184,0.6), transparent),
        radial-gradient(2px 2px at 150px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 140px, rgba(139,126,216,0.5), transparent),
        radial-gradient(1px 1px at 250px 100px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 320px 180px, rgba(109,213,196,0.4), transparent);
    background-size: 400px 250px;
    animation: drift-2 180s linear infinite;
    opacity: 0.6;
}

.stars.layer-3 {
    background-image:
        radial-gradient(0.5px 0.5px at 50px 50px, rgba(255,255,255,0.4), transparent),
        radial-gradient(0.5px 0.5px at 120px 90px, rgba(255,255,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 200px 120px, rgba(255,255,255,0.5), transparent),
        radial-gradient(0.5px 0.5px at 300px 60px, rgba(232,184,109,0.3), transparent);
    background-size: 350px 200px;
    animation: drift-3 90s linear infinite;
    opacity: 0.4;
}

.nebula {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(139, 126, 216, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 70% 80%, rgba(232, 184, 109, 0.04) 0%, transparent 35%);
    animation: nebula-pulse 20s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}
@keyframes drift-2 {
    from { transform: translateY(0); }
    to { transform: translateY(-250px); }
}
@keyframes drift-3 {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}
@keyframes nebula-pulse {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 1; transform: scale(1.05); }
}

/* ========== 屏幕系统 ========== */
.screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s var(--ease-smooth);
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* ========== 开场屏幕 ========== */
.intro-content {
    text-align: center;
    z-index: 1;
    animation: intro-fade-in 1.5s var(--ease-smooth);
}

@keyframes intro-fade-in {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.intro-orb {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
}

.orb-core {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-bright) 0%, var(--gold) 40%, transparent 70%);
    box-shadow: 0 0 60px var(--gold), 0 0 100px rgba(232, 184, 109, 0.3);
    animation: orb-pulse 3s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(232, 184, 109, 0.2);
    transform: translate(-50%, -50%);
}

.ring-1 { width: 70px; height: 70px; animation: orb-rotate 8s linear infinite; border-color: rgba(232, 184, 109, 0.3); }
.ring-2 { width: 95px; height: 95px; animation: orb-rotate 12s linear infinite reverse; border-color: rgba(139, 126, 216, 0.25); }
.ring-3 { width: 120px; height: 120px; animation: orb-rotate 16s linear infinite; border-color: rgba(109, 213, 196, 0.15); }

@keyframes orb-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}
@keyframes orb-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.intro-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(232, 184, 109, 0.3);
    padding-left: 0.3em;
}

.intro-subtitle {
    font-size: 1.1rem;
    color: var(--text-gold);
    margin-bottom: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.intro-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--bg-panel-hover);
    border-color: var(--border-glow);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(232, 184, 109, 0.2), rgba(139, 126, 216, 0.15));
    border-color: rgba(232, 184, 109, 0.4);
    color: var(--gold-bright);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(232, 184, 109, 0.3), rgba(139, 126, 216, 0.25));
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(232, 184, 109, 0.2);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-glass);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

.btn-danger {
    color: var(--rose);
    border-color: rgba(232, 122, 142, 0.3);
}

.btn-danger:hover {
    background: rgba(232, 122, 142, 0.1);
    border-color: var(--rose);
}

/* ========== 经历输入屏幕 ========== */
.setup-container {
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    animation: panel-slide-in 0.6s var(--ease-smooth);
}

@keyframes panel-slide-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.setup-container::-webkit-scrollbar { width: 6px; }
.setup-container::-webkit-scrollbar-track { background: transparent; }
.setup-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.screen-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-gold);
    margin-bottom: 0.5rem;
    text-align: center;
}

.screen-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.label-icon {
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-smooth);
    outline: none;
}

.form-input:focus {
    border-color: rgba(232, 184, 109, 0.4);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.08);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a4b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select option {
    background: var(--bg-cosmic);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.7;
}

.form-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* AI 配置区 */
.ai-config-section {
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.ai-config-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.ai-config-toggle:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
}

.toggle-arrow {
    transition: transform 0.3s var(--ease-smooth);
}

.ai-config-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

.ai-config-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    animation: panel-slide-in 0.3s var(--ease-smooth);
}

.setup-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

/* ========== 结构化输入：表单行 ========== */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-group-half {
    flex: 1;
}

/* ========== 成长环境选择胶囊 ========== */
.place-type-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.place-type-pill {
    flex: 1;
    min-width: 5rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.place-type-pill:hover {
    border-color: var(--gold);
    color: var(--text-primary);
    background: rgba(232, 184, 109, 0.06);
}

.place-type-pill.selected {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(232, 184, 109, 0.12);
    box-shadow: 0 0 12px rgba(232, 184, 109, 0.15);
}

.place-type-pill.selected::after {
    content: '\2713';
    position: absolute;
    top: 0.25rem;
    right: 0.4rem;
    font-size: 0.65rem;
    color: var(--gold);
    opacity: 0.8;
}

/* ========== 性格标签网格 ========== */
.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    user-select: none;
}

.tag-item:hover {
    border-color: rgba(232,184,109,0.4);
    color: var(--text-primary);
}

.tag-item.selected {
    border-color: var(--gold-bright);
    background: rgba(232,184,109,0.12);
    color: var(--gold-bright);
    box-shadow: 0 0 12px rgba(232,184,109,0.15);
}

/* ========== 教育输入行 ========== */
.edu-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.edu-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edu-input-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.edu-input-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    width: 3rem;
}

.edu-school-input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
}

/* ========== 教育时间线（旧版保留，不再使用） ========== */
.education-timeline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.edu-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    min-width: 60px;
    position: relative;
    user-select: none;
}

.edu-stage-icon {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.edu-stage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.edu-stage-age {
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.edu-stage:hover {
    border-color: rgba(232,184,109,0.3);
}

.edu-stage.active {
    border-color: var(--gold-bright);
    background: rgba(232,184,109,0.1);
}

.edu-stage.active .edu-stage-label {
    color: var(--gold-bright);
}

.edu-stage.highest {
    border-color: var(--teal);
    background: rgba(109,213,196,0.1);
    box-shadow: 0 0 10px rgba(109,213,196,0.15);
}

.edu-stage.highest .edu-stage-label {
    color: var(--teal);
}

.edu-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.4;
}

/* ========== 遗憾卡片 ========== */
.regret-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}

.regret-card {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    user-select: none;
}

.regret-card-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.regret-card-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.regret-card:hover {
    border-color: rgba(232,122,142,0.3);
    background: rgba(232,122,142,0.03);
}

.regret-card.selected {
    border-color: var(--rose);
    background: rgba(232,122,142,0.08);
    box-shadow: 0 0 12px rgba(232,122,142,0.12);
}

.regret-card.selected .regret-card-label {
    color: var(--rose);
}

/* ========== 回忆碎片弹窗 ========== */
.memory-echo-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(6,8,24,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 350;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlay-fade 0.3s var(--ease-smooth);
}

.memory-echo-card {
    max-width: 460px;
    width: 90%;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(26,27,48,0.95), rgba(13,14,30,0.95));
    border: 1px solid rgba(232,184,109,0.2);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    animation: panel-slide-in 0.4s var(--ease-smooth);
}

.memory-echo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.memory-echo-icon {
    font-size: 1.3rem;
}

.memory-echo-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    color: var(--gold-bright);
    letter-spacing: 0.1em;
}

.memory-echo-question {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.memory-echo-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.memory-echo-option {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: left;
    user-select: none;
}

.memory-echo-option:hover {
    border-color: var(--gold-bright);
    background: rgba(232,184,109,0.06);
    color: var(--text-primary);
}

.memory-echo-hint {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.6;
}

/* ========== 游戏主屏幕 ========== */
.game-layout {
    display: grid;
    grid-template-columns: 240px 1fr 260px;
    gap: 1rem;
    width: 100%;
    height: 100%;
    padding: 1rem;
    max-width: 1400px;
    max-height: 100vh;
}

/* ---- 属性面板 ---- */
.stats-panel, .timeline-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.panel-header {
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 0.8rem;
}

.panel-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.5s var(--ease-smooth);
}

.stat-value.increased { color: var(--stat-luck); }
.stat-value.decreased { color: var(--rose); }

.stat-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s var(--ease-bounce);
    position: relative;
}

.stat-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: stat-shimmer 2s infinite;
}

@keyframes stat-shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.stat-health .stat-fill { background: linear-gradient(90deg, var(--stat-health), #8de8d8); }
.stat-intel .stat-fill { background: linear-gradient(90deg, var(--stat-intel), #9bbaf5); }
.stat-charm .stat-fill { background: linear-gradient(90deg, var(--stat-charm), #f09aaa); }
.stat-wealth .stat-fill { background: linear-gradient(90deg, var(--stat-wealth), var(--gold-bright)); }
.stat-mood .stat-fill { background: linear-gradient(90deg, var(--stat-mood), #d99ff5); }
.stat-luck .stat-fill { background: linear-gradient(90deg, var(--stat-luck), #9ee87a); }

.panel-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 1rem 0;
}

.life-stage-display {
    text-align: center;
    padding: 0.5rem 0;
}

.stage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.age-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}

.age-number {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1;
}

.age-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---- 叙事面板 ---- */
.narrative-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.narrative-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.scene-tag {
    font-size: 0.8rem;
    color: var(--gold);
    padding: 0.3rem 0.8rem;
    background: rgba(232, 184, 109, 0.1);
    border: 1px solid rgba(232, 184, 109, 0.2);
    border-radius: 20px;
}

.turn-counter {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.narrative-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.narrative-body::-webkit-scrollbar { width: 4px; }
.narrative-body::-webkit-scrollbar-track { background: transparent; }
.narrative-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.narrative-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.05rem;
    line-height: 2.1;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    white-space: pre-wrap;
    word-break: break-word;
}

.narrative-text .highlight {
    color: var(--gold-bright);
    font-weight: 600;
}

/* 打字机光标 */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--gold);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ---- 选项区 ---- */
.choices-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.5rem;
    min-height: 60px;
}

.choices-hint-bar {
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(232,184,109,0.06);
    border: 1px dashed rgba(232,184,109,0.2);
    border-radius: var(--radius-sm);
    animation: pulse-hint 2s ease-in-out infinite;
    margin-bottom: 0.4rem;
}

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

.choice-btn {
    width: 100%;
    text-align: left;
    padding: 0.9rem 1.2rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.6;
    cursor: pointer;
    transition: all 0.35s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    opacity: 0;
    transform: translateX(-15px);
    animation: choice-enter 0.5s var(--ease-bounce) forwards;
}

.choice-btn:nth-child(1) { animation-delay: 0.1s; }
.choice-btn:nth-child(2) { animation-delay: 0.2s; }
.choice-btn:nth-child(3) { animation-delay: 0.3s; }
.choice-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes choice-enter {
    to { opacity: 1; transform: translateX(0); }
}

.choice-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--purple));
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.choice-btn:hover {
    background: var(--bg-panel-hover);
    border-color: var(--border-glow);
    transform: translateX(4px);
}

.choice-btn:hover::before {
    opacity: 1;
}

.choice-marker {
    color: var(--gold);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 1.2em;
}

.choice-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- 叙事底部 ---- */
.narrative-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-glass);
}

.ai-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--purple-soft);
}

.ai-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--purple-soft);
    box-shadow: 0 0 8px var(--purple-soft);
    animation: ai-pulse 2s ease-in-out infinite;
}

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

/* ---- 时间线面板 ---- */
.timeline-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-list::-webkit-scrollbar { width: 4px; }
.timeline-list::-webkit-scrollbar-track { background: transparent; }
.timeline-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.timeline-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    animation: timeline-enter 0.4s var(--ease-smooth);
}

@keyframes timeline-enter {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.timeline-age {
    color: var(--gold);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 2.5em;
}

.timeline-event {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========== 菜单弹窗 ========== */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlay-fade 0.3s var(--ease-smooth);
}

@keyframes overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.menu-dialog {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    min-width: 300px;
    text-align: center;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: var(--shadow-soft);
}

.menu-dialog h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.4rem;
    color: var(--text-gold);
    margin-bottom: 1.5rem;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.menu-actions .btn {
    width: 100%;
}

/* ========== 结局屏幕 ========== */
.ending-container {
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    text-align: center;
    animation: panel-slide-in 0.8s var(--ease-smooth);
}

.ending-container::-webkit-scrollbar { width: 6px; }
.ending-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.ending-header {
    margin-bottom: 2rem;
}

.ending-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: ending-icon-float 3s ease-in-out infinite;
}

@keyframes ending-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ending-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.ending-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.ending-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-md);
}

.ending-stat {
    text-align: center;
}

.ending-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.ending-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
}

.ending-summary {
    text-align: left;
    margin-bottom: 1.5rem;
}

.ending-summary h4 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.ending-summary p {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.92rem;
    line-height: 2;
    color: var(--text-secondary);
}

.ending-comparison {
    text-align: left;
    padding: 1.2rem;
    background: rgba(139, 126, 216, 0.06);
    border: 1px solid rgba(139, 126, 216, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.ending-comparison h4 {
    font-size: 0.9rem;
    color: var(--purple-soft);
    margin-bottom: 0.6rem;
}

.ending-comparison p {
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.ending-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 0.7rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 200;
    transition: transform 0.4s var(--ease-bounce);
    box-shadow: var(--shadow-soft);
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ========== 加载动画 ========== */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(6, 8, 24, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

.loading-orb {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.loading-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    color: var(--text-gold);
    letter-spacing: 0.1em;
    animation: loading-text-fade 2s ease-in-out infinite;
}

@keyframes loading-text-fade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loading-cancel-btn {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    padding: 0.4rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}

.loading-cancel-btn:hover {
    color: var(--rose);
    border-color: var(--rose);
    background: rgba(232,122,142,0.08);
}

/* ========== 属性飘字效果 ========== */
.float-effects-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 150;
}

.float-effect {
    position: absolute;
    font-size: 0.85rem;
    font-weight: 700;
    animation: float-up 1.5s var(--ease-smooth) forwards;
    text-shadow: 0 0 10px currentColor;
}

.float-effect.positive { color: var(--stat-luck); }
.float-effect.negative { color: var(--rose); }

@keyframes float-up {
    0% { opacity: 0; transform: translateY(0) scale(0.8); }
    20% { opacity: 1; transform: translateY(-10px) scale(1.1); }
    100% { opacity: 0; transform: translateY(-50px) scale(1); }
}

/* ========== 场景过渡效果 ========== */
.scene-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-deep);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-smooth);
}

.scene-transition.active {
    opacity: 1;
    pointer-events: all;
}


/* ========== 和解报告样式 ========== */
.recon-compare {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1rem 0;
}

.recon-col {
  flex: 1;
  padding: 1rem;
  background: rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.recon-col-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-align: center;
}

.recon-real .recon-col-label { color: var(--text-secondary); }
.recon-parallel .recon-col-label { color: var(--gold); }

.recon-radar {
  display: flex;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.recon-radar svg {
  display: block;
}

.recon-col-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.recon-mini-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  padding: 0.15rem 0.3rem;
  color: var(--text-muted);
}

.recon-mini-stat.recon-real { color: #a8a4b8; }
.recon-mini-stat.recon-parallel { color: var(--gold); }

.recon-col-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

.recon-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.3rem;
}

.recon-vs span {
  font-size: 1.2rem;
  color: var(--purple-soft);
  font-weight: 300;
}

.recon-vs-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, transparent, rgba(139,126,216,0.3), transparent);
}

.recon-elder-speech {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  margin: 1rem 0;
  background: linear-gradient(135deg, rgba(139,126,216,0.08), rgba(232,184,109,0.05));
  border: 1px solid rgba(139,126,216,0.15);
  border-radius: var(--radius-md);
}

.recon-elder-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.recon-elder-text p {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text-secondary);
  font-style: italic;
}

.recon-regret-note {
  padding: 0.8rem 1rem;
  margin: 0.8rem 0;
  background: rgba(232,184,109,0.05);
  border: 1px solid rgba(232,184,109,0.15);
  border-radius: var(--radius-sm);
  text-align: left;
}

.recon-regret-note h4 {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.recon-regret-note p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== 响应式补充 ========== */
@media (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 200px 1fr 220px;
    }
}

@media (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        overflow-y: auto;
    }

    .stats-panel, .timeline-panel {
        max-height: 200px;
    }

    .narrative-text {
        font-size: 0.95rem;
        line-height: 1.9;
    }

    .intro-title {
        font-size: 2.5rem;
    }

    .ending-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .recon-compare {
        flex-direction: column;
    }

    .recon-vs {
        flex-direction: row;
        padding: 0.3rem 0;
    }

    .recon-vs-line {
        width: 30px;
        height: 1px;
    }
}

/* ========== 生活信物系统 ========== */
.artifacts-panel {
    background: var(--bg-panel);
    border-right: 1px solid var(--border-glass);
    padding: 1.2rem 0.8rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.artifacts-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.artifact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.artifact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.artifact-item:hover {
    background: var(--bg-panel-hover);
    border-color: var(--border-glow);
    transform: translateX(3px);
}

.artifact-item:hover::before {
    opacity: 1;
}

.artifact-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: grayscale(0.2);
    transition: filter 0.3s;
}

.artifact-item:hover .artifact-icon {
    filter: grayscale(0);
}

.artifact-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 信物弹窗 */
.artifact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s var(--ease-smooth);
}

.artifact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.artifact-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--bg-cosmic), var(--bg-deep));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    animation: slideUp 0.4s var(--ease-bounce);
}

.artifact-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

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

.artifact-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.artifact-modal-icon {
    font-size: 3rem;
    line-height: 1;
}

.artifact-modal-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.4rem;
    color: var(--gold-bright);
    font-weight: 700;
}

.artifact-modal-body {
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    line-height: 2;
    color: var(--text-secondary);
}

.artifact-modal-body .artifact-description {
    margin-bottom: 1.2rem;
    text-indent: 2em;
}

.artifact-modal-body .artifact-status {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
    margin-top: 1rem;
}

.artifact-modal-body .artifact-status-label {
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.artifact-modal-body .artifact-status-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.8;
}

/* 钱包/存折样式 */
.wallet-content {
    font-family: 'Courier New', monospace;
    background: #f5f0e8;
    color: #2a2418;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #d4c8b0;
}

.wallet-balance {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
    color: #1a5c2a;
}

.wallet-desc {
    font-size: 0.85rem;
    color: #5a5240;
    line-height: 1.8;
    font-family: 'Noto Serif SC', serif;
}

/* 镜子样式 */
.mirror-content {
    text-align: center;
    padding: 1rem;
}

.mirror-image {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.mirror-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 2;
    font-style: italic;
}

/* 日记样式 */
.diary-content {
    background: #fefcf5;
    color: #2a2418;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e8dcc8;
    font-family: 'Noto Serif SC', serif;
}

.diary-date {
    font-size: 0.8rem;
    color: #8a7e6;
    margin-bottom: 0.8rem;
    text-align: right;
}

.diary-entry {
    font-size: 0.95rem;
    line-height: 2;
    color: #3a3428;
    text-indent: 2em;
}

.diary-mood {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #d4c8b0;
    font-size: 0.85rem;
    color: #7a6e5c;
}

/* 手机样式 */
.phone-content {
    background: #1a1a2e;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid #333;
}

.phone-notifications {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phone-notif {
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ========== 响应式：生活信物 ========== */
@media (max-width: 768px) {
    .artifacts-panel {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
        padding: 0.8rem;
    }

    .artifacts-list {
        flex-direction: row;
        gap: 0.5rem;
    }

    .artifact-item {
        flex-direction: column;
        padding: 0.5rem;
        min-width: 70px;
    }

    .artifact-icon {
        font-size: 1.5rem;
    }

    .artifact-label {
        font-size: 0.75rem;
    }
}
/* ========== 交互阻尼感样式 ========== */
.choice-delayed {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

.choice-appearing {
    opacity: 1;
    cursor: pointer;
    transform: translateY(0);
}

.choice-major {
    border-color: var(--rose);
    background: linear-gradient(135deg, rgba(232, 122, 142, 0.1), rgba(139, 126, 216, 0.05));
    position: relative;
    overflow: hidden;
}

.choice-major::before {
    content: '⚠️ 重大决策 · 长按3秒确认';
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--rose);
    white-space: nowrap;
    opacity: 0.8;
    animation: major-hint-pulse 2s ease-in-out infinite;
}

@keyframes major-hint-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.choice-major {
    animation: major-btn-glow 2.5s ease-in-out infinite;
}

@keyframes major-btn-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(232, 122, 142, 0); }
    50% { box-shadow: 0 0 12px rgba(232, 122, 142, 0.25); }
}

.choice-text-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* 长按进度环 */
.longpress-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    pointer-events: none;
}

.longpress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.longpress-circle circle {
    fill: none;
    stroke: var(--rose);
    stroke-width: 2;
    transition: stroke-dashoffset 0.1s linear;
}

.longpressing {
    border-color: var(--rose) !important;
    box-shadow: 0 0 20px rgba(232, 122, 142, 0.3) !important;
}

.longpress-confirmed {
    border-color: var(--stat-health) !important;
    background: linear-gradient(135deg, rgba(109, 213, 196, 0.15), rgba(139, 126, 216, 0.08)) !important;
    animation: pulse 0.5s ease;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

@keyframes major-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.major-click-shake {
    animation: major-shake 0.5s ease !important;
}

/* ========== 现实纠偏机制（Active Reality Correction） ========== */

/* 标题栏右侧容器 */
.narrative-header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* 纠偏气泡 — 标题栏内紧凑按钮，不遮挡正文 */
.correction-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: rgba(109, 213, 196, 0.12);
    border: 1px solid rgba(109, 213, 196, 0.35);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    animation: correction-bubble-fade-in 0.8s var(--ease-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.correction-bubble-icon {
    font-size: 0.85rem;
}

.correction-bubble-label {
    font-size: 0.75rem;
    color: var(--teal);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.correction-bubble:hover {
    background: rgba(109, 213, 196, 0.2);
    border-color: var(--teal);
    box-shadow: 0 0 12px rgba(109, 213, 196, 0.2);
    transform: translateY(-2px);
}

@keyframes correction-bubble-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 纠偏气泡呼吸动画 — 常态微弱发光，提示玩家"可以纠偏" */
.correction-bubble:not(:hover) {
    animation: correction-bubble-breathe 4s ease-in-out infinite, correction-bubble-fade-in 0.8s var(--ease-smooth);
}

@keyframes correction-bubble-breathe {
    0%, 100% { box-shadow: 0 0 4px rgba(109, 213, 196, 0.1); }
    50% { box-shadow: 0 0 10px rgba(109, 213, 196, 0.25); }
}

/* 纠偏输入区域 — 内联轻量设计 */
.correction-input-area {
    position: relative;
    width: 100%;
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, rgba(109, 213, 196, 0.08), rgba(139, 126, 216, 0.04));
    border: 1px solid rgba(109, 213, 196, 0.25);
    border-radius: var(--radius-md);
    animation: correction-input-slide-in 0.4s var(--ease-bounce);
    z-index: 10;
}

@keyframes correction-input-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.correction-input-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
    font-size: 0.85rem;
    color: var(--teal);
    font-weight: 500;
}

.correction-input-icon {
    font-size: 1rem;
}

.correction-close-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

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

.correction-text-input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(109, 213, 196, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: all 0.3s var(--ease-smooth);
}

.correction-text-input:focus {
    border-color: var(--teal);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(109, 213, 196, 0.08);
}

.correction-text-input::placeholder {
    color: var(--text-muted);
}

.correction-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.correction-submit-btn {
    background: linear-gradient(135deg, rgba(109, 213, 196, 0.2), rgba(109, 213, 196, 0.1));
    border-color: rgba(109, 213, 196, 0.4);
    color: var(--teal);
}

.correction-submit-btn:hover {
    background: linear-gradient(135deg, rgba(109, 213, 196, 0.3), rgba(109, 213, 196, 0.15));
    border-color: var(--teal);
    box-shadow: 0 4px 16px rgba(109, 213, 196, 0.15);
}

.correction-input-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: right;
    opacity: 0.6;
}

/* 修正动画覆盖层 — 叙事重写时显示 */
.correction-rewrite-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 8, 24, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: correction-overlay-in 0.5s var(--ease-smooth);
    border-radius: inherit;
}

@keyframes correction-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.correction-rewrite-content {
    text-align: center;
    max-width: 85%;
    padding: 2rem;
}

.correction-rewrite-icon {
    font-size: 2rem;
    animation: correction-pen-write 1s ease-in-out infinite;
    margin-bottom: 0.8rem;
}

@keyframes correction-pen-write {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-3px) rotate(-5deg); }
    75% { transform: translateX(3px) rotate(5deg); }
}

.correction-rewrite-status {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    color: var(--teal);
    margin-bottom: 1.2rem;
    animation: correction-status-pulse 2s ease-in-out infinite;
}

@keyframes correction-status-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.correction-rewrite-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    opacity: 0;
    animation: correction-rewrite-fade-in 1.2s var(--ease-smooth) forwards;
}

@keyframes correction-rewrite-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 纠偏完成标记 — 在叙事正文下方显示已纠正的事实 */
.correction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: rgba(109, 213, 196, 0.08);
    border: 1px solid rgba(109, 213, 196, 0.2);
    border-radius: 12px;
    font-size: 0.65rem;
    color: var(--teal);
    margin-top: 0.8rem;
    opacity: 0.7;
}

.correction-badge-icon {
    font-size: 0.7rem;
}

/* ========== 响应式：现实纠偏 ========== */
@media (max-width: 768px) {
    .correction-bubble {
        padding: 0.25rem 0.55rem;
    }

    .correction-bubble-label {
        font-size: 0.68rem;
    }

    .narrative-header-right {
        gap: 0.5rem;
    }

    .correction-input-area {
        padding: 0.8rem;
    }

    .correction-rewrite-content {
        padding: 1rem;
    }
}

/* ========== 垂直时间轴卡片流 ========== */
.timeline-cards-container {
    position: relative;
    padding-left: 2rem;
    margin-top: 0.5rem;
}

/* 垂直轴线 */
.timeline-cards-container::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg,
        rgba(232, 184, 109, 0.5) 0%,
        rgba(139, 126, 216, 0.4) 50%,
        rgba(109, 213, 196, 0.3) 100%);
    border-radius: 1px;
}

/* 单张卡片 */
.tl-card {
    position: relative;
    margin-bottom: 1.2rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    backdrop-filter: blur(12px);
    transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.tl-card:hover {
    border-color: rgba(232, 184, 109, 0.25);
    box-shadow: 0 0 20px rgba(232, 184, 109, 0.08);
}

/* 轴线上的圆点 */
.tl-card::before {
    content: '';
    position: absolute;
    left: -1.7rem;
    top: 1.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--gold);
    box-shadow: 0 0 8px rgba(232, 184, 109, 0.3);
    transition: all 0.3s var(--ease-smooth);
    z-index: 1;
}

.tl-card.has-data::before {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(232, 184, 109, 0.5);
}

/* 卡片头部 */
.tl-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.tl-card-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.tl-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tl-card-age {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.1rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

/* 预设按钮分类组 */
.tl-category {
    margin-bottom: 0.7rem;
}

.tl-category:last-of-type {
    margin-bottom: 0.5rem;
}

.tl-category-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.tl-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tl-preset-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    user-select: none;
}

.tl-preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(232, 184, 109, 0.3);
    color: var(--text-primary);
}

.tl-preset-btn.selected {
    background: rgba(232, 184, 109, 0.15);
    border-color: var(--gold);
    color: var(--gold-bright);
    box-shadow: 0 0 8px rgba(232, 184, 109, 0.2);
}

/* 添加独家记忆 - 可折叠区域 */
.tl-memory-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding: 0.35rem 0;
    font-size: 0.78rem;
    color: var(--teal);
    cursor: pointer;
    transition: color 0.2s var(--ease-smooth);
    user-select: none;
}

.tl-memory-toggle:hover {
    color: var(--gold);
}

.tl-memory-toggle .tl-memory-arrow {
    display: inline-block;
    transition: transform 0.3s var(--ease-smooth);
    font-size: 0.65rem;
}

.tl-memory-toggle.expanded .tl-memory-arrow {
    transform: rotate(90deg);
}

.tl-memory-toggle .tl-memory-hint {
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-left: 0.3rem;
}

.tl-memory-toggle.has-text .tl-memory-hint {
    color: var(--teal);
}

/* 独家记忆输入区域 */
.tl-memory-area {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-smooth);
}

.tl-memory-area.expanded {
    max-height: 200px;
}

.tl-memory-input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: rgba(109, 213, 196, 0.05);
    border: 1px solid rgba(109, 213, 196, 0.15);
    border-radius: var(--radius-sm);
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
    transition: border-color 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}

.tl-memory-input:focus {
    outline: none;
    border-color: rgba(109, 213, 196, 0.4);
    box-shadow: 0 0 12px rgba(109, 213, 196, 0.1);
}

.tl-memory-input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== 响应式：交互阻尼感 ========== */
@media (max-width: 768px) {
    .choice-major::before {
        font-size: 0.65rem;
        top: -1rem;
    }
}
