/* ===== 第4关：岔路·抉择 ===== */
.level4-container {
    background: transparent;
}

.level4-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

/* 开场 */
.level4-intro {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 1s ease;
}

.level4-intro h2 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 6px;
    margin-bottom: 20px;
}

.level4-intro p {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto 30px;
}

.crossroads-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: sway 4s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.story-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    min-width: 100px;
}

.preview-icon {
    font-size: 32px;
}

.preview-text {
    font-size: 12px;
    color: var(--text-muted);
}

.preview-arrow {
    font-size: 20px;
    color: var(--text-muted);
}

/* 故事场景 */
.story-scene, .dilemma-scene, .consequence-scene {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    animation: fadeSlideIn 0.5s ease;
}

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

.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scene-time {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scene-icon {
    font-size: 24px;
}

.scene-time-text {
    font-size: 14px;
    font-weight: 500;
}

.scene-location {
    font-size: 12px;
    color: var(--text-muted);
}

.scene-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.scene-narrative {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.scene-narrative p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 16px;
    font-size: 14px;
}

.scene-narrative p:last-child {
    margin-bottom: 0;
}

.scene-actions {
    text-align: center;
}

/* 困境选择 */
.dilemma-setup {
    background: rgba(107, 127, 215, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.dilemma-setup-label {
    font-size: 12px;
    color: var(--primary-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.dilemma-setup p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

.dilemma-question h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

.dilemma-choices {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.dilemma-choice {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dilemma-choice:hover {
    border-color: var(--primary-color);
    background: rgba(107, 127, 215, 0.08);
    transform: translateX(4px);
}

.choice-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 8px;
}

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

.dilemma-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* 结果场景 */
.consequence-choice {
    background: rgba(42, 157, 143, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: center;
}

.consequence-choice-label {
    font-size: 12px;
    color: var(--accent-green);
    margin-bottom: 6px;
}

.consequence-choice-text {
    font-size: 15px;
    font-weight: 500;
}

.consequence-text {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.consequence-text h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.consequence-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

.ethics-insight-box {
    background: linear-gradient(135deg, rgba(107, 127, 215, 0.1), rgba(155, 93, 229, 0.1));
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.ethics-insight-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(107, 127, 215, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ethics-insight-icon {
    font-size: 18px;
}

.ethics-insight-title {
    font-size: 14px;
    font-weight: 500;
}

.ethics-insight-content {
    padding: 20px;
}

.ethics-insight-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 13px;
    margin-bottom: 12px;
}

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

.insight-highlight {
    color: var(--primary-light) !important;
    font-weight: 500;
}

.consequence-actions {
    text-align: center;
}

/* 关卡结局 */
.level4-ending {
    text-align: center;
    padding: 20px;
    animation: fadeIn 1s ease;
    max-width: 700px;
    margin: 0 auto;
}

.ending-night-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ending-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 6px;
    margin-bottom: 10px;
}

.ending-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.day-summary {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: left;
}

.day-summary h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 2px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.summary-scene {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-icon {
    font-size: 20px;
}

.summary-title {
    font-size: 13px;
}

.summary-choice {
    font-size: 12px;
    color: var(--accent-green);
}

.philosophy-box {
    background: linear-gradient(135deg, rgba(107, 127, 215, 0.1), rgba(244, 162, 97, 0.1));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.philosophy-box h3 {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.philosophy-box p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.ethics-principles {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ethics-principle {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 13px;
}

.knowledge-gained {
    background: rgba(42, 157, 143, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: left;
}

.knowledge-gained h4 {
    font-size: 14px;
    color: var(--accent-green);
    margin-bottom: 16px;
    text-align: center;
}

.knowledge-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.knowledge-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.knowledge-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* 响应式 */
@media (max-width: 600px) {
    .story-preview {
        flex-direction: column;
    }
    
    .preview-arrow {
        transform: rotate(90deg);
    }
    
    .scene-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .summary-item {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}
