* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #0f3460;
    --quality-gray: #808080;
    --quality-green: #2ecc71;
    --quality-blue: #3498db;
    --quality-purple: #9b59b6;
    --quality-orange: #f39c12;
    --quality-red: #e74c3c;
    --quality-gold: #ffd700;
    --quality-platinum: #e5e4e2;
    --quality-diamond: #b9f2ff;
    --quality-darkgold: #d4af37;
    --quality-mythic: #ff1493;
    --quality-supreme: #ff4500;
    --quality-perfect: #00ff7f;
    --quality-peerless: #ff00ff;
    /* 安全区域适配 */
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: auto;
    letter-spacing: 0.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 顶部状态栏 - 优化高度 */
.top-bar {
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a3e 100%);
    padding: calc(6px + var(--safe-area-inset-top)) 12px 6px;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}

.status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.char-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.char-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.char-level {
    font-size: 13px;
    color: var(--secondary-color);
    background: rgba(243, 156, 18, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.char-exp {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(160, 160, 160, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 400;
}

.resources {
    display: flex;
    gap: 20px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.resource-icon {
    font-size: 18px;
}

.resource-value {
    font-size: 14px;
    font-weight: 600;
}

/* 药水BUFF状态显示 */
.buff-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    font-size: 12px;
}

.buff-item {
    padding: 2px 8px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 10px;
    color: white;
    font-size: 11px;
    animation: pulse 2s infinite;
}

.buff-item.exp {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.buff-item.drop {
    background: linear-gradient(135deg, #e17055, #fdcb6e);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 主内容区域 */
.main-content {
    margin-top: calc(50px + var(--safe-area-inset-top));
    margin-bottom: calc(55px + var(--safe-area-inset-bottom));
    padding: 10px;
    overflow: visible;
    min-height: 0;
    flex: 1;
}

/* 确保body和html的高度为100% */
html, body {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 主容器使用flex布局 */
body {
    display: flex;
    flex-direction: column;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 特殊处理：背包和技能页面使用flex布局 */
#inventoryPage.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 105px - var(--safe-area-inset-top) - var(--safe-area-inset-bottom));
    overflow: hidden;
}

#skillPage.active {
    display: flex;
}

/* 战斗页面使用flex布局 */
#battlePage.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
}

/* 按钮样式 */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    touch-action: manipulation;
}

/* 通用按钮样式优化 */
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    min-width: 80px;
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
    .btn {
        padding: 12px 18px;
        font-size: 15px;
        min-width: 90px;
    }
    
    /* 调整底部导航栏按钮 */
    .nav-btn {
        padding: 10px 12px;
        min-width: 50px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 10px;
    }
    
    /* 调整区域选择按钮 */
    .area-buttons {
        gap: 6px;
    }
    
    .btn-select-area,
    .btn-elite-dungeon,
    .btn-hell-dungeon {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* 调整商店标签页 */
    .shop-tab,
    .skill-tab {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* 调整背包过滤按钮 */
    .filter-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* 调整战斗日志 */
    .battle-log {
        padding: 10px;
        min-height: 150px;
    }
    
    .log-entry {
        font-size: 12px;
        padding: 3px 0;
    }
    
    /* 调整区域选择器 */
    .area-selector {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .area-name {
        font-size: 16px;
    }
    
    /* 调整主内容区域 */
    .main-content {
        padding: 8px;
        margin-top: calc(80px + var(--safe-area-inset-top)); /* 调整顶部边距 */
    }
    
    /* 调整顶部状态栏 */
    .top-bar {
        padding: calc(6px + var(--safe-area-inset-top)) 8px 6px;
        height: auto;
        min-height: 70px;
    }
    
    .status-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    /* 第一排：职业、等级、经验值 */
    .char-info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    
    .char-name {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: var(--primary-color) !important;
    }
    
    .char-level {
        font-size: 12px !important;
        padding: 2px 8px !important;
        background: rgba(243, 156, 18, 0.2) !important;
        border-radius: 12px !important;
        font-weight: 500 !important;
    }
    
    .char-exp {
        font-size: 11px !important;
        padding: 2px 6px !important;
        background: rgba(160, 160, 160, 0.2) !important;
        border-radius: 10px !important;
        font-weight: 400 !important;
    }
    
    /* 第二排：资源和摸鱼模式按钮 */
    .resources {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    .resource-item {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex-shrink: 0 !important;
    }
    
    .resource-icon {
        font-size: 16px !important;
    }
    
    .resource-value {
        font-size: 12px !important;
        font-weight: 600 !important;
    }
    
    .btn-fish-mode {
        padding: 4px 8px !important;
        font-size: 11px !important;
        min-width: 70px !important;
        flex-shrink: 0 !important;
    }
    
    /* 调整副本项目 */
    .dungeon-item {
        padding: 12px 14px;
    }
    
    .dungeon-item-info .dungeon-name {
        font-size: 14px;
    }
    
    .dungeon-item-info .dungeon-meta {
        font-size: 11px;
    }
    
    /* 调整挑战按钮 */
    .btn-challenge,
    .btn-auto-dungeon {
        padding: 6px 12px;
        font-size: 12px;
    }
}

.area-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-select-area,
.btn-elite-dungeon,
.btn-hell-dungeon {
    flex: 1;
    min-width: 90px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
    cursor: pointer;
    border: none;
    color: #fff;
}

.btn-select-area {
    background: var(--primary-color);
}
.btn-select-area:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.btn-elite-dungeon {
    background: linear-gradient(135deg, #8b3cf7, #6d28d9);
    border: 1px solid #7c3aed;
}
.btn-elite-dungeon:hover {
    background: linear-gradient(135deg, #9d4ffe, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109,40,217,0.4);
}

.btn-hell-dungeon {
    background: linear-gradient(135deg, #c0392b, #922b21);
    border: 1px solid #e74c3c;
}
.btn-hell-dungeon:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}

.btn-tower {
    flex: 1;
    min-width: 90px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 1px solid #fbbf24;
}
.btn-tower:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251,191,36,0.4);
}

/* 副本模态框样式 */
.dungeon-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(74,144,226,0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
}

.dungeon-lock-tip {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px 0;
    font-size: 14px;
}

.dungeon-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dungeon-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.dungeon-item:hover {
    border-color: var(--primary-color);
    background: rgba(74,144,226,0.08);
}

.dungeon-item.locked {
    opacity: 0.5;
    pointer-events: none;
}

.dungeon-item-info .dungeon-name {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dungeon-item-info .dungeon-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.dungeon-actions {
    display: flex;
    gap: 8px;
}

.btn-challenge,
.btn-auto-dungeon {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    color: #fff;
    transition: all 0.2s;
}

.btn-challenge {
    background: var(--primary-color);
}
.btn-challenge:hover {
    background: #357abd;
    transform: translateY(-1px);
}

.btn-auto-dungeon {
    background: linear-gradient(135deg, #f39c12, #d68910);
}
.btn-auto-dungeon:hover {
    background: linear-gradient(135deg, #f5b041, #f39c12);
    transform: translateY(-1px);
}

/* 战斗页面 */
.area-selector {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.area-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.area-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.area-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.area-level {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
}

.battle-log {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    min-height: 200px;
}

.log-entry {
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-entry.system {
    color: var(--text-secondary);
    font-style: italic;
}

.log-entry.damage {
    color: var(--danger-color);
}

.log-entry.heal {
    color: var(--success-color);
}

.log-entry.critical {
    color: var(--quality-orange);
    font-weight: bold;
}

.log-entry.crit {
    color: var(--quality-orange);
    font-weight: bold;
}

.log-entry.skill {
    color: #4ecdc4;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(78, 205, 196, 0.5);
}

.log-entry.ticket {
    color: #4dabf7;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(77, 171, 247, 0.5);
}

.log-entry.holy {
    color: #e5e4e2;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(229, 228, 226, 0.5);
}

.log-entry.eternal {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.log-entry.abyss {
    color: #9370db;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(147, 112, 219, 0.5);
}

.log-entry.chaos {
    color: #ff6347;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 99, 71, 0.5);
}

.log-entry.mythic {
    color: #ff1493;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 20, 147, 0.5);
}

.log-entry.legendary {
    color: #ff4500;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 69, 0, 0.5);
}

.log-entry.epic {
    color: #8a2be2;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
}

/* 伤害飘血容器 - 叠加在怪物血条上方 */
.battle-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
    z-index: 10;
}

.floating-damage {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: var(--danger-color);
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.floating-damage.crit {
    font-size: 36px;
    color: var(--quality-orange);
}

.battle-status {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    min-height: 100px;
}

.enemy-info {
    margin-bottom: 15px;
    text-align: center;
}

.enemy-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 8px;
}

/* ===== 精英BOSS名称特效 ===== */
.enemy-name-elite {
    font-size: 20px;
    font-weight: 700;
    color: #ff9800;
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.8);
    margin-bottom: 8px;
    animation: elite-pulse 2s ease-in-out infinite;
}

/* ===== 地狱BOSS名称特效 ===== */
.enemy-name-hell {
    font-size: 22px;
    font-weight: 800;
    color: #ff2222;
    text-shadow: 0 0 12px rgba(255, 30, 30, 0.9), 0 0 24px rgba(180, 0, 0, 0.5);
    margin-bottom: 8px;
    animation: hell-pulse 1.5s ease-in-out infinite;
}

/* 精英BOSS图标 */
.boss-icon {
    display: inline-block;
    transition: transform 0.3s;
}
.boss-icon-elite {
    font-size: 28px;
    animation: elite-icon-spin 4s linear infinite;
    filter: drop-shadow(0 0 6px rgba(255, 152, 0, 0.8));
}
.boss-icon-hell {
    font-size: 32px;
    animation: hell-icon-shake 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 1));
}

@keyframes elite-pulse {
    0%, 100% { text-shadow: 0 0 8px rgba(255, 152, 0, 0.8); }
    50%       { text-shadow: 0 0 16px rgba(255, 152, 0, 1), 0 0 30px rgba(255, 200, 0, 0.6); }
}
@keyframes hell-pulse {
    0%, 100% { text-shadow: 0 0 12px rgba(255, 30, 30, 0.9); }
    50%       { text-shadow: 0 0 20px rgba(255, 0, 0, 1), 0 0 40px rgba(200, 0, 0, 0.7), 0 0 60px rgba(120, 0, 0, 0.4); }
}
@keyframes elite-icon-spin {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(15deg) scale(1.1); }
    75%  { transform: rotate(-15deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}
@keyframes hell-icon-shake {
    0%, 100% { transform: scale(1) rotate(0deg); }
    20%      { transform: scale(1.15) rotate(-8deg); }
    40%      { transform: scale(1.2) rotate(8deg); }
    60%      { transform: scale(1.15) rotate(-5deg); }
    80%      { transform: scale(1.1) rotate(5deg); }
}



.enemy-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    justify-content: center;
}

.enemy-stats span {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.enemy-crit-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
    justify-content: center;
}

.enemy-crit-stats span {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
}

.enemy-hp-bar,
.player-hp-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid var(--border-color);
}

.hp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--danger-color), #ff6b6b);
    transition: width 0.3s ease;
}

.hp-bar-fill.player {
    background: linear-gradient(90deg, var(--success-color), #2ecc71);
}

.enemy-hp-text,
.player-hp-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}

/* 人物/装备页面 */
.character-panel {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.char-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.char-tab {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.char-tab.active,
.char-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.char-tab-content {
    display: none;
}

.char-tab-content.active {
    display: block;
}

/* 属性面板内容可滚动（特权状态在底部可能被截断） */
#statsTab .char-stats {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stats-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.btn-delete-save {
    padding: 8px 16px;
    background: rgba(255, 80, 80, 0.2);
    border: 2px solid rgba(255, 80, 80, 0.5);
    border-radius: 6px;
    color: #ff5050;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete-save:hover {
    background: rgba(255, 80, 80, 0.3);
    border-color: #ff5050;
    transform: translateY(-1px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 新角色属性面板样式 */
.character-info {
    margin-bottom: 15px;
}

.character-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hp-bar {
    position: relative;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.hp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.hp-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.stat-icon {
    font-size: 16px;
}

.stat-text {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.stat-text span {
    font-weight: bold;
    color: #2ecc71;
}

/* 称号样式 */
.titles-section {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
}

.titles-header {
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
    text-align: center;
}

.titles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.title-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-size: 12px;
    color: #ffd700;
    animation: titleGlow 2s ease-in-out infinite;
}

.title-badge.no-titles {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: #888;
    animation: none;
}

@keyframes titleGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

.equipment-layout {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
}

.equipment-left, .equipment-right {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.equip-slot {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.equip-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.slot-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.slot-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.equip-info {
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
}

.equipment-quality {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}

.equipment-level {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    margin-top: 2px;
}

/* 背包页面 */

/* 为背包页面设置固定高度和滚动 */
#inventoryPage {
    display: none;
    height: calc(100vh - 130px);
    flex-direction: column;
}

#inventoryPage.active {
    display: flex !important;
}

/* 背包可滚动区域 */
#inventoryPage > .shard-panel,
#inventoryPage > .inventory-header {
    flex-shrink: 0;
}

/* 背包物品列表可滚动 */
#inventoryPage > .inventory-grid {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    flex: 1 1 0%;
    min-height: 100px;
}

/* 自动分解栏固定在底部 */
#inventoryPage > .auto-dismantle-bar {
    flex-shrink: 0;
}

/* 技能/宝石页面固定底部布局 */
#skillPage {
    display: none;
    height: calc(100vh - 130px);
    flex-direction: column;
}

#skillPage.active {
    display: flex !important;
}

/* 技能/宝石页面可滚动区域 */
#skillPage > .skill-tabs,
#skillPage > .tab-content {
    flex-shrink: 0;
}

/* 技能/宝石页面Tab内容可滚动（bar已移入tab-content，overflow在内容滚动区） */
#skillPage > .tab-content.active {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 100px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

/* tab-content 内的内容区（宝石列表/技能内容）自动撑满 */
#skillPage > .tab-content.active > .gem-list,
#skillPage > .tab-content.active > .equipped-skills,
#skillPage > .tab-content.active > .skill-pool {
    flex: 0 0 auto;
}

/* tab-content 内 auto-dismantle-bar 贴底固定 */
#skillPage > .tab-content > .auto-dismantle-bar {
    flex-shrink: 0;
    margin-top: auto;
}

/* --- 碎片仓库 --- */
.shard-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.shard-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: bold;
}

.shard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.shard-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    white-space: nowrap;
}

.shard-item .shard-count {
    color: var(--text-secondary);
}

/* 碎片仓库详细显示 */
.shard-total {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 6px;
}

.shard-total .shard-count {
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

.shard-breakdown {
    margin-top: 8px;
}

.shard-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 16px 0 12px 0;
}

.shard-section-title {
    font-size: 13px;
    color: var(--text-primary);
    margin: 12px 0 8px 0;
    font-weight: bold;
}

.shard-quality-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.shard-quality-chip {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 10px;
    min-width: 45px;
}

.shard-quality-chip .shard-chip-icon {
    font-size: 10px;
}

.shard-quality-chip .shard-chip-name {
    font-weight: bold;
    font-size: 9px;
}

.shard-quality-chip .shard-chip-count {
    margin-left: auto;
    font-weight: bold;
    min-width: 15px;
    text-align: right;
    font-size: 9px;
}

.shard-quality-chip.has-shards {
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.15);
}

/* --- 自动分解栏（底部固定在背包页内） --- */
.auto-dismantle-bar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 14px;
    flex-shrink: 0;
}

.auto-dismantle-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
}

.switch-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.dismantle-quality-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.dismantle-quality-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
    min-width: 50px;
    justify-content: center;
}

.dismantle-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 4px;
    width: 100%;
}

.dismantle-quality-item:hover {
    background: rgba(255,255,255,0.1);
}

.dismantle-quality-item input[type="checkbox"] {
    width: 13px;
    height: 13px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.dismantle-quality-item.checked {
    border-color: currentColor;
    background: rgba(255,255,255,0.08);
}

.inventory-header {
    background: var(--card-bg);
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.capacity {
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
}

/* 背包网格 - 使用更强选择器确保生效，固定2列 */
div#inventoryPage div.inventory-grid,
.inventory-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: min-content !important;
    align-items: start !important;
    gap: 10px !important;
    padding: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    overflow-y: auto !important;
    max-height: none !important;
}

/* 背包物品卡片 */
div#inventoryPage div.inventory-grid div.inventory-item,
.inventory-grid .inventory-item {
    background: var(--card-bg);
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.08);
    transition: all 0.3s;
    position: relative;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    align-self: start;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.inventory-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 更好的装备高亮 */
.inventory-item.better-equipment {
    border-color: #ffd700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4) !important;
    animation: glow-pulse 1s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4) !important;
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.6) !important;
    }
}

/* 更强标签 */
.better-tag {
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: white !important;
    padding: 3px 8px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    animation: better-tag-pulse 1s ease-in-out infinite;
    margin-left: 5px !important;
}

/* 特权显示区域 */
.privileges-section {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 12px;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.privileges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
}

.privilege-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-height: 60px;
    justify-content: center;
}

.privilege-item.active {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: var(--success-color);
}

.privilege-item.inactive {
    background: rgba(128, 128, 128, 0.2);
    border: 1px solid rgba(128, 128, 128, 0.3);
    color: var(--text-secondary);
    filter: grayscale(100%);
}

.privilege-icon {
    font-size: 18px;
    margin-bottom: 3px;
}

.privilege-name {
    font-size: 10px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .privileges-section {
        margin-top: 8px;
        padding: 8px;
    }
    
    .privileges-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .privilege-item {
        padding: 4px;
        min-height: 50px;
    }
    
    .privilege-icon {
        font-size: 16px;
    }
    
    .privilege-name {
        font-size: 9px;
    }
}

@keyframes better-tag-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* 装备项头部 */
.equip-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 箭头提示 */
.better-arrow {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: arrow-bounce 1s ease-in-out infinite;
}

@keyframes arrow-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 装备信息主体 */
.equip-item-info {
    padding: 12px 15px;
}

.equip-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.equip-item-name {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.equip-item-level {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.equip-item-score {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

/* 装备属性 */
.equip-item-properties {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

/* ========== 新装备卡片样式（根据截图） ========== */

/* 装备卡片头部 - 两列布局：左图标+名称，右评分 */
.equip-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-bottom: 1px solid var(--border-color);
    min-height: 46px;
    box-sizing: border-box;
}

.quality-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* 名称+副标题 竖向排列 */
.equip-name-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.equip-name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.equip-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    line-height: 1.2;
}

/* 右侧评分+更强 */
.equip-score-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
}

.equip-score {
    color: #ffd700;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.better-tag {
    font-size: 10px;
    color: #2ecc71;
    background: rgba(46,204,113,0.15);
    border-radius: 4px;
    padding: 1px 4px;
    white-space: nowrap;
}

/* 属性区：芯片网格 */
.equip-card-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.08);
    flex-shrink: 0;
    align-content: flex-start;
}

.stat-chip {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 2px 5px;
    white-space: nowrap;
    line-height: 1.4;
}

/* 宝石孔位行 */
.equip-gem-slots {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px 6px 8px;
}

/* 孔数标签：⬡3孔 */
.gem-hole-count {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-right: 2px;
    white-space: nowrap;
}

/* 已镶嵌宝石图标 */
.gem-slot-filled {
    font-size: 13px;
    line-height: 1;
}

/* 空孔数 */
.gem-slot-empty {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 5px;
    white-space: nowrap;
}
/* 操作按钮区域（新样式） */
.equip-card-actions {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.equip-card-actions .action-btn {
    flex: 1;
    padding: 4px 2px;
    font-size: 11px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}

.equip-card-actions .action-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.equip-card-actions .equip-btn {
    color: #2ecc71;
}

.equip-card-actions .detail-btn {
    color: #3498db;
}

.equip-card-actions .lock-btn {
    color: #9b59b6;
}

.equip-card-actions .dismantle-btn {
    color: #e74c3c;
}

/* 更好的装备标识 */
.better-equipment {
    border: 2px solid #2ecc71;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(46, 204, 113, 0.6);
    }
}

/* ========== 原有样式保持兼容 ========== */

/* 操作按钮区域 */
.equip-item-actions {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

/* 按钮颜色 */
.equip-btn {
    background: var(--primary-color);
    color: white;
}

.equip-btn:hover {
    background: var(--primary-hover);
}

.detail-btn {
    background: var(--info-color);
    color: white;
}

.detail-btn:hover {
    background: #1976d2;
}

.lock-btn {
    background: var(--text-secondary);
    color: white;
}

.dismantle-btn {
    background: var(--danger-color);
    color: white;
}

.dismantle-btn:hover {
    background: #d32f2f;
}

/* 旧样式兼容（技能书、宝石） */
.item-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.item-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-level {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.item-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* 物品操作按钮 */
.item-actions {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.use-btn {
    background: var(--success-color);
    color: white;
}

.use-btn:hover {
    background: #388e3c;
}

/* 技能/宝石页面 */
.skill-tabs,
.shop-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
}

.skill-tab,
.shop-tab {
    flex: 1;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    text-align: center;
}

.skill-tab.active,
.shop-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    max-height: none;
    overflow: visible;
}

/* 技能页面 tab-content.active 使用 flex 布局（已在上方统一设置，此处只补 display） */
#skillPage > .tab-content.active {
    display: flex !important;
}

/* 技能标签页激活时用 flex 上下布局（不加 !important 防止覆盖 display:none） */
#skillsTab.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}



.equipped-skills h3,
.skill-pool h3,
.gem-info h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

/* 已装备技能区域 - 固定在顶部 */
.equipped-skills {
    flex-shrink: 0;
    padding: 12px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.skill-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.skill-slot {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.skill-slot:hover {
    border-color: var(--quality-orange);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(243, 156, 18, 0.4);
}

.skill-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.skill-name {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 技能池区域 */
.skill-pool {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.skill-list,
.gem-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-item {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.skill-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skill-item-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.skill-item-name {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 500;
}

.skill-item-level {
    font-size: 10px;
    color: var(--secondary-color);
    font-weight: 400;
}

/* 技能品质分组标题 */
.skill-quality-header {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 0 4px 0;
    margin-top: 10px;
    border-bottom: 1px solid #333;
}

.gem-info {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.gem-info p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 消耗品样式 */
.consumable-item {
    text-align: center;
}

.consumable-item .item-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.consumable-item .item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.consumable-item .item-level {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 黑市页面 */
#shopPage {
    display: none;
    height: calc(100vh - 130px);
    flex-direction: column;
}

#shopPage.active {
    display: flex;
}

#shopPage > .shop-tabs {
    flex-shrink: 0;
}

#shopPage > .tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#shopPage > .tab-content.active {
    display: flex;
    flex-direction: column;
}

.shop-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.shop-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.item-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-buy {
    background: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-buy:hover {
    background: #e67e22;
    transform: translateY(-2px);
}


.price {
    font-size: 12px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* 商店双按钮布局（正常价格 + 看广告） */
.btn-buy-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    min-width: 90px;
}

/* 灰色禁用购买按钮（钱不够时） */
.btn-buy.btn-buy-disabled {
    background: #555;
    color: rgba(255,255,255,0.4);
    cursor: not-allowed;
    transform: none !important;
}

/* 看广告按钮（紫色） */
.btn-buy.btn-buy-ad {
    background: #7b2fbe;
    color: white;
    font-size: 13px;
    padding: 8px 12px;
}

.btn-buy.btn-buy-ad:hover {
    background: #9c3fe0;
    transform: translateY(-2px);
}

/* 已达上限状态 */
.btn-buy.btn-buy-ad-limit {
    background: #444;
    color: rgba(255,255,255,0.4);
    cursor: not-allowed;
    transform: none !important;
}

/* 广告剩余次数文字 */
.price.ad-remain {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
}


/* ===== 广告确认弹窗 ===== */
.ad-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.15s ease;
}
.ad-confirm-box {
    background: #1a1a2e;
    border: 1px solid #7b2fbe;
    border-radius: 12px;
    padding: 24px 28px;
    min-width: 260px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 0 24px rgba(123,47,190,0.5);
}
.ad-confirm-title {
    font-size: 17px;
    font-weight: 700;
    color: #e0b0ff;
    margin-bottom: 10px;
}
.ad-confirm-msg {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
    line-height: 1.5;
}
.ad-confirm-remain {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 16px;
}
.ad-confirm-limit {
    font-size: 12px;
    color: #f44336;
    margin-bottom: 8px;
}
.ad-confirm-vip-tip {
    font-size: 12px;
    color: #ffeb3b;
    margin-bottom: 16px;
    font-weight: 600;
}
.ad-confirm-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ad-confirm-btn {
    padding: 10px 0;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ad-confirm-btn-watch {
    background: #7b2fbe;
    color: white;
}
.ad-confirm-btn-watch:hover {
    background: #9c3fe0;
    transform: translateY(-1px);
}
.ad-confirm-btn-cancel {
    background: #333;
    color: #aaa;
}
.ad-confirm-btn-cancel:hover {
    background: #444;
    color: #fff;
}
.ad-confirm-btn-disabled {
    background: #333;
    color: rgba(255,255,255,0.3);
    cursor: not-allowed;
}

/* 更多页面 */
.more-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.menu-icon {
    font-size: 24px;
}

.menu-text {
    font-size: 14px;
    color: var(--text-primary);
}

/* 底部导航栏 - 优化高度 */
.bottom-nav {
    background: linear-gradient(0deg, #0f0f23 0%, #1a1a3e 100%);
    padding: 6px 10px calc(6px + var(--safe-area-inset-bottom));
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    width: 100%;
    box-sizing: border-box;
}

.nav-btn {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.3s;
    min-width: 60px;
}

/* 战斗按钮一直高亮显示 */
.nav-btn[data-page="battle"],
.bottom-nav .nav-btn:first-child {
    color: var(--primary-color) !important;
    background: rgba(74, 144, 226, 0.1) !important;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3) !important;
}

.nav-btn.active {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
}

.nav-icon {
    font-size: 20px;
}

.nav-text {
    font-size: 11px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* 兑换码弹窗特殊样式 */
#redeemCodeModal .modal-content {
    max-height: 90vh;
    height: 90vh;
    width: 90%;
    max-width: 90vw;
    overflow-y: auto;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    /* 顶部状态栏 */
    .top-bar {
        padding: 4px 8px;
        min-height: 70px; /* 确保足够的高度 */
    }
    
    .status-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        width: 100%;
    }
    
    .char-info {
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .char-name {
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .char-level {
        font-size: 11px;
        padding: 2px 8px;
        flex-shrink: 0;
    }
    
    .char-exp {
        font-size: 10px;
        padding: 2px 6px;
        flex-shrink: 0;
    }
    
    .resources {
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .resource-item {
        flex-shrink: 0;
    }
    
    .resource-icon {
        font-size: 16px;
    }
    
    .resource-value {
        font-size: 12px;
    }
    
    .btn-fish-mode {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
    
    /* 主内容区域 */
    .main-content {
        margin-top: 80px; /* 增加顶部间距，适应移动端状态栏 */
        margin-bottom: 60px;
        padding: 8px;
        height: calc(100vh - 140px);
    }
    
    /* 背包页面 */
    #inventoryPage {
        height: calc(100vh - 140px);
    }
    
    #inventoryPage.active {
        height: calc(100vh - 140px);
    }
    
    /* 技能页面 */
    #skillPage {
        height: calc(100vh - 140px);
    }
    
    #skillPage.active {
        height: calc(100vh - 140px);
    }
    
    /* 战斗页面 */
    #battlePage.active {
        height: calc(100vh - 140px);
    }
    
    /* 黑市页面 */
    #shopPage {
        height: calc(100vh - 140px);
    }
    
    #shopPage.active {
        height: calc(100vh - 140px);
    }
    
    /* 底部导航栏 */
    .bottom-nav {
        padding: 4px 8px;
    }
    
    .nav-btn {
        padding: 6px 8px;
        min-width: 45px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
    
    .nav-text {
        font-size: 9px;
    }
    
    /* 模态框 */
    .modal {
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100vw;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    /* 装备/技能卡片 */
    .inventory-item {
        min-height: 120px !important;
    }
    
    .equip-card-header {
        min-height: 40px;
    }
    
    .equip-name {
        font-size: 12px;
    }
    
    .equip-meta {
        font-size: 10px;
    }
    
    .equip-score {
        font-size: 12px;
    }
    
    .stat-chip {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    /* 按钮 */
    .btn-select-area,
    .btn-elite-dungeon,
    .btn-hell-dungeon {
        min-width: 80px;
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* 战斗日志 */
    .battle-log {
        min-height: 150px;
    }
    
    .log-entry {
        font-size: 12px;
        padding: 4px 0;
    }
    
    /* 区域选择 */
    .area-name {
        font-size: 16px;
    }
    
    .area-level {
        font-size: 12px;
    }
    
    /* 物品详情 */
    .item-detail-name {
        font-size: 20px;
    }
    
    .item-detail-meta {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 技能槽 */
    .skill-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .skill-slot {
        padding: 10px;
    }
    
    .skill-icon {
        font-size: 24px;
    }
    
    .skill-name {
        font-size: 11px;
    }
    
    /* 背包过滤器 */
    .filter-btn {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    /* 商店物品 */
    .shop-item {
        padding: 15px;
    }
    
    .item-info h3 {
        font-size: 14px;
    }
    
    .item-info p {
        font-size: 12px;
    }
    
    .btn-buy {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* 更多页面 */
    .menu-item {
        padding: 12px 16px;
    }
    
    .menu-icon {
        font-size: 20px;
    }
    
    .menu-text {
        font-size: 13px;
    }
    
    /* 技能/宝石标签页 */
    .skill-tab,
    .shop-tab {
        padding: 8px;
        font-size: 12px;
    }
    
    /* 人物属性 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .stat-item {
        padding: 6px;
        margin-bottom: 2px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 12px;
    }
    
    /* 装备槽 */
    .equipment-slots {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .equip-slot {
        padding: 12px;
    }
    
    .slot-icon {
        font-size: 28px;
    }
    
    .slot-name {
        font-size: 11px;
    }
    
    .equip-info {
        font-size: 10px;
    }
    
    /* 珍宝界面移动端适配 */
    .treasure-row {
        flex-direction: row;
        gap: 3px;
        flex-wrap: wrap;
    }
    
    .treasure-slot {
        flex: 1;
        min-width: 80px;
        min-height: 70px;
        padding: 5px;
    }
    
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 装备字体大小 */
    .equip-info {
        font-size: 10px !important;
    }
}

/* 珍宝界面样式 */
.treasure-row {
    display: flex;
    gap: 3px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.treasure-slot {
    flex: 1;
    min-width: 80px;
    min-height: 60px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.treasure-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.treasure-slot.equipped {
    border-color: var(--primary-color);
}

.treasure-slot.empty {
    border-color: rgba(255, 255, 255, 0.2);
}

.empty-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.treasure-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.treasure-name {
    font-size: 12px;
    font-weight: bold;
}

.treasure-affixes {
    font-size: 10px;
    line-height: 1.4;
}

.treasure-affix {
    margin-bottom: 2px;
}

.treasure-affix.small {
    font-size: 8px;
}

.embed-slot {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.embedded-treasure {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

/* 珍宝标签页样式 */
.treasure-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 6px 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #666;
}

.tab-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.treasure-content {
    position: relative;
}

.treasure-tab {
    display: none;
}

.treasure-tab.active {
    display: block;
}

.no-treasures {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 14px;
}

/* 珍宝库存样式 */
.treasure-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.treasure-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.treasure-header {
    margin-bottom: 6px;
}

.treasure-name {
    font-size: 12px;
    font-weight: bold;
}

.treasure-affixes {
    margin-bottom: 6px;
}

.treasure-affix {
    font-size: 10px;
    margin-bottom: 3px;
    color: #ccc;
}

.treasure-positions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.position-btn {
    padding: 6px 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.position-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #666;
}

.position-btn.small {
    padding: 4px 8px;
    font-size: 10px;
}

.position-btn.small.danger {
    background: rgba(255, 100, 100, 0.2);
    border-color: #ff6666;
}

.position-btn.small.danger:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: #ff4444;
}

/* 模态框样式 */
.modal-content {
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    border: none;
}

/* 兑换码弹窗 */
#redeemCodeModal .modal-content {
    height: 95vh;
    max-height: 95vh;
    width: 95%;
    max-width: 95vw;
}

/* 装备详情 */
.equipment-card {
    padding: 10px;
}

.equipment-stats {
    font-size: 12px;
}

/* 背包页面 */
.inventory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
    
    /* 背包过滤器标签 */
    .filter-tabs {
        gap: 3px;
    }
    
    .filter-btn {
        padding: 2px 5px;
        font-size: 9px;
    }
    
    /* 技能页面 */
    .skill-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .skill-tabs {
        gap: 3px;
        margin-bottom: 10px;
    }
    
    .skill-tab {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .skill-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .skill-slot {
        padding: 10px;
    }
    
    .skill-icon {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    /* 商店页面 */
    .shop-tabs {
        flex-wrap: wrap;
        gap: 3px;
        margin-bottom: 10px;
    }
    
    .shop-tab {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1 1 calc(50% - 3px);
    }
    
    /* 角色页面 */
    .char-tabs {
        gap: 3px;
        margin-bottom: 10px;
    }
    
    .char-tab {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    /* 更多页面 */
    .menu-item {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .menu-icon {
        font-size: 20px;
    }
    
    .menu-text {
        font-size: 13px;
    }
    
    /* 分解栏适配 */
    .auto-dismantle-bar {
        padding: 8px 10px;
        margin-top: 10px;
    }
    
    .auto-dismantle-title {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .dismantle-quality-list {
        gap: 4px 6px;
    }
    
    .dismantle-quality-item {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .dismantle-quality-item input[type="checkbox"] {
        width: 12px;
        height: 12px;
    } 

/* 确保分解栏只在对应页面显示 */
.page:not(.active) .auto-dismantle-bar {
    display: none !important;
}

/* 兑换码内容样式调整 */
#redeemModalBody {
    padding: 10px;
}

#redeemModalBody .redeem-id-box {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

#redeemModalBody .redeem-id-label {
    font-size: 14px;
    margin-bottom: 5px;
}

#redeemModalBody .redeem-id-value {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

#redeemModalBody .redeem-id-tip {
    font-size: 12px;
    margin-bottom: 3px;
}

#redeemModalBody .vip-privilege-box {
    margin-bottom: 10px;
}

#redeemModalBody .vip-privilege-title {
    font-size: 16px;
    margin-bottom: 8px;
    text-align: center;
}

#redeemModalBody .vip-priv-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#redeemModalBody .vip-priv-card {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 120px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#redeemModalBody .vip-priv-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

#redeemModalBody .vip-priv-threshold {
    font-size: 11px;
    margin-bottom: 4px;
    opacity: 0.8;
}

#redeemModalBody .vip-priv-item {
    font-size: 10px;
    margin-bottom: 2px;
}

#redeemModalBody .vip-progress-box {
    margin-bottom: 10px;
}

#redeemModalBody .vip-progress-title {
    font-size: 14px;
    margin-bottom: 8px;
}

#redeemModalBody .vip-bar-row {
    margin-bottom: 6px;
    font-size: 12px;
}

#redeemModalBody .vip-bar-wrap {
    flex: 1;
    height: 8px;
    margin: 0 8px;
}

#redeemModalBody .redeem-input-box {
    margin-top: 10px;
}

#redeemModalBody .redeem-input {
    font-size: 14px;
    padding: 8px;
    margin-bottom: 8px;
}

#redeemModalBody .btn-redeem-submit {
    font-size: 14px;
    padding: 8px 16px;
}

.modal.active,
.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    pointer-events: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
    position: relative;
}

.modal-header h2 {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
}

.close-btn {
    background: transparent;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* 装备对比样式 */
.equipment-comparison {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid var(--border-color);
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--primary-color);
}

.comparison-label {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.comparison-label .label {
    color: var(--text-secondary);
}

.comparison-label .values {
    display: flex;
    gap: 30px;
    align-items: center;
}

.comparison-label .current {
    color: var(--text-secondary);
}

.comparison-label .new {
    font-weight: bold;
}

.comparison-label .positive {
    color: var(--quality-green);
}

.comparison-label .negative {
    color: var(--danger-color);
}

.comparison-label .equal {
    color: var(--text-secondary);
}

.comparison-arrow {
    color: var(--text-secondary);
    font-size: 12px;
}

/* 职业卡片 */
  /* 职业选择模态框特殊样式 - 铺满整个画面 */
  #classModal {
      background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
      padding: 0 !important;
      margin: 0 !important;
  }

  #classModal .modal-content {
      width: 100vw;
      height: 100vh;
      max-width: 100vw;
      max-height: 100vh;
      border-radius: 0;
      border: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-sizing: border-box;
      /* min-height:0 确保flex子项能正确收缩，不撑破容器 */
      min-height: 0;
  }


  #classModal .modal-header {
      flex-shrink: 0;
      background: transparent;
      border-bottom: 2px solid var(--border-color);
      padding: 10px 20px;
      width: 100%;
      box-sizing: border-box;
      height: 50px;
      text-align: center;
  }

  #classModal .modal-header h2 {
      font-size: 20px;
      margin: 0;
      line-height: 30px;
  }


  #classModal .modal-body {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: center;
      align-content: flex-start;
      padding: 16px 16px 24px 16px;
      overflow-y: auto;
      overflow-x: hidden;
      width: 100%;
      box-sizing: border-box;
      gap: 12px;
  }


  /* 职业卡片 - 横向三列紧凑显示 */
  #classModal .class-card {
      background: rgba(255, 255, 255, 0.05);
      padding: 16px 14px 14px 14px;
      border-radius: 12px;
      text-align: center;
      border: 2px solid rgba(255,255,255,0.1);
      transition: all 0.3s;
      position: relative;
      width: calc(33.33% - 12px);
      min-width: 160px;
      max-width: 240px;
      flex-shrink: 0;
      margin: 0;
      box-sizing: border-box;
  }

  #classModal .class-card:hover {
      border-color: var(--primary-color);
      transform: translateY(-3px);
      background: rgba(255,255,255,0.09);
  }

  /* 职业主题色 */
  #classModal .class-card[data-class="assassin"] { border-color: rgba(156,39,176,0.4); }
  #classModal .class-card[data-class="assassin"]:hover { border-color: #9c27b0; box-shadow: 0 4px 20px rgba(156,39,176,0.3); }
  #classModal .class-card[data-class="warrior"]  { border-color: rgba(33,150,243,0.4); }
  #classModal .class-card[data-class="warrior"]:hover  { border-color: #2196f3; box-shadow: 0 4px 20px rgba(33,150,243,0.3); }
  #classModal .class-card[data-class="mage"]     { border-color: rgba(255,87,34,0.4); }
  #classModal .class-card[data-class="mage"]:hover     { border-color: #ff5722; box-shadow: 0 4px 20px rgba(255,87,34,0.3); }

  #classModal .class-icon {
      font-size: 40px;
      margin-bottom: 6px;
  }

  #classModal .class-card h3 {
      font-size: 18px;
      margin: 4px 0 6px 0;
      color: #fff;
  }

  #classModal .class-card p {
      font-size: 12px;
      margin: 0 0 8px 0;
      line-height: 1.4;
      color: rgba(255,255,255,0.65);
  }

  #classModal .class-card ul {
      margin: 4px 0 10px 0;
      padding: 0;
      text-align: left;
      display: inline-block;
      list-style: none;
  }

  #classModal .class-card li {
      font-size: 12px;
      padding: 2px 0;
      line-height: 1.4;
      color: rgba(255,255,255,0.8);
  }

  #classModal .class-card li::before {
      content: "▸ ";
      color: var(--primary-color);
  }

  #classModal .class-recommend-tag {
      top: -10px;
      right: -10px;
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 12px;
  }

  #classModal .btn-select-class {
      padding: 8px 20px;
      font-size: 13px;
      width: 100%;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--primary-color), #5b8dee);
      color: #fff;
      border: none;
      cursor: pointer;
      font-weight: bold;
      transition: all 0.2s;
      margin-top: 4px;
  }

  #classModal .btn-select-class:hover {
      filter: brightness(1.15);
      transform: translateY(-1px);
  }

.class-recommend-tag {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(238, 90, 36, 0.4);
    z-index: 1;
}

.class-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.class-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.class-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.class-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.class-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 15px;
}

.class-card li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 3px 0;
}

.btn-select-class {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-select-class:hover {
    background: #357abd;
    transform: translateY(-2px);
}

/* 区域列表 */
.area-list {
    display: grid;
    gap: 10px;
}

.area-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.area-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.area-item-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: bold;
}

.area-item-level {
    font-size: 12px;
    color: var(--secondary-color);
}

/* 装备品质颜色 */
.quality-gray { color: var(--quality-gray); }
.quality-green { color: var(--quality-green); }
.quality-blue { color: var(--quality-blue); }
.quality-purple { color: var(--quality-purple); }
.quality-orange { color: var(--quality-orange); }
.quality-red { color: var(--quality-red); }
.quality-gold { color: var(--quality-gold); }
.quality-platinum { color: var(--quality-platinum); }
.quality-diamond { color: var(--quality-diamond); }
.quality-darkgold { color: var(--quality-darkgold); }
.quality-mythic { color: var(--quality-mythic); }
.quality-supreme { color: var(--quality-supreme); }
.quality-perfect { color: var(--quality-perfect); }
.quality-peerless { color: var(--quality-peerless); }

/* 提示框 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.98);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    text-shadow: 0 0 15px rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* 云存档状态提示 */
.cloud-save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.cloud-save-status.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.cloud-save-status.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.cloud-save-status.info {
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 排行榜样式 */
.leaderboard-content {
    max-height: 70vh;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.leaderboard-item.self {
    background: rgba(74, 144, 226, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.leaderboard-rank {
    font-weight: bold;
    font-size: 16px;
    margin-right: 15px;
    min-width: 30px;
    text-align: center;
}

.leaderboard-rank.top1 {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.leaderboard-rank.top2 {
    color: #c0c0c0;
    text-shadow: 0 0 6px rgba(192, 192, 192, 0.6);
}

.leaderboard-rank.top3 {
    color: #cd7f32;
    text-shadow: 0 0 6px rgba(205, 127, 50, 0.6);
}

.leaderboard-rank.other {
    color: var(--secondary-color);
}

.leaderboard-username {
    flex: 1;
    margin: 0 15px;
    font-size: 14px;
    font-weight: 500;
}

.leaderboard-score {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary-color);
    min-width: 80px;
    text-align: right;
}

.leaderboard-level {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 10px;
}


/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 飘血效果 */
.floating-text {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.floating-text.crit {
    font-size: 32px;
    color: #ffff00;
    text-shadow:
        -2px -2px 0 #ff0000,
        2px -2px 0 #ff0000,
        -2px 2px 0 #ff0000,
        2px 2px 0 #ff0000,
        2px 2px 8px rgba(255, 0, 0, 0.8);
    animation: floatUp 1s ease-out forwards, pulse 0.5s ease-in-out 2;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-60px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* 强化按钮样式 */
.btn-enhance {
    background: linear-gradient(135deg, #f39c12, #d68910);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #e67e22;
}

.btn-enhance:hover {
    background: linear-gradient(135deg, #f5b041, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211,84,0,0.4);
}

/* 锁定按钮样式 - 紫色渐变 */
.btn-lock {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #7d3c98;
}

.btn-lock:hover {
    background: linear-gradient(135deg, #af7ac5, #9b59b6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142,68,173,0.4);
}

/* 装备按钮样式 - 绿色渐变 */
.btn-equip {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #1e8449;
}

.btn-equip:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.4);
}

/* 分解按钮样式 - 红色渐变 */
.btn-dismantle {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #a93226;
}

.btn-dismantle:hover {
    background: linear-gradient(135deg, #ec7063, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}

/* 学习按钮样式 - 蓝色渐变 */
.btn-learn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #2471a3;
}

.btn-learn:hover {
    background: linear-gradient(135deg, #5dade2, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.4);
}

/* ===== 新增模态框通用样式 ===== */

/* 模态框关闭按钮 */
.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: 12px;
}
.modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* 大型模态框 */
.modal-large .modal-content {
    max-height: 85vh;
    overflow-y: auto;
}

/* 模态框操作按钮区 */
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.btn-action {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    transition: all 0.2s;
    min-width: 60px;
}
.btn-action:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-action.btn-equip { background: linear-gradient(135deg, #2980b9, #3498db); }
.btn-action.btn-enhance { background: linear-gradient(135deg, #d35400, #e67e22); }
.btn-action.btn-dismantle { background: linear-gradient(135deg, #a93226, #e74c3c); }

/* buff 状态显示 */
.buff-status { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.buff-item {
    font-size: 11px;
    padding: 2px 5px;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
    white-space: nowrap;
}

/* 游戏攻略 */
#guideModal .modal-content {
    max-height: 85vh;
    overflow-y: auto;
}
.guide-content h3 { color: #ffd700; margin: 16px 0 8px; font-size: 15px; border-left: 3px solid #ffd700; padding-left: 8px; }
.guide-content .guide-section { background: rgba(255,255,255,0.05); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.guide-content .guide-section p { color: #ddd; font-size: 13px; line-height: 1.8; margin: 4px 0; }
.guide-content .guide-section strong { color: #fff; }
.guide-content .guide-section.tip { background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.1)); border: 1px solid rgba(255,215,0,0.3); }
.guide-content .guide-section.tip p { color: #ffd700; text-align: center; font-size: 14px; }
.guide-content .guide-footer { text-align: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; }
.guide-content .guide-footer p { color: #888; font-size: 12px; }

/* 数据统计 */
.stats-grid .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
    font-size: 13px;
}
.stats-grid .stat-row span:last-child { color: #f39c12; font-weight: bold; }

/* ===== 每日任务系统 ===== */
.quest-list { display: flex; flex-direction: column; gap: 10px; }

/* 重置倒计时提示 */
.daily-reset-tip {
    text-align: center;
    font-size: 12px;
    color: #888;
    padding: 4px 0 8px;
}

/* 任务卡片 */
.daily-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border: 1px solid #2a2a3e;
    transition: border-color 0.2s;
}
.daily-task-item.done {
    border-color: #f39c12;
    background: rgba(243,156,18,0.06);
}
.daily-task-item.claimed {
    border-color: #2a2a2a;
    opacity: 0.5;
}

/* 左侧：图标+信息 */
.daily-task-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.daily-task-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.daily-task-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.daily-task-name {
    font-size: 14px;
    font-weight: 700;
    color: #f0f0f0;
}
.daily-task-desc {
    font-size: 12px;
    color: #999;
}
/* 进度条 */
.daily-task-bar-wrap {
    width: 100%;
    height: 4px;
    background: #2a2a3e;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}
.daily-task-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #f39c12);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.daily-task-progress {
    font-size: 11px;
    color: #aaa;
}

/* 右侧：奖励+按钮 */
.daily-task-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.daily-task-reward {
    font-size: 13px;
    font-weight: 700;
    color: #00bcd4;
    white-space: nowrap;
}
/* 领取按钮 */
.daily-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.daily-btn-claim {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}
.daily-btn-claim:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(243,156,18,0.5);
}
.daily-btn-claimed {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
}
.daily-btn-locked {
    background: #1a1a2e;
    color: #444;
    cursor: not-allowed;
}

/* ===== 兑换码 & 特权中心 ===== */
.redeem-id-box {
    background: linear-gradient(135deg, rgba(123,47,190,0.2), rgba(33,150,243,0.15));
    border: 1px solid #7b2fbe;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    text-align: center;
}
.redeem-id-label { font-size: 12px; color: #aaa; margin-bottom: 6px; }
.redeem-id-value {
    font-size: 22px;
    font-weight: 900;
    color: #e0b0ff;
    letter-spacing: 3px;
    font-family: monospace;
    margin-bottom: 6px;
}
.redeem-id-tip { font-size: 11px; color: #f39c12; line-height: 1.5; }

/* VIP特权详情卡 */
.vip-privilege-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.vip-privilege-title {
    font-size: 13px;
    color: #e0b0ff;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
}
.vip-priv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.vip-priv-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    transition: all 0.3s ease;
}
.vip-priv-card.vip-priv-active {
    background: rgba(76,175,80,0.1);
    border-color: #4CAF50;
    box-shadow: 0 0 12px rgba(76,175,80,0.2);
}
.vip-priv-card:nth-child(1).vip-priv-active { border-color: #4CAF50; box-shadow: 0 0 12px rgba(76,175,80,0.2); }
.vip-priv-card:nth-child(2).vip-priv-active { border-color: #2196F3; box-shadow: 0 0 12px rgba(33,150,243,0.2); }
.vip-priv-card:nth-child(3).vip-priv-active { border-color: #ff9800; box-shadow: 0 0 12px rgba(255,152,0,0.2); }
.vip-priv-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.vip-priv-card:nth-child(1) .vip-priv-name { color: #4CAF50; }
.vip-priv-card:nth-child(2) .vip-priv-name { color: #2196F3; }
.vip-priv-card:nth-child(3) .vip-priv-name { color: #ff9800; }
.vip-priv-threshold {
    font-size: 10px;
    color: #888;
    margin-bottom: 6px;
}
.vip-priv-item {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 3px;
    line-height: 1.3;
}

/* VIP进度条 */
.vip-progress-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.vip-progress-title { font-size: 12px; color: #888; margin-bottom: 10px; }
.vip-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.vip-bar-label { font-size: 12px; font-weight: 700; width: 38px; flex-shrink: 0; }
.vip-bar-wrap {
    flex: 1;
    height: 8px;
    background: #2a2a3e;
    border-radius: 4px;
    overflow: hidden;
}
.vip-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 2px;
}
.vip-bar-val { font-size: 11px; color: #aaa; width: 80px; text-align: right; flex-shrink: 0; }

/* 特权状态 */
.priv-status-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.priv-status-title { font-size: 12px; color: #888; margin-bottom: 8px; }
.priv-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
    color: #ccc;
}
.priv-on { color: #4CAF50; font-weight: 700; }
.priv-off { color: #555; }

/* 兑换码输入区 */
.redeem-input-box {
    display: flex;
    gap: 8px;
    align-items: center;
}
.redeem-input {
    flex: 1;
    background: #1a1a2e;
    border: 1px solid #7b2fbe;
    border-radius: 8px;
    color: #f0f0f0;
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
    font-family: monospace;
    letter-spacing: 1px;
}
.redeem-input::placeholder { color: #555; }
.btn-redeem-submit {
    background: linear-gradient(135deg, #7b2fbe, #4a90e2);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-redeem-submit:hover { transform: scale(1.05); box-shadow: 0 0 12px rgba(123,47,190,0.6); }

/* 游戏设置 */

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
    font-size: 13px;
}
.setting-item label { flex: 1; color: #ddd; }
.setting-item input[type="range"] { flex: 2; }
.setting-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* 关于页面 */
.about-content { text-align: center; padding: 20px 10px; }
.about-title { font-size: 18px; font-weight: bold; color: #f39c12; margin-bottom: 6px; }
.about-version { font-size: 13px; color: #888; margin-bottom: 16px; }
.about-content p { font-size: 13px; color: #ccc; line-height: 1.7; }

/* 兑换奖励弹窗 */
.redeem-reward-content { text-align: center; padding: 10px 5px; }
.redeem-reward-title { font-size: 18px; color: #ffd700; margin-bottom: 15px; }
.redeem-reward-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.redeem-reward-item { font-size: 14px; color: #fff; padding: 8px 15px; background: rgba(255,255,255,0.1); border-radius: 8px; }
.redeem-reward-item.vip { color: #ffd700; background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.2)); border: 1px solid rgba(255,215,0,0.3); }
.redeem-reward-item.special { color: #ff69b4; background: linear-gradient(135deg, rgba(255,105,180,0.2), rgba(255,20,147,0.2)); border: 1px solid rgba(255,105,180,0.3); }
.redeem-reward-btn { text-align: center; }
.redeem-reward-btn .btn-action { padding: 10px 40px; font-size: 15px; background: linear-gradient(135deg, #4CAF50, #45a049); }


/* 开孔按钮样式 - 青色渐变 */
.btn-add-hole {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-hole:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23,162,184,0.4);
}

/* 金币商店激活时用 flex 布局（不加 !important，避免覆盖 display:none） */
#goldShopTab.active {
    display: flex;
    flex-direction: column;
}

/* 空提示样式 */
.empty-tip {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 14px;
}

/* 宝石紧凑文本行样式 */
.gem-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.gem-line:hover { background: rgba(255,255,255,0.08); }
.gem-line-name { font-weight: bold; flex-shrink: 0; }
.gem-line-stats { color: #aaa; flex: 1; }
.gem-line-actions { display: flex; gap: 2px; flex-shrink: 0; }
.gem-line-btn {
    font-size: 9px;
    padding: 1px 4px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    color: #999;
    cursor: pointer;
}
.gem-line-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* 技能紧凑版样式 - 横向排列 */
.skill-item-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 6px 8px;
}
.skill-item-compact:hover {
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.skill-icon-compact { font-size: 16px; flex-shrink: 0; }
.skill-info-compact { flex: 1; min-width: 0; }
.skill-name-compact { font-size: 12px; font-weight: bold; display: flex; align-items: center; gap: 4px; }
.skill-level-compact { font-size: 10px; color: #aaa; font-weight: normal; }
.skill-actions-compact { display: flex; gap: 3px; flex-shrink: 0; }
.skill-btn-compact {
    font-size: 9px;
    padding: 2px 5px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}
.skill-btn-compact:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* 技能操作按钮 */
.skill-item-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.skill-action-btn {
    font-size: 10px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}
.skill-action-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ========== 模态框样式 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal.show,
.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    max-width: 90%;
    max-height: 80%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease-out;
    position: relative;
    z-index: 1;
}

/* 通天塔模态框样式 */
#towerModal .modal-content {
    max-height: 90%;
    max-width: 850px;
    background: linear-gradient(180deg, #1e1e2e 0%, #0f0f1a 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 0 30px rgba(245,158,11,0.3);
}

#towerModal .modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-bottom: 2px solid #fbbf24;
}

#towerModal .modal-header h2 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ===== 精英副本模态框样式 ===== */
#eliteDungeonModal .modal-content {
    max-height: 90%;
    max-width: 600px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 2px solid #8b3cf7;
    box-shadow: 0 0 30px rgba(139,60,247,0.3);
}

#eliteDungeonModal .modal-header {
    background: linear-gradient(135deg, #8b3cf7 0%, #6d28d9 100%);
    border-bottom: 2px solid #a78bfa;
}

#eliteDungeonModal .modal-header h2 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#eliteDungeonModal .modal-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    padding: 20px;
}

#eliteDungeonModal .dungeon-tip {
    background: rgba(139,60,247,0.1);
    border: 1px solid #8b3cf7;
}

/* ===== 地狱副本模态框样式 ===== */
#hellDungeonModal .modal-content {
    max-height: 90%;
    max-width: 600px;
    background: linear-gradient(180deg, #1e1a1a 0%, #0f0f1a 100%);
    border: 2px solid #c0392b;
    box-shadow: 0 0 30px rgba(192,57,43,0.3);
}

#hellDungeonModal .modal-header {
    background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
    border-bottom: 2px solid #e74c3c;
}

#hellDungeonModal .modal-header h2 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#hellDungeonModal .modal-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    padding: 20px;
}

#hellDungeonModal .dungeon-tip {
    background: rgba(192,57,43,0.1);
    border: 1px solid #c0392b;
}

#towerModal .modal-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    padding: 20px;
}

#towerModal .dungeon-list {
    max-height: 350px;
    overflow-y: auto;
    margin: 20px 0;
    border-radius: 12px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
}

/* 通天塔层数卡片 */
.tower-floor-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(217,119,6,0.05) 100%);
    border: 1px solid rgba(245,158,11,0.3);
    transition: all 0.2s;
}

.tower-floor-card:hover {
    background: linear-gradient(135deg, rgba(245,158,11,0.2) 0%, rgba(217,119,6,0.1) 100%);
    transform: translateX(5px);
}

.tower-floor-card.completed {
    opacity: 0.6;
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.3);
}

.tower-floor-card.current {
    background: linear-gradient(135deg, rgba(245,158,11,0.3) 0%, rgba(217,119,6,0.2) 100%);
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245,158,11,0.3);
}

.tower-floor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tower-floor-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}

.tower-floor-card.completed .tower-floor-number {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tower-floor-boss {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tower-floor-boss-icon {
    font-size: 20px;
}

.tower-floor-boss-name {
    font-weight: 600;
    color: #fff;
}

.tower-floor-reward {
    font-size: 12px;
    color: #fbbf24;
    background: rgba(251,191,36,0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* 通天塔奖励预览 */
.tower-reward-preview {
    margin-top: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(217,119,6,0.05) 100%);
    border: 1px solid rgba(245,158,11,0.3);
    padding: 15px;
}

.tower-reward-preview h3 {
    color: #fbbf24;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.tower-reward-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.tower-reward-stage {
    padding: 12px;
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
    border-left: 3px solid #f59e0b;
}

.tower-reward-stage.completed {
    border-left-color: #22c55e;
}

.tower-reward-stage.current {
    border-left-color: #fbbf24;
    background: rgba(245,158,11,0.1);
}

.tower-reward-stage-header {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    font-size: 13px;
}

.tower-reward-stage-desc {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 3px;
}

.tower-reward-stage-total {
    font-size: 11px;
    color: #fbbf24;
}

/* 当前属性加成 */
.tower-current-buffs {
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(34,197,94,0.3);
}

.tower-current-buffs h3 {
    color: #22c55e;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.tower-buff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.tower-buff-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(34,197,94,0.1);
}

.tower-buff-icon {
    font-size: 14px;
}

.tower-buff-name {
    color: #ccc;
    font-size: 12px;
}

.tower-buff-value {
    color: #22c55e;
    font-weight: 600;
    font-size: 12px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a3e 100%);
    overflow: visible;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.close-btn:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: none;
}

/* 区域列表样式 */
.area-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
    /* 自定义滚动条样式 - 一直高亮显示 */
    scrollbar-width: 12px;
    scrollbar-color: #4a90e2 #0f3460;
}

/* Webkit浏览器滚动条样式 - 极度明显的高亮 */
.area-list::-webkit-scrollbar {
    width: 12px;
}

.area-list::-webkit-scrollbar-track {
    background: #0f3460;
    border-radius: 6px;
    border: 1px solid #1a4a7a;
}

.area-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a90e2 0%, #2a6fc7 100%);
    border-radius: 6px;
    border: 2px solid #1a4a7a;
    /* 强烈发光效果 */
    box-shadow: 
        0 0 10px rgba(74, 144, 226, 0.8),
        0 0 20px rgba(74, 144, 226, 0.4),
        inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.area-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5aa0f2 0%, #3a7fd7 100%);
    box-shadow: 
        0 0 15px rgba(74, 144, 226, 1),
        0 0 30px rgba(74, 144, 226, 0.6),
        inset 0 0 8px rgba(255, 255, 255, 0.5);
}

.area-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.area-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.area-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.area-item.locked:hover {
    border-color: var(--border-color);
    transform: none;
    box-shadow: none;
}

.area-item.current {
    border-color: var(--success-color);
    background: rgba(46, 204, 113, 0.2) !important;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.6) !important;
}

.area-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.area-level {
    color: var(--text-secondary);
    font-size: 12px;
}

.area-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--success-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 副本列表样式 */
.dungeon-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dungeon-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.dungeon-item:not(.locked):hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.dungeon-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.dungeon-name {
    font-weight: bold;
    font-size: 14px;
}

.dungeon-level {
    color: var(--text-secondary);
    font-size: 12px;
}

.dungeon-lock {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 20px;
}

.dungeon-tip {
    background: rgba(240, 230, 140, 0.1);
    border: 1px solid rgba(240, 230, 140, 0.3);
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-icon {
    font-size: 18px;
}

.dungeon-lock-tip {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: var(--danger-color);
    font-size: 13px;
}

/* ========== 装备详情模态框 - 紧凑版 ========== */
#itemDetailModal .modal-content {
    max-width: 420px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #3a3a5c;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* 紧凑头部 */
.item-detail-header-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.item-icon-compact {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 2px solid currentColor;
}

.item-info-compact {
    flex: 1;
}

.item-name-compact {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-quality-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: normal;
}

.item-meta-compact {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* 属性区域 */
.item-stats-compact {
    padding: 12px 16px;
}

/* 紧凑网格属性 */
.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
}

.stat-name-compact {
    font-size: 11px;
    color: #888;
}

.stat-value-compact {
    font-size: 13px;
    font-weight: bold;
    color: #2ecc71;
}

/* 词缀标签 */
.affix-list-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.affix-tag-compact {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 12px;
    color: #f39c12;
}

/* 宝石行 */
.gems-row-compact {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(155, 89, 182, 0.1);
    border-radius: 8px;
    justify-content: center;
}

.gem-icon-compact {
    font-size: 20px;
    cursor: pointer;
}

.gem-empty-compact {
    font-size: 16px;
    color: #444;
}

/* 强化信息 */
.item-detail-enhance-section {
    padding: 10px 16px;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.enhance-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.enhance-cost-value {
    color: #f39c12;
    font-weight: bold;
}

.enhance-success-rate {
    color: #2ecc71;
}

/* 模态框操作按钮 */
#itemDetailModal .modal-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 0 0 12px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

#itemDetailModal .btn-action {
    flex: 1;
    padding: 12px 8px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

#itemDetailModal .btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#itemDetailModal .btn-equip {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
}

#itemDetailModal .btn-enhance {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
}

#itemDetailModal .btn-dismantle {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
}

#itemDetailModal .btn-inlay {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: #fff;
}

#itemDetailModal .btn-open-hole {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: #fff;
}

/* 宝石已镶嵌样式 */
.gem-icon-compact.gem-filled {
    border: 1.5px solid currentColor;
    border-radius: 50%;
    padding: 1px 3px;
    font-size: 16px;
}

/* 已镶嵌宝石详情词缀行 */
.inlaid-gem-affixes { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.inlaid-gem-affix-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}

/* 装备详情内容区域 */
#itemDetailContent {
    max-height: 60vh;
    overflow-y: auto;
}

#itemDetailContent::-webkit-scrollbar {
    width: 6px;
}

#itemDetailContent::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

#itemDetailContent::-webkit-scrollbar-thumb {
    background: #3a3a5c;
    border-radius: 3px;
}

/* 套装效果区域 */
.set-effects-section {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid #2a2a3e;
    border-radius: 10px;
}

.set-effects-title {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    font-weight: bold;
}

.set-effect-card {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    border-left: 3px solid #4a90e2;
}

.set-effect-card:last-child {
    margin-bottom: 0;
}

.set-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.set-icon {
    font-size: 18px;
}

.set-name {
    font-weight: bold;
    font-size: 14px;
}

.set-count {
    margin-left: auto;
    font-weight: bold;
}

.set-progress-bar {
    display: flex;
    gap: 4px;
}

.set-progress-item {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    font-size: 11px;
    color: #666;
    transition: all 0.2s ease;
}

.set-progress-item.collected {
    color: #aaa;
}

.set-progress-item.activated {
    background: rgba(74,144,226,0.2);
    color: #4a90e2;
    font-weight: bold;
}

.set-piece-number {
    font-size: 12px;
    font-weight: bold;
    display: block;
}

.set-piece-label {
    font-size: 10px;
    display: block;
    margin-top: 2px;
}

.set-piece-effect {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.2;
}

.no-set-effects {
    text-align: center;
    color: #666;
    font-size: 13px;
    padding: 10px;
}

/* 套装装备特殊样式 */
.set-equipment {
    position: relative;
}

.set-tag {
    background: linear-gradient(135deg, #7b2fbe, #4a90e2);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* ========== 登录排队进度条 ========== */
#queueOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    flex-direction: column;
}
#queueOverlay.show { display: flex; }

.queue-box {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #4a90e2;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 0 40px rgba(74,144,226,0.3);
}

.queue-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: queueBounce 1s ease-in-out infinite;
}
@keyframes queueBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.queue-title {
    font-size: 20px;
    font-weight: bold;
    color: #4a90e2;
    margin-bottom: 8px;
}

.queue-subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.queue-bar-wrap {
    width: 100%;
    height: 12px;
    background: #2a2a3e;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.queue-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #2ecc71);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.queue-info {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 6px;
}

.queue-wait {
    font-size: 12px;
    color: #f39c12;
    margin-bottom: 16px;
}

.queue-tip {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
}

.queue-dot {
    display: inline-block;
    animation: queueDot 1.4s infinite;
}
.queue-dot:nth-child(2) { animation-delay: 0.2s; }
.queue-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes queueDot {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* ============================================================
   剧情模态框 - story-system
   ============================================================ */
.story-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.story-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.story-modal-box {
    background: linear-gradient(145deg, #1a1a2e, #16213e, #0f3460);
    border: 2px solid #e94560;
    border-radius: 16px;
    width: 92%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0 0 40px rgba(233,69,96,0.4), inset 0 0 20px rgba(0,0,0,0.3);
    transform: scale(0.8) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #eaeaea;
    position: relative;
    overflow: hidden;
}
.story-modal-overlay.active .story-modal-box {
    transform: scale(1) translateY(0);
}

/* 背景光晕动画 */
.story-modal-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(233,69,96,0.08) 0%, transparent 70%);
    animation: storyGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes storyGlow {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(233,69,96,0.3);
}
.story-type-badge {
    font-size: 13px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
}
.story-type-badge.奇幻 { background: linear-gradient(135deg, #667eea, #764ba2); }
.story-type-badge.冒险 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.story-type-badge.恐怖 { background: linear-gradient(135deg, #434343, #000000); }
.story-type-badge.日常 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #333; }
.story-type-badge.战斗 { background: linear-gradient(135deg, #f5576c, #ff6b6b); }

.story-result-title {
    font-size: 16px;
    font-weight: bold;
    color: #e94560;
}

.story-close {
    font-size: 22px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}
.story-close:hover { color: #e94560; }

.story-body { line-height: 1.8; }

.story-desc {
    font-size: 15px;
    margin-bottom: 20px;
    text-indent: 2em;
    color: #d0d0d0;
    animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.story-highlight {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255,215,0,0.5);
}

.story-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.story-choice-btn {
    padding: 14px 18px;
    border: 2px solid rgba(233,69,96,0.4);
    border-radius: 12px;
    background: rgba(15,52,96,0.6);
    color: #eaeaea;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}
.story-choice-btn:hover {
    border-color: #e94560;
    background: rgba(233,69,96,0.15);
    transform: translateX(6px);
    box-shadow: 0 0 20px rgba(233,69,96,0.2);
}
.choice-label {
    font-size: 12px;
    color: #e94560;
    font-weight: bold;
    margin-bottom: 4px;
}
.choice-text {
    font-size: 14px;
    color: #d0d0d0;
}

/* 结果页 */
.story-result-text {
    font-size: 15px;
    margin-bottom: 16px;
    text-indent: 2em;
    color: #d0d0d0;
    animation: fadeInUp 0.5s ease both;
}

.story-reward {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,215,0,0.3);
    animation: rewardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.3s;
}
@keyframes rewardPop {
    from { opacity: 0; transform: scale(0.5) rotateY(90deg); }
    to   { opacity: 1; transform: scale(1) rotateY(0); }
}
.reward-title {
    font-size: 14px;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}
.reward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 8px;
}
.reward-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.5));
}
.reward-info { flex: 1; }
.reward-name { font-size: 15px; font-weight: bold; }
.reward-detail { font-size: 12px; color: #aaa; margin-top: 2px; }

.story-continue-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e94560, #c23152);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}
.story-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}
