/* ==========================
   全局样式与重置
   ========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ==========================
   游戏容器 - 手机优先布局
   ========================== */
#game-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background-color: #0a0a0a;
}

/* 主内容区域 */
.game-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.game-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

/* ==========================
   顶部标题栏
   ========================== */
#top-bar.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.header-info {
    font-size: 14px;
    color: #4a9eff;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

#current-chapter,
#current-location {
    font-size: 14px;
}

#current-realm {
    color: #ffaa00;
    font-weight: bold;
    font-size: 14px;
}

/* ==========================
   主内容区 - 可滚动文字区域
   ========================== */

#event-area.text-panel {
    flex: 1;
    background-color: #1a1a1a;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

#event-text.event-text {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e0e0e0;
    padding-bottom: 16px;
}

/* ==========================
   选项按钮区域 - 固定在下方
   ========================== */
#event-options.choice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    position: sticky;
    bottom: 0;
    z-index: 90;
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}

.option-btn {
    padding: 14px 20px;
    min-height: 44px;
    background-color: #2a2a2a;
    border: 1px solid #4a4a4a;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
    border-radius: 8px;
    text-align: left;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: 100%;
    display: flex;
    align-items: center;
}

.option-btn:active {
    background-color: #1a1a1a;
    border-color: #3a3a3a;
    transform: scale(0.97);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ==========================
   状态栏面板 - 简化版（防止裁剪）
   ========================== */

/* 整个状态栏区域，紧跟在选项按钮下面 */
.game-status-panel {
    flex-shrink: 0;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    padding: 8px 12px 10px 12px;
}

/* 现在不再使用折叠 / 压缩模式，直接隐藏这些元素 */
.status-toggle,
.status-compact {
    display: none;
}

/* 状态栏本体：允许高度自适应，绝不裁剪 */
#status-panel.status-bar {
    background-color: transparent;
    padding: 0;
    max-height: none;
    overflow: visible;
}

/* 状态项容器：自动换行，永不被挤出画面 */
.status-content {
    display: flex;
    flex-wrap: wrap;          /* 允许换行 */
    gap: 4px 8px;
    align-items: center;
    justify-content: flex-start;
}

/* 单个状态小 pill */
.status-item {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #2a2a2a;
    border-radius: 999px;
    min-height: 20px;
}

/* 文案样式沿用原来的，只是配合小 pill */
.status-label {
    color: #888;
    font-size: 11px;
    margin: 0;
}

.status-value {
    color: #4a9eff;
    font-weight: bold;
    font-size: 12px;
}

/* ==========================
   战斗界面
   ========================== */
.battle-view {
    display: none;
}

.battle-view.active {
    display: block;
}

.battle-enemy {
    text-align: center;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.battle-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.battle-action-btn {
    padding: 14px 20px;
    min-height: 44px;
    background-color: #3a3a3a;
    border: 1px solid #5a5a5a;
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.battle-action-btn:active {
    background-color: #2a2a2a;
    transform: scale(0.97);
}

/* ==========================
   商店界面
   ========================== */
.shop-view {
    display: none;
}

.shop-view.active {
    display: block;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background-color: #2a2a2a;
    margin-bottom: 12px;
    border-radius: 8px;
    gap: 12px;
}

.shop-item-info {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.shop-item-price {
    color: #ffaa00;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.buy-btn {
    padding: 12px 20px;
    min-height: 44px;
    background-color: #4a9eff;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    white-space: nowrap;
}

.buy-btn:active {
    background-color: #3a8eef;
    transform: scale(0.97);
}

.buy-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.buy-btn:disabled:active {
    transform: none;
}

/* ==========================
   响应式设计 - 桌面端优化
   ========================== */
@media (min-width: 768px) {
    body {
        padding: 20px;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    }

    #game-container {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        max-width: 1000px;
        margin: 0 auto;
        min-height: calc(100vh - 40px);
        border-radius: 12px;
        overflow: visible;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        border: 1px solid #333;
        background-color: #0a0a0a;
    }

    /* 主内容区域 */
    .game-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding-bottom: 0;
    }

    /* 桌面端顶部栏 */
    #top-bar.game-header {
        padding: 16px 24px;
    }

    .header-info {
        font-size: 16px;
    }

    #current-chapter,
    #current-location,
    #current-realm {
        font-size: 16px;
    }

    #event-area.text-panel {
        flex: 1;
        padding: 24px;
    }

    #event-text.event-text {
        font-size: 16px;
        line-height: 1.7;
    }

    /* 桌面端选项按钮区域 */
    #event-options.choice-list {
        position: relative;
        border-top: 1px solid #333;
        padding: 20px 24px;
        max-height: none;
        background-color: #1a1a1a;
    }

    .option-btn {
        padding: 16px 24px;
        font-size: 15px;
    }

    /* 桌面端保留hover效果，但不依赖它 */
    .option-btn:hover {
        background-color: #3a3a3a;
        border-color: #5a5a5a;
    }

    .option-btn:active {
        background-color: #1a1a1a;
        border-color: #3a3a3a;
        transform: scale(0.97);
    }

    /* 桌面端状态栏面板 - 放在右侧，但高度自适应 */
    .game-status-panel {
        width: 240px;
        flex-shrink: 0;
        border-top: none;
        border-left: 1px solid #333;
        background-color: #1a1a1a;
        display: flex;
        flex-direction: column;
        padding: 12px 14px 14px 14px;
        overflow: visible;     /* 不要滚动裁剪 */
    }

    /* 不再需要切换按钮 / 压缩条，直接隐藏 */
    .status-toggle,
    .status-compact {
        display: none;
    }

    /* 桌面端状态栏本体：高度不做限制 */
    #status-panel.status-bar {
        background-color: transparent;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    .status-content {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .status-item {
        justify-content: space-between;
        padding: 4px 8px;
    }

    .status-label {
        font-size: 12px;
    }

    .status-value {
        font-size: 13px;
    }
}

/* ==========================
   超大屏幕优化
   ========================== */
@media (min-width: 1200px) {
    #game-container {
        max-width: 1000px;
    }
}

/* ==========================
   菜单按钮和弹窗样式
   ========================== */
.ui-button {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #2a2a2a;
    border: 1px solid #4a4a4a;
    color: #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.ui-button.secondary {
    background-color: #3a3a3a;
    border-color: #5a5a5a;
}

.ui-button:active {
    background-color: #1a1a1a;
    transform: scale(0.97);
}

/* 菜单弹窗遮罩 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.menu-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.menu-header h2 {
    font-size: 18px;
    color: #4a9eff;
    margin: 0;
}

.menu-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.menu-close-btn:hover,
.menu-close-btn:active {
    color: #e0e0e0;
}

.menu-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    background-color: #2a2a2a;
}

.menu-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 2px solid transparent;
}

.menu-tab.active {
    color: #4a9eff;
    border-bottom-color: #4a9eff;
    background-color: #1a1a1a;
}

.menu-tab:active {
    background-color: #2a2a2a;
}

.menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.menu-tab-content {
    display: none;
}

.menu-tab-content.active {
    display: block;
}

/* 状态页样式 */
.status-info-item {
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}

.status-info-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

.status-info-value {
    color: #4a9eff;
    font-size: 14px;
    font-weight: bold;
}

/* 背包页样式 */
.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 8px;
    gap: 12px;
}

.inventory-item-info {
    flex: 1;
}

.inventory-item-name {
    font-size: 14px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.inventory-item-desc {
    font-size: 12px;
    color: #888;
}

.inventory-item-count {
    color: #4a9eff;
    font-weight: bold;
    font-size: 14px;
}

.inventory-item-actions {
    display: flex;
    gap: 8px;
}

.inventory-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #3a3a3a;
    border: 1px solid #5a5a5a;
    color: #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inventory-action-btn:active {
    background-color: #2a2a2a;
    transform: scale(0.97);
}

.inventory-action-btn[style*="background-color: #4a9eff"] {
    background-color: #4a9eff !important;
    border-color: #3a8eef;
    color: #fff;
}

.inventory-action-btn[style*="background-color: #4a9eff"]:active {
    background-color: #3a8eef !important;
}

/* 装备页样式 */
.equipment-slot {
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 12px;
}

.equipment-slot-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
}

.equipment-slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.equipment-slot-item-name {
    color: #4a9eff;
    font-size: 14px;
}

.equipment-slot-empty {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.equipment-slot-actions {
    display: flex;
    gap: 8px;
}

/* 修炼页样式 */
.cultivate-info {
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 16px;
}

.cultivate-btn {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    background-color: #4a9eff;
    border: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 12px;
}

.cultivate-btn:active {
    background-color: #3a8eef;
    transform: scale(0.98);
}

.cultivate-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.cultivate-message {
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 8px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}

/* 商店样式 */
.shop-content {
    padding: 16px 20px;
}

.shop-gold {
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
    color: #ffaa00;
}

.shop-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 8px;
    gap: 12px;
}

.shop-item-card-info {
    flex: 1;
}

.shop-item-card-name {
    font-size: 14px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.shop-item-card-desc {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.shop-item-card-price {
    color: #ffaa00;
    font-weight: bold;
    font-size: 14px;
}

.shop-item-card-btn {
    padding: 8px 16px;
    font-size: 12px;
    background-color: #4a9eff;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.shop-item-card-btn:active {
    background-color: #3a8eef;
    transform: scale(0.97);
}

.shop-item-card-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}
.battle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.battle-container {
    position: relative;
    background: #1a1a1a;
    border: 2px solid #4a9eff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.battle-action-panel {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.battle-action-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #4a9eff, #2d5aa0);
    color: #fff;
    transition: all 0.3s ease;
}

.battle-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 158, 255, 0.4);
}

.battle-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 战斗弹窗头部（固定） */
.battle-header {
    flex-shrink: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
}

.battle-header h2 {
    margin: 0;
    color: #4a9eff;
    font-size: 18px;
}

.battle-skip-btn {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #3a3a3a;
    border: 1px solid #5a5a5a;
    color: #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.battle-skip-btn:active {
    background-color: #2a2a2a;
    transform: scale(0.97);
}

/* 战斗内容区域（可滚动） */
.battle-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* 战斗结算按钮容器（固定在底部） */
#battle-result-btn-container {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: 1px solid #333;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.battle-loot-panel {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(45, 90, 160, 0.1));
    border: 2px solid #4a9eff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    text-align: center;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.battle-result-btn {
    width: 100%;
    padding: 14px 20px;
    min-height: 44px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #4a9eff, #2d5aa0);
    color: #fff;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.battle-result-btn:active {
    background: linear-gradient(135deg, #3a8eef, #1d4a90);
    transform: scale(0.98);
}

/* ==========================
   主界面（出租屋）样式
   ========================== */
.home-container {
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.home-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.home-card:not(.disabled):hover {
    border-color: #4a9eff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.home-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.home-card-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.home-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.home-card-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.4;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px;
    }

    .home-card {
        min-height: 120px;
        padding: 15px;
    }

    .home-card-icon {
        font-size: 40px;
    }

    .home-card-title {
        font-size: 16px;
    }

    .home-card-desc {
        font-size: 12px;
    }
}

.battle-log {
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 15px;
    max-height: 300px;
    min-height: 150px;
    overflow-y: auto;
    margin: 15px 0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
}

.battle-log-line {
    margin: 5px 0;
    color: #fff;
}

.battle-hp-bar-container {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.battle-hp-bar {
    height: 100%;
    transition: width 0.3s;
}

.enemy-hp-bar {
    background: #ff4444;
}

.player-hp-bar {
    background: #4a9eff;
}

/* ==========================
   通用弹窗样式（Flexbox + 内部滚动）
   ========================== */
.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border: 1px solid #444;
    z-index: 2000;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* NPC 详情弹窗容器 */
#npc-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

/* NPC 弹窗容器 */
.npc-modal-container {
    position: relative;
    background: #1a1a1a;
    border: 2px solid #4a9eff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* NPC 弹窗内容区域（可滚动） */
.npc-modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* NPC 弹窗按钮区域（固定在底部） */
.npc-modal-buttons {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: 1px solid #333;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 手机端优化：确保弹窗不会被浏览器工具栏遮挡 */
@media (max-height: 600px) {
    .modal-container,
    .npc-modal-container,
    .battle-container {
        max-height: 90vh;
    }
}

/* 确保按钮在手机端可点击 */
@media (max-width: 768px) {
    .battle-result-btn,
    .npc-modal-buttons button,
    .npc-modal-buttons .ui-button {
        min-height: 48px;
        font-size: 16px;
    }
    
    .battle-content,
    .npc-modal-content {
        padding: 16px;
    }
    
    .battle-header,
    .npc-modal-buttons {
        padding: 12px 16px;
    }
}