/* ========================================
   航海路线规划师 - 游戏样式表
   双模式设计: 大宋(淡黄+水墨) / 大元(青灰+朱红)
   ======================================== */

/* CSS Variables - 双模式主题 */
:root {
    /* 大宋模式配色 (默认) */
    --bg-map-color: #f5e6c8;
    --coastline-color: #2b5c8d;
    --route-color: #ffd700;
    --territory-border: transparent;
    --font-style: 'Ma Shan Zheng', 'ZCOOL XiaoWei', serif;
    --decor-pattern: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q25,30 40,50 T70,50 T100,50" fill="none" stroke="%232b5c8d" stroke-width="2" opacity="0.3"/></svg>');
    
    /* 玻璃拟态基础 */
    --glass-bg: rgba(20, 30, 40, 0.75);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* 文字颜色 */
    --text-title: #f5f5dc;
    --text-body: #e8e8e8;
    --text-hint: #a8b5c4;
    --text-gold: #d4a574;
    
    /* 状态颜色 */
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --info-color: #60a5fa;
}

/* 元朝模式配色覆盖 */
[data-mode="yuan"] {
    --bg-map-color: #c8d0d5;
    --coastline-color: #8b2d5c;
    --route-color: #00ffff;
    --territory-border: #dc2626;
    --font-style: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
}

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

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Noto Serif SC', 'Ma Shan Zheng', sans-serif;
    background: #0a0f1a;
}

body {
    background: linear-gradient(135deg, #0a0f1a 0%, #1a1f2e 50%, #0d1520 100%);
}

/* 游戏容器 */
#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* ========================================
   玻璃拟态面板
   ======================================== */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    padding: 20px;
    color: var(--text-body);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ========================================
   头部标题栏
   ======================================== */
.game-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 32px;
}

.game-title {
    font-family: var(--font-style);
    font-size: 28px;
    color: var(--text-title);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 4px;
}

.mode-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.mode-badge {
    background: linear-gradient(135deg, var(--route-color), #1a3a5c);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.mode-year {
    font-size: 11px;
    color: var(--text-hint);
}

/* ========================================
   资源面板 (左上)
   ======================================== */
.resource-panel {
    position: absolute;
    top: 90px;
    left: 20px;
    width: 200px;
    z-index: 50;
}

.panel-title {
    font-size: 16px;
    color: var(--text-gold);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 2px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.resource-item:last-child {
    border-bottom: none;
}

.resource-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.resource-label {
    flex: 1;
    font-size: 13px;
    color: var(--text-hint);
}

.resource-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    min-width: 60px;
    text-align: right;
}

.resource-unit {
    font-size: 11px;
    color: var(--text-hint);
}

/* ========================================
   功能面板 (右上)
   ======================================== */
.function-panel {
    position: absolute;
    top: 90px;
    right: 20px;
    width: 180px;
    z-index: 50;
}

.function-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.func-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-body);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.func-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--route-color);
    transform: translateX(-4px);
}

.func-btn:active {
    transform: translateX(-2px) scale(0.98);
}

.btn-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.btn-text {
    flex: 1;
}

/* ========================================
   地图区域 (中央)
   ======================================== */
.map-area {
    position: absolute;
    top: 80px;
    left: 220px;
    right: 220px;
    bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-map-color);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.3);
    transition: background-color 0.5s ease;
}

.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.map-container:active {
    cursor: grabbing;
}

/* 可缩放视口 */
.map-viewport {
    position: absolute;
    transform-origin: 0 0;
    transition: none;
    will-change: transform;
}

.map-viewport.smooth-transition {
    transition: transform 0.3s ease-out;
}

.map-image {
    display: block;
    width: 5483px;
    height: 3060px;
    user-select: none;
    -webkit-user-drag: none;
    /* 使用平滑插值让放大的地图更清晰 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
}

.ports-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.ports-layer > * {
    pointer-events: auto;
}

.routes-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.routes-svg line, .routes-svg path {
    pointer-events: stroke;
}

.routes-svg .route-group {
    pointer-events: auto;
}

.routes-svg .route-delete-btn {
    pointer-events: auto;
    cursor: pointer;
}

/* 地图控制按钮 */
.map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-title);
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ========================================
   港口节点
   ======================================== */
.port-node {
    position: absolute;
    width: 96px;
    height: 96px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    cursor: pointer;
    transition: left 0.3s ease, top 0.3s ease;
    z-index: 20;
}

.port-node-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.port-node.mother .port-icon {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.7));
}

.port-node.locked .port-icon {
    opacity: 1;
}

.port-node:hover .port-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.port-node.selected .port-icon {
    filter: drop-shadow(0 0 20px rgba(212, 165, 116, 0.8));
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(212, 165, 116, 0.6)); }
    50% { filter: drop-shadow(0 0 25px rgba(212, 165, 116, 0.9)); }
}

/* 解锁港口的 hover 效果 */
.port-node.unlocked {
    cursor: pointer;
}

.port-node.unlocked:hover .port-icon {
    transform: scale(1.15);
}

/* 地图编辑模式样式 */
.ports-layer.editing .port-node {
    cursor: move;
}

.port-node.editable .port-icon {
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
    animation: editPulse 1.5s infinite;
}

.port-node.editable:hover .port-icon {
    transform: scale(1.2);
}

.port-node.dragging .port-icon {
    transform: scale(1.3);
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.9));
}

@keyframes editPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.6); }
    50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.9); }
}

/* 保存港口位置按钮 */
.save-ports-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
}

.save-ports-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* 地图编辑按钮激活状态 */
.func-btn.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
}

.port-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 2px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
}

.port-name {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-shadow: 
        0 0 4px rgba(0,0,0,0.9),
        0 0 8px rgba(0,0,0,0.7),
        0 2px 4px rgba(0,0,0,0.8);
    padding: 2px 8px;
    background: linear-gradient(180deg, rgba(139,69,19,0.85) 0%, rgba(101,50,14,0.9) 100%);
    border-radius: 4px;
    border: 1px solid rgba(212,165,116,0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: 1px;
}

/* 拖拽预览 */
.port-preview {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

.port-preview .port-icon {
    animation: float 1s ease-in-out infinite;
}

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

/* 航线连接预览 */
.route-preview {
    stroke: var(--route-color);
    stroke-width: 4;
    stroke-dasharray: 12, 6;
    fill: none;
    opacity: 0.9;
    filter: drop-shadow(0 0 6px var(--route-color));
    animation: dash 0.4s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -18; }
}

/* 实际航线 */
.route-line {
    stroke: var(--route-color);
    stroke-width: 5;
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px var(--route-color)) drop-shadow(0 0 16px var(--route-color));
    animation: flowRoute 2s linear infinite;
}

.route-line.animated {
    stroke-dasharray: 20, 10;
    animation: flowRoute 1.5s linear infinite, drawRoute 0.8s ease forwards;
}

@keyframes drawRoute {
    from { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
    to { stroke-dasharray: 20, 10; stroke-dashoffset: 0; }
}

@keyframes flowRoute {
    to { stroke-dashoffset: -30; }
}

/* 航线组 hover 效果 */
.route-group:hover .route-line {
    stroke-width: 7;
    filter: drop-shadow(0 0 12px var(--route-color)) drop-shadow(0 0 24px var(--route-color)) drop-shadow(0 0 36px var(--route-color));
}

/* 航线标签背景 */
.route-group text {
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.6);
    stroke-width: 3px;
}

/* 删除按钮动画 */
.route-delete-btn {
    transition: all 0.2s ease;
}

.route-group:hover .route-delete-btn:hover {
    r: 13;
}

/* ========================================
   港口选择面板 (左下)
   ======================================== */
.port-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 200px;
    max-height: 280px;
    z-index: 50;
    overflow: hidden;
}

.port-panel .panel-title {
    margin-bottom: 12px;
}

.port-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.port-list::-webkit-scrollbar {
    width: 4px;
}

.port-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.port-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.port-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--route-color);
}

.port-option.selected {
    background: rgba(212, 165, 116, 0.2);
    border-color: var(--text-gold);
}

.port-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.port-option-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 8px;
}

.port-option-info {
    flex: 1;
}

.port-option-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-title);
}

.port-option-type {
    font-size: 11px;
    color: var(--text-hint);
}

/* ========================================
   AI对话面板 (右下)
   ======================================== */
.ai-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 340px;
    height: 420px;
    display: flex;
    flex-direction: column;
    z-index: 2500;
    overflow: hidden;
    /* 确保flex布局正常工作 */
    flex-shrink: 0;
}

/* AI面板最小化状态 */
.ai-panel.minimized .ai-full {
    display: none;
}

.ai-panel.minimized {
    width: 70px;
    height: 70px;
}

/* AI完整面板 */
.ai-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* 最小化的头像 */
.ai-minimized {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ai-panel.minimized .ai-minimized {
    display: flex;
}

.ai-avatar-mini {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--route-color);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.ai-avatar-mini:hover {
    transform: scale(1.1);
}

.ai-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-status-mini {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
    border: 2px solid var(--glass-bg);
}

.ai-status-mini.alert {
    background: var(--warning-color);
    animation: blink 1s infinite;
}

/* 最小化按钮 */
.ai-minimize {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ai-minimize:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ai-panel.minimized .ai-minimize {
    width: 22px;
    height: 22px;
    font-size: 14px;
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--primary-color);
    border: none;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    /* 固定高度，确保布局可预测 */
    height: 70px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.ai-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--route-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-avatar:hover {
    transform: scale(1.1);
    border-color: var(--text-gold);
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
    border: 2px solid var(--glass-bg);
}

.ai-status.alert {
    background: var(--warning-color);
    animation: blink 1s infinite;
}

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

.ai-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 语音播放指示器 */
.audio-indicator {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2600;
}

.audio-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
}

.audio-wave span {
    width: 3px;
    background: white;
    border-radius: 2px;
    animation: wave 0.6s ease-in-out infinite;
}

.audio-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
.audio-wave span:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.audio-wave span:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { height: 12px; animation-delay: 0.3s; }
.audio-wave span:nth-child(5) { height: 8px; animation-delay: 0.4s; }

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

/* 手动播放按钮 */
.play-audio-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.play-audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-title);
}

.ai-title {
    font-size: 12px;
    color: var(--text-hint);
}

/* AI对话区域布局 - 固定flex布局 */
.ai-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    min-height: 0;
}

.message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
    word-wrap: break-word;
    word-break: break-word;
}

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

.message p {
    margin-bottom: 6px;
}

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

.system-message {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px 12px 12px 4px;
}

.ai-message {
    background: rgba(43, 92, 141, 0.3);
    border-radius: 12px 12px 12px 4px;
    border-left: 3px solid var(--route-color);
}

.user-message {
    background: rgba(212, 165, 116, 0.2);
    border-radius: 12px 12px 4px 12px;
    margin-left: 20px;
}

.chat-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    max-height: 70px;
    overflow-y: auto;
    flex-shrink: 0;
}

.hint-btn {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: var(--text-hint);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hint-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-body);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    height: 50px;
    box-sizing: border-box;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-body);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--route-color);
    background: rgba(255, 255, 255, 0.12);
}

.chat-input::placeholder {
    color: var(--text-hint);
}

.chat-send {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--route-color), #1a3a5c);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(43, 92, 141, 0.4);
}

/* ========================================
   弹窗样式
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUp 0.3s ease;
}

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

.modal-title {
    font-family: var(--font-style);
    font-size: 24px;
    color: var(--text-title);
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 3px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-hint);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-body);
}

/* 模式选择弹窗 */
#mode-modal .modal-content {
    width: 800px;
    padding: 30px;
    overflow: visible;
}

.mode-cards {
    display: flex;
    gap: 24px;
    overflow: visible;
}

.mode-card {
    flex: 1;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.mode-card.selected {
    border-color: var(--text-gold);
    background: rgba(212, 165, 116, 0.1);
}

.mode-card.locked {
    opacity: 0.7;
}

.mode-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mode-card-header h3 {
    font-size: 20px;
    color: var(--text-title);
}

.mode-year-badge {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-hint);
}

.mode-desc {
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 16px;
}

.mode-features {
    list-style: none;
    font-size: 13px;
    color: var(--text-hint);
    margin-bottom: 16px;
}

.mode-features li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.mode-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-gold);
}

.mode-map-preview {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

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

.mode-select-btn {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--route-color), #1a3a5c);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 100;
}

.mode-select-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(43, 92, 141, 0.4);
}

.mode-select-btn:disabled {
    background: #4b5563;
    cursor: not-allowed;
}

.mode-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
}

.mode-lock-overlay span {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-hint);
}

.mode-card:not(.locked) .mode-select-btn {
    z-index: 100;
    position: relative;
}

.mode-card.locked .mode-select-btn {
    z-index: 100;
    position: relative;
}

/* 母港选择弹窗 */
#harbor-modal .modal-content {
    width: 600px;
    padding: 30px;
}

.harbor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.harbor-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.harbor-option:hover {
    border-color: var(--route-color);
    background: rgba(255, 255, 255, 0.08);
}

.harbor-option.selected {
    border-color: var(--text-gold);
    background: rgba(212, 165, 116, 0.15);
}

.harbor-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
}

.port-title-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.harbor-info {
    flex: 1;
}

.harbor-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 4px;
}

.harbor-desc {
    font-size: 13px;
    color: var(--text-hint);
}

.harbor-features {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.harbor-feature {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-body);
}

.confirm-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--text-gold), #b8860b);
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
}

/* 验证结果弹窗 */
.validate-result {
    width: 500px;
    padding: 30px;
}

.validate-content {
    margin-bottom: 24px;
}

.validate-score {
    text-align: center;
    margin-bottom: 24px;
}

.score-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: conic-gradient(var(--success-color) 0%, rgba(255,255,255,0.1) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    border-radius: 50%;
}

.score-value {
    position: relative;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-title);
}

.score-label {
    font-size: 14px;
    color: var(--text-hint);
}

.validate-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.validate-item.success {
    border-left: 3px solid var(--success-color);
}

.validate-item.error {
    border-left: 3px solid var(--error-color);
}

.validate-item.warning {
    border-left: 3px solid var(--warning-color);
}

.validate-icon {
    font-size: 18px;
}

.validate-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-body);
    line-height: 1.5;
}

.validate-source {
    font-size: 11px;
    color: var(--text-hint);
    margin-top: 4px;
    font-style: italic;
}

/* 事件卡弹窗 */
.event-card {
    width: 450px;
    padding: 30px;
    text-align: center;
}

.event-header {
    margin-bottom: 20px;
}

.event-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: block;
}

.event-title {
    font-size: 22px;
    color: var(--text-title);
}

.event-description {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.event-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-choice {
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-body);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-choice:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--route-color);
}

.event-choice .choice-effect {
    display: block;
    font-size: 11px;
    color: var(--text-hint);
    margin-top: 4px;
}

/* 天气信息弹窗 */
.weather-info {
    width: 400px;
    padding: 30px;
    text-align: center;
}

.weather-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.weather-icon {
    font-size: 80px;
}

.weather-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-title);
}

.weather-advice {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
}

/* 课堂报告弹窗 */
.report-document {
    width: 600px;
    padding: 30px;
}

.report-form {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: var(--text-hint);
}

.form-group input {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-body);
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--route-color);
}

.report-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

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

.report-section:last-child {
    margin-bottom: 0;
}

.report-section h4 {
    font-size: 15px;
    color: var(--text-gold);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-body);
}

.report-item.success::before {
    content: '✓';
    color: var(--success-color);
}

.report-item.fail::before {
    content: '✗';
    color: var(--error-color);
}

.report-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.report-stat-label {
    color: var(--text-hint);
}

.report-stat-value {
    color: var(--text-title);
    font-weight: 600;
}

.report-actions {
    display: flex;
    gap: 12px;
}

.report-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, var(--text-gold), #b8860b);
    border: none;
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.4);
}

.report-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-body);
}

.report-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* 港口详情弹窗 */
.port-detail {
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.port-detail .port-name {
    font-size: 24px;
    color: var(--text-title);
    text-align: center;
    margin-bottom: 20px;
}

.port-detail-content {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
}

.port-detail-content p {
    margin-bottom: 12px;
}

.port-info-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-hint);
    margin-right: 8px;
    margin-bottom: 8px;
}

.port-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.port-action-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-body);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.port-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--route-color);
}

.port-action-btn.primary {
    background: linear-gradient(135deg, var(--route-color), #1a3a5c);
    border: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 8px 14px;
}

.btn-port-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
}

/* ========================================
   Toast提示
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.6;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 400px;
    word-wrap: break-word;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

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

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(30px); }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .map-area {
        left: 180px;
        right: 180px;
    }
    
    .resource-panel, .function-panel, .port-panel, .ai-panel {
        transform: scale(0.9);
        transform-origin: top left;
    }
}

@media (max-width: 992px) {
    .map-area {
        left: 20px;
        right: 20px;
        top: 140px;
        bottom: 20px;
    }
    
    .resource-panel, .port-panel {
        display: none;
    }
    
    .function-panel {
        top: 80px;
        right: 50%;
        transform: translateX(50%);
    }
    
    .ai-panel {
        bottom: 50%;
        right: 20px;
        transform: translateY(50%);
        height: 350px;
    }
}

/* ========================================
   装饰元素
   ======================================== */
.decorative-clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.3;
}

.cloud {
    position: absolute;
    background: var(--decor-pattern);
    background-size: 200px;
    animation: floatCloud 60s linear infinite;
}

@keyframes floatCloud {
    from { transform: translateX(-200px); }
    to { transform: translateX(calc(100vw + 200px)); }
}

/* 波浪动画 */
.wave-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,60 Q150,120 300,60 T600,60 T900,60 T1200,60 V120 H0 Z" fill="rgba(43,92,141,0.1)"/></svg>');
    background-size: 600px 100px;
    animation: wave 8s linear infinite;
}

@keyframes wave {
    from { transform: translateX(0); }
    to { transform: translateX(-600px); }
}

/* ========================================
   港口悬停Tooltip
   ======================================== */
.port-tooltip {
    position: fixed;
    z-index: 500;
    background: rgba(15, 25, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 32px 36px;
    min-width: 640px;
    max-width: 1000px;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    color: var(--text-body);
    font-size: 18px;
    line-height: 1.6;
}

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

.port-tooltip.hidden {
    display: none;
}

.tooltip-video {
    width: 100%;
    height: 560px;
    margin: -32px -36px 20px -36px;
    width: calc(100% + 72px);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    background: #000;
}

.tooltip-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-icon {
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.tooltip-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.tooltip-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
}

.tooltip-tags {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.tooltip-tags span {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-hint);
}

.tooltip-tags span.tag-mother {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.tooltip-tags span.tag-locked {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.tooltip-desc {
    font-size: 12px;
    color: var(--text-hint);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tooltip-goods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tooltip-goods .goods-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
}

.tooltip-goods .goods-tag.export {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.tooltip-goods .goods-tag.import {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.tooltip-connections {
    font-size: 11px;
    color: var(--text-hint);
    margin-bottom: 6px;
}

.tooltip-connections strong {
    color: var(--text-body);
}

.tooltip-npc {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: var(--text-hint);
}

.tooltip-npc .npc-avatar {
    font-size: 18px;
}

.tooltip-npc .npc-name {
    color: var(--text-gold);
    font-weight: 600;
}

/* 贸易提示对话框 */
.trade-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.trade-prompt-content {
    background: linear-gradient(135deg, rgba(20, 30, 40, 0.95), rgba(30, 45, 60, 0.95));
    border: 2px solid var(--route-color);
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.2);
    animation: slideUp 0.4s ease;
}

.trade-prompt-content h3 {
    font-size: 24px;
    color: var(--route-color);
    margin-bottom: 16px;
}

.trade-prompt-content p {
    font-size: 15px;
    color: var(--text-body);
    margin-bottom: 10px;
    line-height: 1.6;
}

.trade-prompt-content strong {
    color: var(--text-title);
}

.trade-prompt-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn-trade-yes, .btn-trade-no {
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-trade-yes {
    background: linear-gradient(135deg, var(--route-color), rgba(255, 255, 255, 0.2));
    color: white;
    border: 2px solid var(--route-color);
}

.btn-trade-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--route-color);
    filter: brightness(1.15);
}

.btn-trade-no {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-trade-no:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-body);
}

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

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

/* 进入港口按钮 */
.tooltip-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-enter-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--route-color), rgba(255, 255, 255, 0.2));
    border: 2px solid var(--route-color);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tooltip-enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--route-color);
    filter: brightness(1.1);
}

.tooltip-enter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   货物操作UI（弹窗内）
   ======================================== */
.cargo-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cargo-section h4 {
    font-size: 14px;
    color: var(--text-gold);
    margin-bottom: 10px;
}

.cargo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cargo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cargo-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cargo-item-icon {
    font-size: 20px;
}

.cargo-item-info {
    flex: 1;
}

.cargo-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-title);
}

.cargo-item-price {
    font-size: 11px;
    color: var(--text-hint);
}

.cargo-item .profit {
    color: var(--success-color);
    font-weight: 600;
}

.cargo-item .loss {
    color: var(--error-color);
    font-weight: 600;
}

.cargo-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cargo-btn.load {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.cargo-btn.load:hover {
    background: rgba(74, 222, 128, 0.3);
}

.cargo-btn.unload {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.cargo-btn.unload:hover {
    background: rgba(251, 191, 36, 0.3);
}

.cargo-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ship-cargo {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(43, 92, 141, 0.15);
    border: 1px solid rgba(43, 92, 141, 0.3);
    border-radius: 8px;
}

.ship-cargo-title {
    font-size: 12px;
    color: var(--text-gold);
    margin-bottom: 6px;
}

.ship-cargo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-body);
    padding: 4px 0;
}

/* 启航按钮特殊样式 */
.port-action-btn.primary {
    background: linear-gradient(135deg, var(--route-color), rgba(255, 255, 255, 0.2));
    border: 2px solid var(--route-color);
    color: white;
    font-weight: 600;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px var(--route-color), 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px var(--route-color), 0 0 40px rgba(255, 215, 0, 0.5);
    }
}

.port-action-btn.primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    animation: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 30px var(--route-color);
}

/* NPC对话区 */
.npc-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.npc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.npc-avatar {
    font-size: 28px;
}

.npc-info {
    flex: 1;
}

.npc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-title);
}

.npc-title {
    font-size: 11px;
    color: var(--text-hint);
}

.npc-dialogue {
    padding: 10px 14px;
    background: rgba(43, 92, 141, 0.2);
    border-left: 3px solid var(--route-color);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--text-body);
    line-height: 1.7;
    font-style: italic;
}

.npc-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.npc-choice-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-body);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.npc-choice-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--route-color);
}

/* ========================================
   商船动画
   ======================================== */
.ship-sprite,
.trade-ship-sprite {
    pointer-events: none;
}

.ship-sprite image,
.trade-ship-sprite image {
    display: block;
}

.ship-sprite img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    transition: none;
}

/* 商船尾波效果 - 通过CSS伪元素 */
.ship-wake {
    position: absolute;
    width: 20px;
    height: 4px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 2px;
    pointer-events: none;
    animation: wakeFade 0.8s ease-out forwards;
}

@keyframes wakeFade {
    from { opacity: 0.6; transform: scaleX(1); }
    to { opacity: 0; transform: scaleX(2); }
}

/* 宋元对比弹窗样式 - 全屏 */
.compare-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none !important;
    max-height: none;
    overflow: hidden;
    border-radius: 0;
}

.compare-container {
    display: flex;
    gap: 24px;
    padding: 16px;
    height: 100vh;
    overflow: hidden;
}

.compare-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    z-index: 100;
}

.compare-main-title {
    font-family: var(--font-serif);
    font-size: 24px;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.compare-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.compare-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.compare-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 12px;
    padding-top: 50px; /* 为标题栏留出空间 */
}

.compare-title {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-serif);
    font-size: 18px;
    color: #fff;
    margin: 0;
    padding: 8px 20px;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    z-index: 50;
}

.compare-map-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: var(--muted);
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.compare-map-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 100;
}

.compare-map-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.compare-map-container:hover img {
    transform: scale(1.1);
}

/* 地图容器内的元素也需要放大 */
.compare-map-container:hover .compare-routes-svg,
.compare-map-container:hover .compare-ports-layer {
    transform: scale(1.1);
    transform-origin: center center;
}

.compare-ports-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.compare-ports-layer .port-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    z-index: 10;
}

.compare-ports-layer .port-marker.mother {
    background: #22c55e;
}

.compare-ports-layer .port-marker.transit {
    background: #3b82f6;
}

.compare-ports-layer .port-marker.destination {
    background: #f59e0b;
}

.compare-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.compare-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 12px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.compare-stat .stat-label {
    font-size: 12px;
    color: var(--muted-foreground);
}

.compare-stat .stat-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--foreground);
}

.compare-ports-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    min-height: 80px;
}

.compare-ports-list .port-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.compare-ports-list .port-item:last-child {
    border-bottom: none;
}

.compare-ports-list .port-item .port-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.compare-ports-list .port-item .port-icon.mother { background: #22c55e; }
.compare-ports-list .port-item .port-icon.transit { background: #3b82f6; }
.compare-ports-list .port-item .port-icon.destination { background: #f59e0b; }

.compare-ports-list .port-item .port-name {
    flex: 1;
    font-weight: 500;
}

.compare-ports-list .port-item .port-type {
    font-size: 10px;
    color: var(--muted-foreground);
    padding: 2px 6px;
    background: var(--muted);
    border-radius: 10px;
}

/* 宋元对比弹窗基础样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none !important;
}

/* 对比弹窗航线SVG */
.compare-routes-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.compare-routes-svg .compare-route-line {
    stroke: var(--primary);
    stroke-width: 2;
    stroke-dasharray: 8 4;
    animation: dashMove 1s linear infinite;
    opacity: 0.8;
}

.compare-routes-svg .compare-route-line.song {
    stroke: #22c55e;
}

.compare-routes-svg .compare-route-line.yuan {
    stroke: #f59e0b;
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -12;
    }
}

/* 对比界面港口标记名称 */
.compare-ports-layer .port-marker {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translate(-50%, -50%);
}

.compare-ports-layer .port-marker-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid;
}

.compare-ports-layer .port-marker-icon.mother { border-color: #22c55e; }
.compare-ports-layer .port-marker-icon.transit { border-color: #3b82f6; }
.compare-ports-layer .port-marker-icon.destination { border-color: #f59e0b; }

.compare-ports-layer .port-marker-label {
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 8px rgba(0,0,0,0.5);
    white-space: nowrap;
    padding: 2px 6px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    transition: transform 0.2s;
}

/* 悬停效果 */
.compare-ports-layer .port-marker:hover .port-marker-icon {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.compare-ports-layer .port-marker:hover .port-marker-label {
    transform: scale(1.1);
    background: rgba(0,0,0,0.7);
}

/* 对比界面港口tips样式 */
.compare-tooltip {
    position: fixed;
    z-index: 2000;
    background: #1a1a2e !important;
    border: 2px solid #4a4a6a !important;
    border-radius: 12px;
    padding: 14px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    font-size: 13px;
    color: #e0e0e0;
}

.compare-tooltip.hidden {
    display: none !important;
}

.compare-tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a4a6a;
}

.compare-tooltip-era {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.compare-tooltip-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.compare-tooltip-type {
    font-size: 11px;
    color: #a0a0a0;
    padding: 2px 8px;
    background: #2a2a3e;
    border-radius: 4px;
}

.compare-tooltip-desc {
    color: #c0c0c0;
    line-height: 1.6;
    margin-bottom: 10px;
}

.compare-tooltip-goods {
    margin-bottom: 8px;
}

.compare-tooltip-goods strong {
    font-size: 11px;
    color: #888;
}

.compare-tooltip-features {
    font-size: 12px;
    color: #b0b0b0;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #4a4a6a;
}

.compare-tooltip-video {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.compare-tooltip-video video {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
}

.goods-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin: 2px;
}

.goods-tag.export {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.goods-tag.import {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ========================================
   第一章页面样式
   ======================================== */
.chapter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chapter-modal.hidden {
    display: none !important;
}

.chapter-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 20;
}

.chapter-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chapter-video-container.hidden {
    display: none;
}

.skip-video-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 25;
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.chapter-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 60px;
}

.chapter-content.hidden {
    display: none;
}

.chapter-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #0c1929 100%);
    animation: oceanDeep 20s ease-in-out infinite;
    z-index: 5;
}

@keyframes oceanDeep {
    0%, 100% {
        background: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #0c1929 100%);
    }
    50% {
        background: linear-gradient(135deg, #0c1929 0%, #1e4976 50%, #0a1628 100%);
    }
}

.chapter-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 60px;
}

.chapter-header {
    margin-bottom: 80px;
    animation: fadeInUp 1.5s ease-out;
}

.chapter-title {
    font-family: var(--font-serif);
    font-size: 72px;
    color: #fff;
    margin: 0 0 20px 0;
    text-shadow: 0 0 40px rgba(100, 180, 255, 0.5);
    letter-spacing: 12px;
}

.chapter-subtitle {
    font-family: var(--font-serif);
    font-size: 36px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: normal;
    letter-spacing: 8px;
}

.chapter-narration {
    min-height: 200px;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.narration-text {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    margin: 0;
    animation: fadeIn 0.8s ease-out;
    max-width: 800px;
}

.chapter-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.chapter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.3), rgba(60, 130, 200, 0.2));
    border: 2px solid rgba(100, 180, 255, 0.5);
    border-radius: 50px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chapter-btn:hover {
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.5), rgba(60, 130, 200, 0.3));
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(100, 180, 255, 0.3);
}

.chapter-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.chapter-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.chapter-btn .btn-icon {
    font-size: 20px;
}

.chapter-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.chapter-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

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

/* 气泡动画背景 */
.chapter-bg::before,
.chapter-bg::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 180, 255, 0.1) 0%, transparent 70%);
    animation: bubbleFloat 15s ease-in-out infinite;
}

.chapter-bg::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.chapter-bg::after {
    bottom: 20%;
    right: 15%;
    animation-delay: -7s;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-100px) scale(1.2);
        opacity: 0.5;
    }
}

/* 沉船图片区域 */
.chapter-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 15;
    background: #000;
}

.chapter-image-container.hidden {
    display: none;
}

.chapter-image-wrapper {
    width: 100%;
    height: 100%;
}

.chapter-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wreck-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.captain-image {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 560px;
    height: auto;
    max-height: 760px;
    object-fit: contain;
    object-position: bottom right;
    animation: captainAppear 1.5s ease-out forwards;
    z-index: 100;
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.5));
}

.captain-image.hidden {
    display: none;
}

/* 网络游戏风格NPC对话 */
.npc-dialog {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 30;
    animation: npcDialogAppear 0.3s ease-out;
}

.npc-dialog.hidden {
    display: none;
}

/* 跳过剧情按钮 */
.skip-dialog-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.skip-dialog-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.5);
    color: #fff;
    transform: scale(1.05);
}

.skip-dialog-btn:active {
    transform: scale(0.95);
}

.skip-icon {
    font-size: 16px;
}

.skip-text {
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 1px;
}

.npc-dialog-box {
    display: flex;
    gap: 20px;
    background: linear-gradient(180deg, 
        rgba(25, 30, 50, 0.97) 0%, 
        rgba(15, 20, 35, 0.97) 50%,
        rgba(10, 15, 25, 0.97) 100%);
    border: 3px solid;
    border-image: linear-gradient(180deg, #c9a227, #8b6914) 1;
    border-bottom: none;
    padding: 24px 30px;
    box-shadow: 
        0 -5px 30px rgba(201, 162, 39, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    border-radius: 12px 12px 0 0;
}

.npc-dialog-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #ffd700 20%, 
        #ffd700 80%, 
        transparent 100%);
}

.npc-portrait {
    width: 120px;
    height: 120px;
    border: 3px solid;
    border-image: linear-gradient(180deg, #c9a227, #8b6914) 1;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.npc-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.npc-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
}

.npc-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 2px;
}

.npc-text {
    font-size: 20px;
    color: #fff;
    line-height: 2;
    flex: 1;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    animation: npcTextAppear 0.3s ease-out;
}

.npc-audio-bar .npc-click-hint {
    font-size: 14px;
    color: #888;
    margin-top: 0;
    margin-left: auto;
    animation: hintPulse 1.5s ease-in-out infinite;
    letter-spacing: 1px;
}

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

.npc-audio-bar .npc-click-hint::after {
    content: ' ▼';
    font-size: 10px;
}

/* 潜水员/用户对话样式 */
.npc-dialog-box.user-turn {
    border-image: linear-gradient(180deg, #4a9eff, #2563eb) 1;
    background: linear-gradient(180deg, 
        rgba(30, 45, 70, 0.97) 0%, 
        rgba(20, 35, 60, 0.97) 50%,
        rgba(15, 25, 50, 0.97) 100%);
    box-shadow: 
        0 -5px 30px rgba(74, 158, 255, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.npc-dialog-box.user-turn::before {
    background: linear-gradient(90deg, 
        transparent 0%, 
        #4a9eff 20%, 
        #4a9eff 80%, 
        transparent 100%);
}

.npc-dialog-box.user-turn .npc-portrait {
    border-image: linear-gradient(180deg, #4a9eff, #2563eb) 1;
}

.npc-dialog-box.user-turn .npc-name {
    color: #4a9eff;
    text-shadow: 0 0 15px rgba(74, 158, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes captainAppear {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.continue-btn {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 18px 50px;
    font-size: 20px;
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.4), rgba(60, 130, 200, 0.3));
    border: 2px solid rgba(100, 180, 255, 0.6);
    z-index: 20;
}

.continue-btn:hover {
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.6), rgba(60, 130, 200, 0.4));
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(100, 180, 255, 0.4);
}

/* 动画定义 */
@keyframes npcDialogAppear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes npcTextAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 秘密选择面板 */
.secret-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 35;
    animation: secretPanelFadeIn 0.5s ease-out;
}

.secret-panel.hidden {
    display: none;
}

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

.secret-content {
    text-align: center;
    animation: secretContentSlideUp 0.6s ease-out 0.2s both;
}

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

.secret-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
}

.secret-back-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
    color: #fff;
    transform: translateX(-3px);
}

.secret-title {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0 0 16px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 4px;
}

.secret-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 50px 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.secret-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.secret-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 40px;
    background: linear-gradient(180deg, rgba(40, 35, 25, 0.95) 0%, rgba(25, 20, 15, 0.95) 100%);
    border: 3px solid #c9a227;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(201, 162, 39, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.secret-btn:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: #ffd700;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(255, 215, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.secret-btn:active {
    transform: translateY(-4px) scale(1.02);
}

/* 奇遇辩论按钮 - 特殊样式 */
.secret-btn-debate {
    background: linear-gradient(180deg, rgba(60, 25, 40, 0.95) 0%, rgba(40, 15, 25, 0.95) 100%);
    border-color: #c9466b;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(201, 70, 107, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.secret-btn-debate .secret-text {
    color: #ff7a9a;
}

.secret-btn-debate:hover {
    border-color: #ff7a9a;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(255, 122, 154, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.secret-icon {
    font-size: 48px;
}

.secret-text {
    font-size: 22px;
    color: #ffd700;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* 交通密码页面 */
.traffic-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0d1421 0%, #1a2744 50%, #0d1421 100%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.traffic-page.hidden {
    display: none;
}

.traffic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(201, 162, 39, 0.3);
}

.traffic-title {
    font-size: 32px;
    color: #ffd700;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 4px;
}

.page-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-back-btn:hover {
    background: rgba(100, 150, 200, 0.3);
    border-color: rgba(100, 150, 200, 0.5);
    color: #fff;
    transform: translateX(-3px);
}

.back-icon {
    font-size: 18px;
}

.back-text {
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.traffic-close {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.traffic-close:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.5);
    transform: scale(1.1);
}

.traffic-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

/* 问题卡片 */
.traffic-question {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(30, 40, 60, 0.95) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 2px solid rgba(201, 162, 39, 0.4);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: questionSlideIn 0.5s ease-out;
}

.traffic-question.hidden {
    display: none;
}

@keyframes questionSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-header {
    text-align: center;
    margin-bottom: 30px;
}

.question-num {
    display: inline-block;
    padding: 6px 20px;
    background: linear-gradient(135deg, #c9a227, #8b6914);
    color: #fff;
    font-size: 14px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.question-title {
    font-size: 28px;
    color: #fff;
    margin: 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.question-map {
    text-align: center;
    margin-bottom: 30px;
}

.question-maps {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.map-card {
    flex: 1;
    text-align: center;
}

.map-card h3 {
    color: #ffd700;
    font-size: 18px;
    margin: 0 0 15px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.map-card img {
    width: 100%;
    height: 300px;
    object-fit: fill;
    border-radius: 12px;
    border: 3px solid rgba(201, 162, 39, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 宋元对比内容 */
.song-yuan-compare {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(139, 69, 19, 0.1) 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    border: 2px solid rgba(201, 162, 39, 0.3);
}

.compare-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.compare-title {
    font-size: 36px;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.song-title {
    color: #4a90e2;
    background: linear-gradient(135deg, #4a90e2, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.yuan-title {
    color: #d4af37;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.compare-vs {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

.compare-content {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
}

.compare-col {
    flex: 1;
    text-align: center;
}

.compare-item {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.compare-number {
    font-size: 42px;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    margin-bottom: 8px;
}

.compare-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.compare-highlight {
    font-size: 20px;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.compare-conclusion {
    text-align: center;
    padding: 20px;
    background: rgba(201, 162, 39, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.conclusion-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 10px 0;
    line-height: 1.6;
}

.conclusion-strong {
    font-size: 22px !important;
    color: #ffd700 !important;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-top: 15px !important;
}

/* 结论按钮区域 */
.conclusion-toggle-area {
    text-align: center;
    margin: 30px 0;
}

.conclusion-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(139, 69, 19, 0.2) 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 30px;
    color: #d4af37;
    font-size: 18px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.conclusion-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.4) 0%, rgba(139, 69, 19, 0.4) 100%);
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

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

/* 答案展示区域 */
.answer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 12px;
    color: #81c784;
    font-size: 16px;
    margin-bottom: 12px;
    animation: fadeInUp 0.5s ease-out;
}

.answer-icon {
    font-size: 20px;
    color: #4caf50;
}

.answer-text {
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

/* 结论区域内的答案列表 */
.conclusion-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(76, 175, 80, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.conclusion-answers .answer-item {
    margin-bottom: 0;
    padding: 12px 18px;
    font-size: 15px;
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
}

.conclusion-answers .answer-icon {
    font-size: 18px;
}

@media (max-width: 768px) {
    .conclusion-answers {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .conclusion-answers .answer-item {
        padding: 10px 14px;
        font-size: 14px;
    }
}

.question-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.question-options.vertical {
    flex-direction: column;
    align-items: stretch;
}

.option-btn {
    padding: 18px 35px;
    background: linear-gradient(180deg, rgba(50, 60, 80, 0.9) 0%, rgba(30, 40, 60, 0.9) 100%);
    border: 2px solid rgba(201, 162, 39, 0.5);
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.option-btn:hover {
    background: linear-gradient(180deg, rgba(70, 80, 100, 0.95) 0%, rgba(50, 60, 80, 0.95) 100%);
    border-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.3);
}

.option-btn.correct {
    background: linear-gradient(180deg, rgba(46, 125, 50, 0.9) 0%, rgba(30, 80, 40, 0.9) 100%);
    border-color: #4caf50;
}

.option-btn.wrong {
    background: linear-gradient(180deg, rgba(150, 50, 50, 0.9) 0%, rgba(100, 30, 30, 0.9) 100%);
    border-color: #f44336;
    opacity: 0.7;
}

.option-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.option-text {
    flex: 1;
    text-align: left;
}

/* 结论区域 */
.question-conclusion {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.2) 0%, rgba(139, 105, 20, 0.1) 100%);
    border: 2px solid rgba(201, 162, 39, 0.5);
    border-radius: 12px;
    text-align: center;
    animation: conclusionAppear 0.5s ease-out;
}

.question-conclusion.hidden {
    display: none;
}

@keyframes conclusionAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.conclusion-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.conclusion-text h3 {
    color: #ffd700;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.conclusion-text p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.conclusion-text .highlight {
    color: #ffd700;
    font-weight: bold;
}

/* 问题二背景介绍区域 */
.q2-intro {
    background: linear-gradient(135deg, rgba(40, 50, 70, 0.95) 0%, rgba(30, 40, 60, 0.95) 100%);
    border: 2px solid rgba(201, 162, 39, 0.4);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.intro-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    color: #ffd700;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(201, 162, 39, 0.3);
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.intro-icon {
    font-size: 28px;
}

.intro-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.intro-lead {
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    margin: 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.intro-text {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(139, 105, 20, 0.05) 100%);
    border-left: 4px solid rgba(201, 162, 39, 0.6);
    padding: 18px 20px;
    border-radius: 0 10px 10px 0;
}

.intro-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin: 0 0 10px 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.intro-source {
    display: block;
    font-size: 13px;
    color: rgba(201, 162, 39, 0.8);
    font-style: normal;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.intro-reasons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.intro-reasons.secondary {
    margin-top: 5px;
}

.reason-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.3) 0%, rgba(30, 80, 40, 0.3) 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 10px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.reason-check {
    color: #4caf50;
    font-weight: bold;
    font-size: 18px;
}

/* 玛卡菠萝学习助手 */
.map-helper {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 50;
}

.helper-avatar {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: visible;
    cursor: pointer;
    transition: all 0.3s;
}

.helper-avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(201, 162, 39, 0.5);
    opacity: 0;
    pointer-events: none;
}

.helper-avatar-ring::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    opacity: 0;
}

.helper-avatar > img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.helper-avatar:hover > img {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(201, 162, 39, 0.5);
}

/* 播放时的呼吸光圈效果 */
.helper-avatar.playing .helper-avatar-ring {
    opacity: 1;
    animation: ringPulse 1.5s ease-in-out infinite;
}

.helper-avatar.playing .helper-avatar-ring::before {
    opacity: 1;
    animation: ringPulse 1.5s ease-in-out infinite 0.5s;
}

.helper-avatar.playing > img {
    border-color: #7eb8da;
    box-shadow: 0 0 25px rgba(126, 184, 218, 0.6);
}

@keyframes ringPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}

@keyframes helperBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* 学习助手对话框 */
.helper-dialog {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    background: linear-gradient(180deg, rgba(35, 45, 65, 0.98) 0%, rgba(25, 35, 55, 0.98) 100%);
    border: 2px solid rgba(201, 162, 39, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 51;
    overflow: hidden;
    animation: dialogSlideUp 0.3s ease-out;
}

.helper-dialog.hidden {
    display: none;
}

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

.helper-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.3) 0%, rgba(139, 105, 20, 0.3) 100%);
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
}

.helper-dialog-header h4 {
    margin: 0;
    font-size: 17px;
    color: #ffd700;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.helper-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

/* 问题三答案按钮 */
.q3-answer-section {
    margin-top: 25px;
    text-align: center;
}

.q3-answer-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.8) 0%, rgba(139, 105, 20, 0.8) 100%);
    border: 2px solid rgba(201, 162, 39, 0.6);
    border-radius: 30px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.q3-answer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.4);
    background: linear-gradient(135deg, rgba(201, 162, 39, 1) 0%, rgba(139, 105, 20, 1) 100%);
}

.q3-answer-btn.showed {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.6) 0%, rgba(70, 70, 70, 0.6) 100%);
    border-color: rgba(150, 150, 150, 0.4);
}

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

.q3-answer-content {
    margin-top: 20px;
    text-align: left;
    animation: fadeIn 0.3s ease-out;
}

.q3-answer-content.hidden {
    display: none;
}

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

.q3-answer-content .answer-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.3) 0%, rgba(30, 80, 40, 0.3) 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 12px;
    margin-bottom: 12px;
}

.q3-answer-content .answer-item:last-child {
    margin-bottom: 0;
}

.q3-answer-content .answer-check {
    color: #4caf50;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.q3-answer-content .answer-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.helper-close:hover {
    background: rgba(255, 100, 100, 0.3);
    color: #fff;
}

.helper-dialog-content {
    padding: 18px;
    max-height: 400px;
    overflow-y: auto;
}

.helper-tip {
    display: none;
}

.helper-tip.current {
    display: block;
    padding: 15px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(139, 105, 20, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid rgba(201, 162, 39, 0.6);
    margin-bottom: 15px;
}

.helper-tip.current p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.helper-questions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.helper-q-btn {
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(60, 70, 90, 0.8) 0%, rgba(45, 55, 75, 0.8) 100%);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.helper-q-btn:hover {
    background: linear-gradient(135deg, rgba(80, 90, 110, 0.9) 0%, rgba(65, 75, 95, 0.9) 100%);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.helper-q-btn.active {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.4) 0%, rgba(139, 105, 20, 0.4) 100%);
    border-color: #ffd700;
}

.helper-tip[data-tip] {
    padding: 15px;
    background: linear-gradient(135deg, rgba(50, 60, 80, 0.6) 0%, rgba(40, 50, 70, 0.6) 100%);
    border-radius: 12px;
    margin-bottom: 10px;
}

.helper-tip[data-tip]:last-of-type {
    margin-bottom: 0;
}

.helper-tip .tip-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.helper-tip .tip-content h5 {
    font-size: 16px;
    color: #ffd700;
    margin: 0 0 10px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.helper-tip .tip-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0 0 10px 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.helper-tip .tip-content p:last-child {
    margin-bottom: 0;
}

.tip-example {
    background: rgba(201, 162, 39, 0.1);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px !important;
}

.tip-list {
    margin: 10px 0 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.tip-list li {
    margin-bottom: 6px;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.helper-dialog-footer {
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.helper-nav-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.intro-question {
    background: linear-gradient(135deg, rgba(70, 80, 100, 0.4) 0%, rgba(50, 60, 80, 0.4) 100%);
    border: 1px dashed rgba(201, 162, 39, 0.4);
    border-radius: 10px;
    padding: 15px 18px;
    margin-top: 5px;
}

.intro-question p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.next-question-btn, .complete-btn {
    margin-top: 25px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.next-question-btn:hover, .complete-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.5);
}

.complete-btn {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.complete-btn:hover {
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
}

/* ========================================
   贸易密码页面样式
   ======================================== */

.trade-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #1a0f0a 0%, #2d1810 50%, #1a0f0a 100%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trade-page.hidden {
    display: none;
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(60, 30, 15, 0.95) 0%, rgba(40, 20, 10, 0.95) 100%);
    border-bottom: 3px solid rgba(180, 120, 60, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.trade-title {
    font-size: 32px;
    color: #e8c170;
    margin: 0;
    text-shadow: 0 0 20px rgba(232, 193, 112, 0.5);
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 4px;
}

.trade-close {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(232, 193, 112, 0.4);
    color: #e8c170;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.trade-close:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.5);
    transform: scale(1.1);
}

.trade-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

/* 区块样式 */
.trade-section {
    max-width: 1100px;
    margin: 0 auto 50px auto;
    animation: sectionFadeIn 0.6s ease-out;
}

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

.section-title {
    font-size: 26px;
    color: #e8c170;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(232, 193, 112, 0.3);
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-align: center;
    letter-spacing: 3px;
}

/* 表格样式 */
.trade-table-wrapper {
    background: linear-gradient(135deg, rgba(45, 25, 15, 0.95) 0%, rgba(30, 18, 10, 0.95) 100%);
    border: 2px solid rgba(180, 120, 60, 0.5);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow-x: auto;
}

.trade-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.trade-table th {
    background: linear-gradient(180deg, rgba(180, 120, 60, 0.4) 0%, rgba(140, 90, 40, 0.4) 100%);
    color: #e8c170;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-align: left;
    border-bottom: 2px solid rgba(180, 120, 60, 0.5);
}

.trade-table th:first-child {
    border-radius: 10px 0 0 0;
}

.trade-table th:last-child {
    border-radius: 0 10px 0 0;
}

.trade-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(180, 120, 60, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.trade-table tr:last-child td {
    border-bottom: none;
}

.trade-table tr:hover td {
    background: rgba(180, 120, 60, 0.1);
}

.table-label {
    color: #e8c170 !important;
    font-weight: bold;
    font-size: 17px;
    white-space: nowrap;
}

.table-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cell-input {
    min-width: 80px;
    padding: 10px 15px;
    background: rgba(60, 40, 25, 0.6);
    border: 2px dashed rgba(180, 120, 60, 0.4);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    text-align: center;
    transition: all 0.3s;
}

.cell-input:focus {
    outline: none;
    border-color: #e8c170;
    background: rgba(60, 40, 25, 0.9);
    box-shadow: 0 0 15px rgba(232, 193, 112, 0.3);
}

.cell-input.single {
    min-width: 200px;
}

/* 答案显示区域 - 默认隐藏，验证后显示 */
.cell-answer {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 10px;
    color: #81c784;
    font-size: 15px;
    text-align: center;
    line-height: 1.6;
    animation: fadeInScale 0.4s ease-out;
}

.cell-answer.hidden {
    display: none;
}

.cell-answer.revealed {
    display: block;
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cell-divider {
    color: rgba(232, 193, 112, 0.6);
    font-size: 14px;
}

.table-check {
    text-align: center;
}

.check-btn {
    padding: 10px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(80, 140, 80, 0.6) 0%, rgba(50, 100, 50, 0.6) 100%);
    border: 2px solid rgba(100, 180, 100, 0.5);
    color: #8fbc8f;
    font-size: 14px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.8;
    white-space: nowrap;
}

.check-btn:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(100, 200, 100, 0.4);
    border-color: #81c784;
}

.check-btn.verified {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-color: #66bb6a;
    color: #fff;
    opacity: 1;
    cursor: default;
}

.check-btn.verified:hover {
    transform: none;
    box-shadow: none;
}

/* ========================
   新版验证卡片式布局
   ======================== */

.verify-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.verify-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(45, 25, 15, 0.8);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(180, 120, 60, 0.3);
}

.progress-text {
    color: #e8c170;
    font-size: 14px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: rgba(100, 100, 100, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50, #81c784);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-count {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

/* 卡片网格布局 */
.verify-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .verify-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .verify-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .verify-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 验证卡片 */
.verify-card {
    background: linear-gradient(180deg, rgba(50, 35, 25, 0.95) 0%, rgba(35, 25, 18, 0.95) 100%);
    border: 2px solid rgba(180, 120, 60, 0.3);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.verify-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e8c170, #c9a227, #e8c170);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.verify-card:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 120, 60, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.verify-card:hover::before {
    opacity: 1;
}

.verify-card.verified {
    border-color: rgba(76, 175, 80, 0.5);
    background: linear-gradient(180deg, rgba(40, 60, 40, 0.95) 0%, rgba(30, 45, 30, 0.95) 100%);
}

.verify-card.verified::before {
    background: linear-gradient(90deg, #4caf50, #81c784, #4caf50);
    opacity: 1;
}

/* 卡片头部 */
.verify-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(180, 120, 60, 0.2);
}

.verify-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(180, 120, 60, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(180, 120, 60, 0.3);
}

.verify-title {
    flex: 1;
    color: #e8c170;
    font-size: 17px;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    margin: 0;
}

.verify-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
}

.verify-status[data-status="pending"] {
    background: rgba(150, 150, 150, 0.2);
    color: #aaa;
    border: 1px solid rgba(150, 150, 150, 0.3);
}

.verify-status[data-status="verified"] {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

/* 卡片内容区域 */
.verify-content {
    min-height: 100px;
    margin-bottom: 15px;
}

.verify-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    gap: 8px;
    color: rgba(150, 150, 150, 0.6);
    border: 2px dashed rgba(150, 150, 150, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
}

.placeholder-icon {
    font-size: 24px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 13px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

/* 答案区域 */
.verify-answer {
    animation: fadeInUp 0.4s ease-out;
}

.verify-answer.hidden {
    display: none;
}

.answer-label {
    font-size: 11px;
    color: #81c784;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: bold;
}

.answer-text {
    color: #fff;
    font-size: 15px;
    line-height: 1.8;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.answer-highlight {
    color: #e8c170;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0;
    text-align: center;
    background: rgba(232, 193, 112, 0.1);
    border-radius: 8px;
    margin: 10px 0;
}

.answer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 199, 132, 0.5), transparent);
    margin: 10px 0;
}

.answer-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.6;
}

.answer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.answer-tag {
    padding: 6px 14px;
    background: rgba(180, 120, 60, 0.2);
    border: 1px solid rgba(180, 120, 60, 0.4);
    border-radius: 20px;
    color: #e8c170;
    font-size: 14px;
    font-weight: bold;
}

.answer-tag.tag-import {
    background: rgba(100, 180, 100, 0.15);
    border-color: rgba(100, 180, 100, 0.4);
    color: #81c784;
}

.answer-tag.tag-export {
    background: rgba(100, 150, 200, 0.15);
    border-color: rgba(100, 150, 200, 0.4);
    color: #7eb8e8;
}

/* 验证按钮 */
.verify-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(80, 140, 80, 0.6) 0%, rgba(50, 100, 50, 0.6) 100%);
    border: 2px solid rgba(100, 180, 100, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.verify-btn:hover {
    background: linear-gradient(135deg, rgba(100, 160, 100, 0.7) 0%, rgba(70, 120, 70, 0.7) 100%);
    border-color: #81c784;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.verify-btn.verified {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-color: #66bb6a;
    cursor: default;
}

.verify-btn.verified:hover {
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 16px;
}

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

/* 资源包展示 */
.resource-bags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-bag {
    background: linear-gradient(180deg, rgba(50, 35, 25, 0.9) 0%, rgba(35, 25, 18, 0.9) 100%);
    border: 2px solid rgba(180, 120, 60, 0.4);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.resource-bag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(232, 193, 112, 0.5), transparent);
}

.resource-bag:hover {
    transform: translateY(-5px);
    border-color: rgba(232, 193, 112, 0.7);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.bag-icon {
    font-size: 48px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.bag-name {
    font-size: 20px;
    color: #e8c170;
    font-weight: bold;
    margin-bottom: 6px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.bag-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

/* 市舶司介绍区域 */
.shibo-section {
    background: linear-gradient(180deg, rgba(40, 25, 15, 0.95) 0%, rgba(30, 18, 10, 0.95) 100%);
    border: 3px solid rgba(180, 120, 60, 0.5);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
}

/* 新版市舶司视频区域 - 全宽大图模式 */
.shibo-video-main {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shibo-video-large {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    border: 3px solid rgba(212, 175, 55, 0.4);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.shibo-badge-large {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #1a1a2e;
    padding: 8px 25px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 4px;
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.5);
}

.video-play-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    transition: opacity 0.3s;
}

.play-icon {
    width: 32px;
    height: 32px;
    background: rgba(212, 175, 55, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #1a1a2e;
    margin-left: 4px;
}

.shibo-video-main:hover .video-play-hint {
    opacity: 0;
}

.shibo-video-main.playing .video-play-hint {
    display: none;
}

/* 市舶司信息卡片区域 */
.shibo-info-cards {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.quote-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(139, 69, 19, 0.1) 100%);
}

.quote-mark-large {
    font-size: 40px;
    color: rgba(212, 175, 55, 0.4);
    line-height: 1;
    margin-bottom: 5px;
}

.quote-card blockquote {
    margin: 0;
}

.quote-card blockquote p {
    font-size: 16px;
    color: #e8c170;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 10px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.quote-card cite {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-style: normal;
}

.duties-card h3 {
    color: #d4af37;
    font-size: 18px;
    margin-bottom: 15px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-align: center;
}

.duties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.duty-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s;
}

.duty-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.duty-icon-large {
    font-size: 28px;
    display: block;
    margin-bottom: 6px;
}

.duty-item strong {
    display: block;
    color: #d4af37;
    font-size: 14px;
    margin-bottom: 4px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.duty-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

/* 职能视频弹窗 */
.duty-video-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 180px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.5);
    margin-bottom: 10px;
}

.duty-video-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(212, 175, 55, 0.5);
}

.duty-item:hover .duty-video-tooltip {
    opacity: 1;
    visibility: visible;
}

.duty-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duty-item {
    position: relative;
    cursor: pointer;
}

/* 保留旧版样式兼容 */
.shibo-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 35px;
    align-items: start;
}

.shibo-video-container {
    position: relative;
}

.shibo-video {
    width: 100%;
    border-radius: 16px;
    border: 3px solid rgba(180, 120, 60, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.shibo-badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    color: #fff;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: 4px;
}

.video-hover-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10;
}

.shibo-video-container:hover .video-hover-hint {
    opacity: 0;
}

.shibo-video-container.playing .video-hover-hint {
    display: none;
}

.shibo-info {
    flex: 1;
}

.shibo-quote {
    position: relative;
    margin-bottom: 30px;
}

.quote-mark {
    font-size: 80px;
    color: rgba(232, 193, 112, 0.3);
    font-family: Georgia, serif;
    position: absolute;
    top: -20px;
    left: -10px;
    line-height: 1;
}

.ancient-text {
    background: linear-gradient(135deg, rgba(180, 120, 60, 0.15) 0%, rgba(140, 90, 40, 0.1) 100%);
    border-left: 4px solid rgba(232, 193, 112, 0.6);
    padding: 25px 30px;
    border-radius: 0 12px 12px 0;
    margin: 0;
}

.ancient-text p {
    font-size: 24px;
    color: #e8c170;
    line-height: 1.6;
    margin: 0 0 15px 0;
    font-family: 'ZCOOL XiaoWei', 'SimSun', serif;
}

.ancient-text cite {
    display: block;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-style: normal;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.shibo-desc h3 {
    font-size: 22px;
    color: #e8c170;
    margin: 0 0 20px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 2px;
}

.shibo-duties {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.shibo-duties li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: rgba(60, 40, 25, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(180, 120, 60, 0.3);
    transition: all 0.3s;
}

.shibo-duties li:hover {
    background: rgba(60, 40, 25, 0.8);
    border-color: rgba(232, 193, 112, 0.5);
}

.duty-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.duty-text {
    flex: 1;
}

.duty-text strong {
    display: block;
    color: #e8c170;
    font-size: 17px;
    margin-bottom: 5px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.duty-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.trade-complete-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(180, 120, 60, 0.3);
}

/* 响应式 */
@media (max-width: 900px) {
    .shibo-content {
        grid-template-columns: 1fr;
    }
    
    .shibo-video-container {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .shibo-duties {
        grid-template-columns: 1fr;
    }
    
    .resource-bags {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .resource-bags {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trade-content {
        padding: 20px;
    }
    
    /* 宋元对比响应式 */
    .compare-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .compare-title {
        font-size: 28px;
    }
    
    .compare-number {
        font-size: 32px;
    }
    
    .compare-highlight {
        font-size: 18px;
    }
    
    .conclusion-strong {
        font-size: 18px !important;
    }
    
    /* 市舶司新版响应式 */
    .shibo-video-large {
        height: 200px;
        border-radius: 12px;
    }
    
    .shibo-info-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .duties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .duty-item {
        padding: 10px 6px;
    }
    
    .duty-icon-large {
        font-size: 24px;
    }
    
    .duty-item strong {
        font-size: 13px;
    }
    
    .duty-item p {
        font-size: 11px;
    }
    
    .video-overlay {
        padding: 15px;
    }
    
    .shibo-badge-large {
        font-size: 16px;
        padding: 6px 16px;
    }
    
    .video-play-hint {
        font-size: 12px;
    }
    
    .play-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .quote-mark-large {
        font-size: 32px;
    }
    
    .quote-card blockquote p {
        font-size: 14px;
    }
}

/* ========================================
   文化密码页面样式
   ======================================== */

.culture-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.culture-page.hidden {
    display: none;
}

.culture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(40, 40, 70, 0.95) 0%, rgba(30, 30, 60, 0.95) 100%);
    border-bottom: 3px solid rgba(100, 150, 200, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.culture-title {
    font-size: 32px;
    color: #7eb8da;
    margin: 0;
    text-shadow: 0 0 20px rgba(126, 184, 218, 0.5);
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    letter-spacing: 4px;
}

.culture-close {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(126, 184, 218, 0.4);
    color: #7eb8da;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.culture-close:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.5);
    transform: scale(1.1);
}

/* 通证页面样式 */
.pass-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 1500;
    display: flex;
    flex-direction: column;
}

.pass-page.hidden {
    display: none !important;
}

.pass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.pass-title {
    color: #d4af37;
    font-size: 28px;
    margin: 0;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.pass-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 通证介绍区域 */
.pass-intro {
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 0.6s ease-out;
}

.pass-intro-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

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

.pass-intro-title {
    color: #fff;
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.pass-intro-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin-bottom: 15px;
}

.pass-intro-rules {
    color: rgba(212, 175, 55, 0.9);
    font-size: 16px;
    margin-bottom: 40px;
}

.start-test-btn {
    padding: 18px 50px;
    background: linear-gradient(135deg, #d4af37 0%, #b8942e 100%);
    border: none;
    border-radius: 30px;
    color: #1a1a2e;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

.start-test-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.6);
}

/* 测试区域 */
.test-area {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.5s ease-out;
}

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

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

.test-question {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.test-q-num {
    color: rgba(212, 175, 55, 0.8);
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.test-q-text {
    color: #fff;
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.test-q-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-option-btn {
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
}

.test-option-btn:hover:not(.selected) {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
}

.test-option-btn.selected.correct {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    color: #4caf50;
}

.test-option-btn.selected.wrong {
    background: rgba(244, 67, 54, 0.3);
    border-color: #f44336;
    color: #f44336;
}

.test-option-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.test-q-feedback {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 16px;
}

.test-q-feedback.correct {
    background: rgba(76, 175, 80, 0.15);
    border-left: 4px solid #4caf50;
    color: #81c784;
}

.test-q-feedback.wrong {
    background: rgba(244, 67, 54, 0.15);
    border-left: 4px solid #f44336;
    color: #e57373;
}

.test-next-btn {
    margin-top: 25px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #d4af37 0%, #b8942e 100%);
    border: none;
    border-radius: 25px;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.test-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* 测试结果 */
.test-result {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.test-result.hidden {
    display: none !important;
}

.result-score {
    font-size: 100px;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
    margin-bottom: 20px;
}

.result-comment {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.pass-earned-title {
    font-size: 32px;
    color: #d4af37;
    margin-bottom: 30px;
    animation: pulse 1.5s infinite;
}

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

.pass-display {
    margin: 30px 0;
}

.pass-card {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border-radius: 20px;
    padding: 40px;
    border: 3px solid #d4af37;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
}

.pass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #d4af37, #f4d03f, #d4af37);
}

.pass-card-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.pass-card-title {
    color: #d4af37;
    font-size: 28px;
    margin-bottom: 5px;
}

.pass-card-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.pass-card-body {
    display: flex;
    gap: 30px;
    align-items: center;
}

.pass-card-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #d4af37;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.pass-icon-svg {
    width: 80px;
    height: 80px;
}

.pass-card-info {
    flex: 1;
}

.pass-card-name {
    color: #fff;
    font-size: 22px;
    margin-bottom: 15px;
}

.pass-card-detail {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
}

.pass-card-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pass-card-grade {
    color: #d4af37;
    font-size: 18px;
    font-weight: bold;
}

.pass-card-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.result-fail {
    color: rgba(255, 255, 255, 0.7);
}

.result-fail p {
    font-size: 20px;
    margin-bottom: 30px;
}

.test-again-btn {
    padding: 15px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.test-again-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.culture-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

/* 学习目标 */
.goal-card {
    background: linear-gradient(135deg, rgba(50, 70, 100, 0.8) 0%, rgba(40, 55, 80, 0.8) 100%);
    border: 2px solid rgba(126, 184, 218, 0.4);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.goal-card p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

/* 原因分析 */
.reason-box {
    display: flex;
    align-items: center;
    gap: 25px;
    background: linear-gradient(135deg, rgba(60, 80, 120, 0.6) 0%, rgba(50, 65, 100, 0.6) 100%);
    border: 2px solid rgba(126, 184, 218, 0.5);
    border-radius: 16px;
    padding: 30px;
}

.reason-icon {
    font-size: 56px;
    flex-shrink: 0;
}

.reason-text {
    flex: 1;
}

.reason-text p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.highlight-text {
    color: #7eb8da;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(126, 184, 218, 0.3);
}

.reason-images {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    justify-content: center;
}

.reason-images img {
    max-width: 45%;
    border-radius: 16px;
    border: 3px solid rgba(126, 184, 218, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
}

.reason-images img:hover {
    transform: scale(1.02);
    border-color: rgba(126, 184, 218, 0.7);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* 双向交流图示 */
.exchange-diagram {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-top: 30px;
}

.exchange-card {
    background: linear-gradient(180deg, rgba(40, 50, 70, 0.9) 0%, rgba(30, 40, 60, 0.9) 100%);
    border: 2px solid rgba(126, 184, 218, 0.4);
    border-radius: 20px;
    padding: 25px;
}

.export-card {
    border-color: rgba(100, 200, 150, 0.5);
    background: linear-gradient(180deg, rgba(40, 70, 60, 0.9) 0%, rgba(30, 55, 50, 0.9) 100%);
}

.import-card {
    border-color: rgba(200, 150, 100, 0.5);
    background: linear-gradient(180deg, rgba(70, 55, 40, 0.9) 0%, rgba(55, 45, 30, 0.9) 100%);
}

.exchange-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(126, 184, 218, 0.3);
}

.exchange-header h3 {
    font-size: 22px;
    color: #7eb8da;
    margin: 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.export-card .exchange-header h3 {
    color: #8fd9a8;
}

.import-card .exchange-header h3 {
    color: #e8c170;
}

.exchange-arrow {
    font-size: 28px;
    color: #7eb8da;
}

.exchange-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.exchange-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: all 0.3s;
}

.exchange-item:hover {
    background: rgba(126, 184, 218, 0.15);
    transform: translateX(5px);
}

.item-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.item-text h4 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 4px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.item-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.exchange-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(126, 184, 218, 0.8) 0%, rgba(80, 140, 180, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(126, 184, 218, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(126, 184, 218, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(126, 184, 218, 0.7); }
}

.center-text {
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    text-align: center;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

/* 四大发明 */
.inventions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.invention-card {
    background: linear-gradient(180deg, rgba(50, 60, 80, 0.9) 0%, rgba(35, 45, 65, 0.9) 100%);
    border: 2px solid rgba(126, 184, 218, 0.3);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.invention-card:hover {
    transform: translateY(-8px);
    border-color: rgba(126, 184, 218, 0.6);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.invention-image {
    height: 120px;
    overflow: hidden;
}

.invention-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invention-icon-large {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(180deg, rgba(60, 70, 90, 0.9) 0%, rgba(45, 55, 75, 0.9) 100%);
}

.invention-info {
    padding: 18px;
    text-align: center;
}

.invention-info h3 {
    font-size: 18px;
    color: #7eb8da;
    margin: 0 0 8px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.invention-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.invention-note {
    background: linear-gradient(135deg, rgba(80, 100, 140, 0.4) 0%, rgba(65, 85, 120, 0.4) 100%);
    border-left: 4px solid rgba(126, 184, 218, 0.6);
    padding: 20px 25px;
    border-radius: 0 12px 12px 0;
}

.invention-note p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

/* 影响区域 */
.impact-content {
    background: linear-gradient(135deg, rgba(50, 60, 80, 0.8) 0%, rgba(40, 50, 70, 0.8) 100%);
    border: 2px solid rgba(126, 184, 218, 0.4);
    border-radius: 20px;
    padding: 30px;
}

.impact-text {
    text-align: center;
    margin-bottom: 30px;
}

.impact-text h3 {
    font-size: 24px;
    color: #7eb8da;
    margin: 0 0 15px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.impact-text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.spread-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.spread-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.spread-node.center {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    justify-content: center;
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.5);
}

.spread-node.center span {
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.spread-node.center small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.spread-node.target {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(126, 184, 218, 0.8) 0%, rgba(80, 140, 180, 0.8) 100%);
    justify-content: center;
    box-shadow: 0 0 20px rgba(126, 184, 218, 0.4);
}

.spread-node.target span {
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.spread-node.target small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

.impact-desc {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid rgba(126, 184, 218, 0.3);
}

.impact-desc p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin: 0;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
    text-align: center;
}

/* 特点总结 */
.summary-section {
    background: linear-gradient(180deg, rgba(40, 50, 70, 0.95) 0%, rgba(30, 40, 60, 0.95) 100%);
    border: 3px solid rgba(126, 184, 218, 0.5);
    border-radius: 20px;
    padding: 35px;
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px 35px;
    background: linear-gradient(135deg, rgba(126, 184, 218, 0.2) 0%, rgba(80, 140, 180, 0.2) 100%);
    border: 2px solid rgba(126, 184, 218, 0.4);
    border-radius: 16px;
    transition: all 0.3s;
    min-width: 140px;
}

.feature-item:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, rgba(126, 184, 218, 0.35) 0%, rgba(80, 140, 180, 0.35) 100%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 48px;
}

.feature-text {
    font-size: 20px;
    color: #7eb8da;
    font-weight: bold;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.culture-complete-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(126, 184, 218, 0.3);
}

/* 响应式 */
@media (max-width: 1000px) {
    .exchange-diagram {
        grid-template-columns: 1fr;
    }
    
    .exchange-center {
        transform: rotate(90deg);
    }
    
    .inventions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .inventions-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        flex-direction: column;
        align-items: center;
    }
    
    .culture-content {
        padding: 15px;
    }
    
    .exchange-items {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        gap: 15px;
    }
    
    .feature-item {
        padding: 18px 25px;
        min-width: 120px;
    }
}

/* ========================================
   移动端优化 - 交通密码页面
   ======================================== */

@media (max-width: 768px) {
    /* 交通页面 */
    .traffic-header {
        padding: 15px 20px;
    }
    
    .traffic-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .traffic-content {
        padding: 20px 15px;
    }
    
    .traffic-question {
        padding: 20px 15px;
    }
    
    .question-title {
        font-size: 20px !important;
    }
    
    /* 问题二背景介绍移动端 */
    .q2-intro {
        padding: 18px 15px;
        margin-bottom: 20px;
    }
    
    .intro-title {
        font-size: 18px;
    }
    
    .intro-lead {
        font-size: 16px;
    }
    
    .intro-text p {
        font-size: 14px;
    }
    
    .reason-item {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .intro-question p {
        font-size: 13px;
    }
    
    .question-options {
        flex-direction: column;
    }
    
    .option-btn {
        padding: 15px 20px;
        font-size: 15px;
    }
    
    .question-maps {
        flex-direction: column;
    }
    
    .map-card img {
        height: 200px;
    }
    
    .compare-map-container {
        max-height: 300px;
        overflow: hidden;
    }
    
    /* 贸易页面 */
    .trade-header {
        padding: 15px 20px;
    }
    
    .trade-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .trade-content {
        padding: 20px 15px;
    }
    
    .trade-table-wrapper {
        padding: 15px;
        overflow-x: auto;
    }
    
    .trade-table {
        font-size: 13px;
    }
    
    .trade-table th,
    .trade-table td {
        padding: 10px 8px;
    }
    
    .cell-input {
        min-width: 60px;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .resource-bags {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .bag-icon {
        font-size: 36px;
    }
    
    .bag-name {
        font-size: 16px;
    }
    
    .shibo-section {
        padding: 20px 15px;
    }
    
    .shibo-content {
        grid-template-columns: 1fr;
    }
    
    .shibo-duties {
        grid-template-columns: 1fr;
    }
    
    .ancient-text p {
        font-size: 18px;
    }
    
    /* 文化页面 */
    .culture-header {
        padding: 15px 20px;
    }
    
    .culture-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .culture-content {
        padding: 15px;
    }
    
    .culture-section {
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .goal-card p {
        font-size: 15px;
    }
    
    .reason-box {
        flex-direction: column;
        text-align: center;
    }
    
    .reason-icon {
        font-size: 40px;
    }
    
    .reason-text p {
        font-size: 16px;
    }
    
    .reason-images {
        flex-direction: column;
    }
    
    .reason-images img {
        max-width: 100%;
    }
    
    .exchange-diagram {
        flex-direction: column;
        gap: 20px;
    }
    
    .exchange-center {
        transform: none;
    }
    
    .center-circle {
        width: 80px;
        height: 80px;
    }
    
    .center-text {
        font-size: 14px;
    }
    
    .exchange-card {
        width: 100%;
    }
    
    .exchange-items {
        grid-template-columns: 1fr;
    }
    
    .item-icon {
        font-size: 24px;
    }
    
    .item-text h4 {
        font-size: 14px;
    }
    
    .invention-card {
        margin-bottom: 15px;
    }
    
    .spread-diagram {
        flex-direction: column;
        gap: 20px;
    }
    
    .spread-node.center {
        width: 100px;
        height: 100px;
    }
    
    .spread-node.target {
        width: 80px;
        height: 80px;
    }
    
    .impact-text h3 {
        font-size: 18px;
    }
    
    .impact-text p,
    .impact-desc p {
        font-size: 14px;
    }
    
    .feature-item {
        padding: 15px 20px;
        min-width: 100px;
    }
    
    .feature-icon {
        font-size: 36px;
    }
    
    .feature-text {
        font-size: 16px;
    }
    
    /* 跳过按钮 */
    .skip-dialog-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .skip-text {
        display: none;
    }
    
    .skip-icon {
        font-size: 20px;
    }
    
    /* 秘密选择面板 */
    .secret-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .secret-btn {
        padding: 18px 25px;
    }
    
    .secret-text {
        font-size: 18px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 400px) {
    .traffic-title,
    .trade-title,
    .culture-title {
        font-size: 18px;
    }
    
    .question-title {
        font-size: 17px !important;
    }
    
    .section-title {
        font-size: 17px;
    }
    
    .option-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .resource-bags {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bag-icon {
        font-size: 30px;
    }
    
    .bag-name {
        font-size: 14px;
    }
    
    .bag-desc {
        font-size: 11px;
    }
    
    .ancient-text p {
        font-size: 16px;
    }
}

/* ========================================
   横屏模式适配
   ======================================== */

@media (orientation: landscape) and (max-height: 500px) {
    /* 横屏小屏设备 */
    .traffic-page,
    .trade-page,
    .culture-page {
        height: auto;
        min-height: 100vh;
    }
    
    .traffic-header,
    .trade-header,
    .culture-header {
        padding: 8px 20px;
        min-height: 50px;
    }
    
    .traffic-title,
    .trade-title,
    .culture-title {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .traffic-close,
    .trade-close,
    .culture-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .traffic-content,
    .trade-content,
    .culture-content {
        padding: 15px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .traffic-question,
    .trade-section,
    .culture-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .question-header {
        margin-bottom: 15px;
    }
    
    .question-num {
        font-size: 12px;
        padding: 4px 12px;
    }
    
    .question-title {
        font-size: 16px !important;
    }
    
    .question-map {
        margin-bottom: 15px;
    }
    
    .compare-map-container {
        max-height: 180px;
    }
    
    .question-options {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .option-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .question-conclusion {
        padding: 15px;
        margin-top: 15px;
    }
    
    .conclusion-icon {
        font-size: 32px;
    }
    
    .conclusion-text h3 {
        font-size: 16px;
    }
    
    .conclusion-text p {
        font-size: 13px;
    }
    
    .next-question-btn,
    .complete-btn {
        padding: 10px 25px;
        font-size: 14px;
        margin-top: 15px;
    }
    
    /* 宋元对比双地图横屏 */
    .question-maps {
        flex-direction: row !important;
        gap: 15px;
    }
    
    .map-card {
        flex: 1;
    }
    
    .map-card h3 {
        font-size: 14px;
    }
    
    .map-card img {
        height: 150px;
    }
    
    /* 贸易页面横屏 */
    .goal-card {
        padding: 15px;
    }
    
    .goal-card p {
        font-size: 14px;
    }
    
    .trade-table-wrapper {
        padding: 10px;
    }
    
    .trade-table th,
    .trade-table td {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .cell-input {
        min-width: 50px;
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .resource-bags {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }
    
    .resource-bag {
        padding: 12px 8px;
    }
    
    .bag-icon {
        font-size: 28px;
    }
    
    .bag-name {
        font-size: 12px;
    }
    
    .bag-desc {
        font-size: 10px;
        display: none;
    }
    
    .shibo-content {
        flex-direction: row !important;
        gap: 15px;
    }
    
    .shibo-video-container {
        width: 200px;
        flex-shrink: 0;
    }
    
    .shibo-info {
        flex: 1;
    }
    
    .ancient-text {
        padding: 12px 15px;
    }
    
    .ancient-text p {
        font-size: 14px;
    }
    
    .ancient-text cite {
        font-size: 11px;
    }
    
    .shibo-duties {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .shibo-duties li {
        padding: 10px;
    }
    
    .duty-icon {
        font-size: 20px;
    }
    
    .duty-text strong {
        font-size: 13px;
    }
    
    .duty-text p {
        font-size: 11px;
    }
    
    /* 文化页面横屏 */
    .reason-box {
        padding: 15px;
        gap: 15px;
    }
    
    .reason-icon {
        font-size: 36px;
    }
    
    .reason-text p {
        font-size: 14px;
    }
    
    .reason-images {
        flex-direction: row !important;
    }
    
    .reason-images img {
        max-width: 48%;
    }
    
    .exchange-diagram {
        flex-direction: row !important;
    }
    
    .exchange-center {
        transform: none !important;
    }
    
    .exchange-card {
        flex: 1;
    }
    
    .exchange-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .inventions-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .invention-image {
        height: 80px;
    }
    
    .invention-icon-large {
        height: 80px;
        font-size: 40px;
    }
    
    .invention-info {
        padding: 10px;
    }
    
    .invention-info h3 {
        font-size: 13px;
    }
    
    .invention-info p {
        font-size: 10px;
    }
    
    .invention-note {
        padding: 12px 15px;
    }
    
    .invention-note p {
        font-size: 12px;
    }
    
    .spread-diagram {
        flex-direction: row !important;
    }
    
    .spread-node.center {
        width: 80px;
        height: 80px;
    }
    
    .spread-node.target {
        width: 70px;
        height: 70px;
    }
    
    .features-list {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .feature-item {
        padding: 12px 18px;
    }
    
    .feature-icon {
        font-size: 28px;
    }
    
    .feature-text {
        font-size: 14px;
    }
    
    /* 秘密选择面板横屏 */
    .secret-content {
        padding: 15px;
    }
    
    .secret-title {
        font-size: 18px;
    }
    
    .secret-subtitle {
        font-size: 14px;
    }
    
    .secret-buttons {
        flex-direction: row !important;
    }
    
    .secret-btn {
        padding: 15px 20px;
    }
    
    .secret-icon {
        font-size: 24px;
    }
    
    .secret-text {
        font-size: 14px;
    }
    
    /* 跳过按钮横屏 */
    .skip-dialog-btn {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .skip-text {
        display: none;
    }
}

/* 横屏大平板 */
@media (orientation: landscape) and (min-height: 501px) and (max-height: 768px) {
    .traffic-content,
    .trade-content,
    .culture-content {
        padding: 20px;
    }
    
    .traffic-question,
    .trade-section,
    .culture-section {
        padding: 20px;
    }
    
    .question-title {
        font-size: 18px !important;
    }
    
    .compare-map-container {
        max-height: 220px;
    }
    
    .option-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .inventions-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .shibo-duties {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .exchange-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========================
   奇遇辩论页面样式
   ======================== */

.debate-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeIn 0.5s ease;
}

.debate-header {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(26, 26, 46, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid rgba(201, 70, 107, 0.3);
    z-index: 100;
}

.debate-title {
    color: #ff7a9a;
    font-size: 28px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 122, 154, 0.5);
}

.debate-subtitle {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 122, 154, 0.7);
    font-size: 13px;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.debate-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

/* 辩论主题区 */
.debate-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(201, 70, 107, 0.15) 0%, rgba(232, 193, 112, 0.1) 100%);
    border: 2px solid rgba(201, 70, 107, 0.3);
    border-radius: 16px;
    margin-bottom: 30px;
}

.theme-icon {
    font-size: 48px;
}

.theme-text {
    text-align: center;
}

.theme-text h3 {
    color: #e8c170;
    font-size: 14px;
    margin: 0 0 5px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.theme-text p {
    color: #fff;
    font-size: 20px;
    margin: 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* NPC展示区 */
.debate-npcs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.npc-card {
    background: linear-gradient(180deg, rgba(50, 35, 25, 0.95) 0%, rgba(35, 25, 18, 0.95) 100%);
    border: 2px solid rgba(180, 120, 60, 0.4);
    border-radius: 16px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 220px;
    transition: all 0.3s ease;
    position: relative;
}

.npc-card:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 120, 60, 0.6);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.npc-card.speaking {
    border-color: #ff7a9a;
    box-shadow: 0 0 30px rgba(255, 122, 154, 0.3);
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(255, 122, 154, 0.6); }
    50% { border-color: rgba(255, 122, 154, 1); }
}

.npc-avatar {
    font-size: 48px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(180, 120, 60, 0.15);
    border-radius: 50%;
    border: 2px solid rgba(180, 120, 60, 0.3);
}

.npc-info h4 {
    color: #e8c170;
    font-size: 18px;
    margin: 0 0 5px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.npc-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0;
}

.npc-status {
    position: absolute;
    top: -10px;
    right: 15px;
    padding: 4px 12px;
    background: rgba(100, 100, 100, 0.3);
    border: 1px solid rgba(150, 150, 150, 0.3);
    border-radius: 15px;
    font-size: 11px;
    color: #aaa;
    transition: all 0.3s;
}

.npc-card.speaking .npc-status {
    background: rgba(255, 122, 154, 0.2);
    border-color: rgba(255, 122, 154, 0.5);
    color: #ff7a9a;
}

.debate-vs {
    font-size: 32px;
    font-weight: bold;
    color: #ff7a9a;
    text-shadow: 0 0 20px rgba(255, 122, 154, 0.5);
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

/* 辩论对话区 */
.debate-dialogue {
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.95) 0%, rgba(25, 25, 40, 0.95) 100%);
    border: 2px solid rgba(201, 70, 107, 0.2);
    border-radius: 16px;
    padding: 25px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 25px;
}

.dialogue-welcome {
    text-align: center;
    padding: 40px 20px;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.dialogue-welcome h3 {
    color: #e8c170;
    font-size: 20px;
    margin: 0 0 10px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.dialogue-welcome p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 5px 0;
}

.welcome-hint {
    color: #ff7a9a !important;
    font-size: 13px !important;
    margin-top: 15px !important;
}

/* 对话消息 */
.dialogue-message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease;
}

.dialogue-message.marco {
    flex-direction: row;
}

.dialogue-message.pugeng {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(180, 120, 60, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.dialogue-message.marco .message-avatar {
    background: rgba(100, 150, 200, 0.2);
}

.dialogue-message.pugeng .message-avatar {
    background: rgba(200, 150, 100, 0.2);
}

.message-content {
    flex: 1;
    background: rgba(50, 50, 70, 0.5);
    border-radius: 12px;
    padding: 15px;
    position: relative;
}

.dialogue-message.marco .message-content {
    border-left: 3px solid #6496c8;
}

.dialogue-message.pugeng .message-content {
    border-right: 3px solid #c89664;
}

.message-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.dialogue-message.marco .message-name {
    color: #7eb8e8;
}

.dialogue-message.pugeng .message-name {
    color: #e8c170;
}

.message-text {
    color: #fff;
    font-size: 15px;
    line-height: 1.8;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

.message-text.streaming::after {
    content: '|';
    animation: blink 1s infinite;
    color: #ff7a9a;
}

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

/* 预设问题区 */
.debate-questions {
    margin-bottom: 25px;
}

.questions-title {
    color: #e8c170;
    font-size: 16px;
    margin: 0 0 15px 0;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    text-align: center;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 992px) {
    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .questions-grid {
        grid-template-columns: 1fr;
    }
}

.question-btn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(201, 70, 107, 0.1) 0%, rgba(201, 70, 107, 0.05) 100%);
    border: 2px solid rgba(201, 70, 107, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.question-btn:hover {
    background: linear-gradient(135deg, rgba(201, 70, 107, 0.2) 0%, rgba(201, 70, 107, 0.1) 100%);
    border-color: rgba(201, 70, 107, 0.5);
    transform: translateY(-2px);
}

.question-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.q-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 70, 107, 0.3);
    border-radius: 50%;
    color: #ff7a9a;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.q-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
}

/* 用户输入区 */
.debate-input-area {
    background: rgba(30, 30, 50, 0.5);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(201, 70, 107, 0.2);
}

.input-hint {
    color: rgba(255, 122, 154, 0.8);
    font-size: 13px;
    margin-bottom: 10px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
}

.input-row {
    display: flex;
    gap: 10px;
}

.debate-input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(50, 50, 70, 0.5);
    border: 2px solid rgba(201, 70, 107, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: 'SimSun', 'Microsoft YaHei', sans-serif;
    transition: all 0.3s;
}

.debate-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.debate-input:focus {
    outline: none;
    border-color: rgba(201, 70, 107, 0.6);
    background: rgba(50, 50, 70, 0.7);
}

.debate-send-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(201, 70, 107, 0.8) 0%, rgba(180, 50, 90, 0.8) 100%);
    border: 2px solid rgba(201, 70, 107, 0.5);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.debate-send-btn:hover {
    background: linear-gradient(135deg, rgba(201, 70, 107, 1) 0%, rgba(180, 50, 90, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 70, 107, 0.4);
}

.debate-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.send-icon {
    font-size: 16px;
}

/* 辩论页面响应式 */
@media (max-width: 768px) {
    .debate-header {
        padding: 12px 15px;
    }
    
    .debate-title {
        font-size: 22px;
    }
    
    .debate-subtitle {
        font-size: 11px;
    }
    
    .debate-content {
        padding: 20px 15px;
    }
    
    .debate-npcs {
        flex-direction: column;
        gap: 15px;
    }
    
    .debate-vs {
        font-size: 24px;
    }
    
    .npc-card {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .debate-send-btn {
        justify-content: center;
    }
}
