/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 50%, #000000 100%);
    color: #d4c5a9;
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* 背景粒子效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 140, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 105, 20, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 69, 0, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

#game-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 6px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==================== 头部样式 ==================== */
#header {
    background: linear-gradient(135deg, #2a1f14 0%, #1a1210 50%, #0f0a05 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 8px 16px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 140, 0, 0.1);
    position: relative;
    overflow: hidden;
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.05), transparent);
    animation: headerShine 8s infinite;
}

@keyframes headerShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

#header h1 {
    color: #ff8c00;
    font-size: 20px;
    text-shadow: 
        0 0 10px rgba(255, 140, 0, 0.5),
        2px 2px 4px #000,
        0 0 20px rgba(255, 140, 0, 0.3);
    letter-spacing: 2px;
    font-weight: bold;
}

#header-buttons {
    display: flex;
    gap: 8px;
}

#header-buttons button {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    color: #d4c5a9;
    border: 1px solid #8b6914;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#header-buttons button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 140, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

#header-buttons button:hover::before {
    width: 200px;
    height: 200px;
}

#header-buttons button:hover {
    background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
    border-color: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
    transform: translateY(-2px);
}

#header-buttons button:active {
    transform: translateY(0);
}

/* ==================== 主内容区域 ==================== */
#main-content {
    display: grid;
    grid-template-columns: 300px 300px 320px 1fr;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.column {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

/* 隐藏列滚动条 */
.column::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.column {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.log-column {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.column:nth-child(2) > .panel-section:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.column:nth-child(2) > .panel-section:last-child #skills-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.column:nth-child(3) > .panel-section:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.column:nth-child(3) > .panel-section:last-child #area-selection {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.log-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.log-column > .panel-section:last-child {
    margin-top: auto;
}

.column:nth-child(2) > .panel-section:last-child {
    margin-top: auto;
}

/* ==================== 面板样式 ==================== */
.panel-section {
    background: linear-gradient(180deg, rgba(42, 31, 20, 0.95) 0%, rgba(26, 18, 16, 0.95) 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 140, 0, 0.05);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.panel-section:hover {
    border-color: #a07818;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(139, 105, 20, 0.1);
}

.panel-section h3 {
    color: #ff8c00;
    border-bottom: 2px solid #8b6914;
    padding-bottom: 5px;
    margin-bottom: 6px;
    font-size: 15px;
    text-shadow: 0 0 8px rgba(255, 140, 0, 0.3);
    letter-spacing: 1px;
    position: relative;
}

.panel-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ff8c00, transparent);
}

/* ==================== 角色信息 ==================== */
#player-info > div:not(.hp-bar-wrapper):not(.mp-bar-wrapper), 
#player-stats > div {
    margin: 2px 0;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s;
}

#player-info > div:not(.hp-bar-wrapper):not(.mp-bar-wrapper):hover, 
#player-stats > div:hover {
    background: rgba(139, 105, 20, 0.1);
}

.stat-label {
    color: #a89070;
    font-weight: 500;
}

.stat-value {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* ==================== 血条/蓝条 ==================== */
.hp-bar-wrapper, .mp-bar-wrapper {
    margin: 2px 0;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s;
    width: 100%;
}

.hp-bar-wrapper:hover, .mp-bar-wrapper:hover {
    background: rgba(139, 105, 20, 0.1);
}

.hp-bar, .mp-bar {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    height: 20px;
    border-radius: 10px;
    margin: 0;
    position: relative;
    overflow: hidden;
    border: 2px solid #444;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.hp-bar-fill {
    background: linear-gradient(90deg, #8b0000 0%, #ff4500 50%, #ff6347 100%);
    height: 100%;
    transition: width 0.5s ease;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.hp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

.mp-bar-fill {
    background: linear-gradient(90deg, #00008b 0%, #4169e1 50%, #6495ed 100%);
    height: 100%;
    transition: width 0.5s ease;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(65, 105, 225, 0.5);
}

.mp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

.bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    text-shadow: 1px 1px 3px #000, 0 0 5px rgba(0, 0, 0, 0.8);
    z-index: 2;
    width: 100%;
    text-align: center;
    font-weight: bold;
    line-height: 1;
}

/* ==================== 装备栏 ==================== */
#equipment-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.equip-slot {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.equip-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.1), transparent);
    transition: left 0.5s;
}

.equip-slot:hover::before {
    left: 100%;
}

.equip-slot:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.3);
    transform: translateY(-2px);
}

.equip-slot-name {
    color: #a89070;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equip-slot-item {
    font-size: 13px;
    margin-top: 2px;
    font-weight: 500;
}

/* ==================== 品质颜色 ==================== */
.quality-white { 
    color: #ffffff; 
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}
.quality-magic { 
    color: #6969ff; 
    text-shadow: 0 0 8px rgba(105, 105, 255, 0.4);
}
.quality-rare { 
    color: #ffff00; 
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.4);
}
.quality-legendary { 
    color: #ff8c00; 
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}
.quality-set { 
    color: #00ff00; 
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

/* ==================== 技能列表 ==================== */
#skills-list {
    overflow-y: auto;
    overflow-x: hidden;
}

.skill-item {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 4px;
    padding: 5px 8px;
    margin: 3px 0;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.skill-item:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.2);
    transform: translateX(2px);
}

.skill-name {
    color: #ffd700;
    font-weight: 500;
}

.skill-level {
    color: #a89070;
    font-size: 12px;
    margin-left: auto;
}

.skill-type {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-active {
    background: linear-gradient(135deg, #8b0000 0%, #cc0000 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.4);
}

.skill-passive {
    background: linear-gradient(135deg, #006400 0%, #008000 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 100, 0, 0.4);
}

/* ==================== 雇佣兵信息 ==================== */
#mercenary-info {
    min-height: 60px;
    font-size: 15px;
}

/* ==================== 按钮样式 ==================== */
#action-buttons, #battle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#action-buttons button, #battle-actions button {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    color: #d4c5a9;
    border: 2px solid #8b6914;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 70px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#action-buttons button::before, #battle-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 140, 0, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

#action-buttons button:hover::before, #battle-actions button:hover::before {
    width: 200px;
    height: 200px;
}

#action-buttons button:hover, #battle-actions button:hover {
    background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
    border-color: #ff8c00;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.3);
    transform: translateY(-2px);
}

#action-buttons button:active, #battle-actions button:active {
    transform: translateY(0);
}

#action-buttons button:disabled, #battle-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#action-buttons button:disabled:hover::before, #battle-actions button:disabled:hover::before {
    width: 0;
    height: 0;
}

/* ==================== 区域按钮 ==================== */
#area-selection {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.area-btn {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    color: #d4c5a9;
    border: 2px solid #8b6914;
    border-radius: 4px;
    padding: 5px 10px 5px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: visible;
    white-space: nowrap;
    min-height: 28px;
    display: flex;
    align-items: center;
}

.area-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s;
}

.area-btn.safe::before {
    background: linear-gradient(180deg, #00ff00, #00cc00);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.area-btn.danger::before {
    background: linear-gradient(180deg, #ff0000, #cc0000);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.area-btn:hover {
    background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
    border-color: #ff8c00;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.2);
    transform: translateX(4px);
}

.area-btn.current {
    background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
    border-color: #ff8c00;
    box-shadow: 
        0 0 15px rgba(255, 140, 0, 0.4),
        inset 0 0 10px rgba(255, 140, 0, 0.1);
}

.area-btn.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.area-btn.locked:hover {
    transform: none;
    border-color: #666;
    box-shadow: none;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
}

/* ==================== 战斗日志 ==================== */
#game-log {
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 6px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    min-height: 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.log-entry {
    margin: 2px 0;
    padding: 2px 6px;
    border-left: 3px solid transparent;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s;
    line-height: 1.5;
}

.log-entry:hover {
    background: rgba(139, 105, 20, 0.05);
    border-left-color: #8b6914;
}

.log-system { 
    color: #a89070; 
}
.log-damage { 
    color: #ff4500; 
    font-weight: 500;
    text-shadow: 0 0 5px rgba(255, 69, 0, 0.3);
}
.log-crit { 
    color: #ff0000; 
    font-weight: bold; 
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
.log-boss { 
    color: #ff0000; 
    font-weight: bold; 
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
}
.log-drop { 
    color: #00ff00; 
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}
.log-skill { 
    color: #6969ff; 
    text-shadow: 0 0 8px rgba(105, 105, 255, 0.3);
}
.log-merc { 
    color: #ffa500; 
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.3);
}
.log-heal { 
    color: #00ff00; 
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}
.log-exp { 
    color: #ffd700; 
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}
.log-levelup { 
    color: #ff8c00; 
    font-weight: bold; 
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

/* ==================== 弹窗样式 ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(180deg, #2a1f14 0%, #1a1210 50%, #0f0a05 100%);
    border: 2px solid #8b6914;
    border-radius: 10px;
    padding: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(139, 105, 20, 0.2),
        inset 0 1px 0 rgba(255, 140, 0, 0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8b6914;
    padding-bottom: 12px;
    margin-bottom: 18px;
    position: sticky;
    top: -20px;
    background: linear-gradient(180deg, #2a1f14 0%, #2a1f14 80%, transparent 100%);
    padding-top: 0;
    z-index: 10;
}

.modal-header h2 {
    color: #ff8c00;
    margin: 0;
    border: none;
    padding: 0;
    font-size: 22px;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
    letter-spacing: 1px;
}

.modal-close {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    border: 2px solid #8b6914;
    border-radius: 50%;
    color: #ff8c00;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
    border-color: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
    transform: rotate(90deg);
}

/* ==================== 背包物品 ==================== */
.inventory-item {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 8px;
    margin: 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.inventory-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.08), transparent);
    transition: left 0.5s;
}

.inventory-item:hover::before {
    left: 100%;
}

.inventory-item:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.2);
    transform: translateX(4px);
}

/* ==================== 商店物品 ==================== */
.shop-item {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 8px;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.2);
}

.shop-item button {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    color: #d4c5a9;
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.shop-item button:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
    transform: translateY(-2px);
}

.shop-item button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== 详情行 ==================== */
.detail-row {
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    padding: 3px 6px;
    border-radius: 3px;
    transition: background 0.2s;
}

.detail-row:hover {
    background: rgba(139, 105, 20, 0.1);
}

.detail-label {
    color: #a89070;
    font-weight: 500;
}

.detail-value {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

/* ==================== 铁匠铺 ==================== */
.blacksmith-section {
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blacksmith-section h4 {
    color: #ff8c00;
    margin-bottom: 8px;
    font-size: 15px;
    text-shadow: 0 0 8px rgba(255, 140, 0, 0.3);
}

/* 铁匠铺TAB样式 */
.blacksmith-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 2px solid #8b6914;
}

.blacksmith-tab {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    color: #a89070;
    border: 2px solid #5a4510;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s;
    user-select: none;
}

.blacksmith-tab:hover {
    background: linear-gradient(180deg, #2a1f10 0%, #1a1210 100%);
    color: #ff8c00;
}

.blacksmith-tab.active {
    background: linear-gradient(180deg, #3a2a15 0%, #2a1f10 100%);
    color: #ffd700;
    border-color: #8b6914;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.blacksmith-tab-content {
    display: none;
}

.blacksmith-tab-content.active {
    display: block;
}

.blacksmith-btn {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    color: #d4c5a9;
    border: 2px solid #8b6914;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.blacksmith-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 140, 0, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.blacksmith-btn:hover::before {
    width: 200px;
    height: 200px;
}

.blacksmith-btn:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.3);
    transform: translateY(-2px);
}

.blacksmith-btn:active {
    transform: translateY(0);
}

/* ==================== 雇佣兵卡片 ==================== */
.mercenary-card {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 10px;
    margin: 6px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.mercenary-card:hover {
    border-color: #a07818;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.mercenary-card h4 {
    color: #ffa500;
    margin-bottom: 8px;
    font-size: 15px;
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.3);
}

/* ==================== 怪物图鉴 ==================== */
.monster-book-entry {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
    padding: 8px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.monster-book-entry:hover {
    border-color: #ff8c00;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.2);
}

.monster-book-entry.unknown {
    color: #666;
    font-style: italic;
    border-style: dashed;
}

/* ==================== 悬浮提示框 ==================== */
.item-tooltip {
    display: none;
    position: fixed;
    background: linear-gradient(180deg, #2a1f14 0%, #1a1210 50%, #0f0a05 100%);
    border: 2px solid #8b6914;
    border-radius: 8px;
    padding: 10px 12px;
    z-index: 2000;
    pointer-events: none;
    min-width: 300px;
    max-width: 450px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(139, 105, 20, 0.2);
    font-size: 13px;
    line-height: 1.4;
    animation: tooltipFade 0.2s ease;
}

@keyframes tooltipFade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.item-tooltip.visible {
    display: block;
}

.item-tooltip .tt-compare {
    display: flex;
    gap: 15px;
}

.item-tooltip .tt-col {
    flex: 1;
    min-width: 0;
}

.item-tooltip .tt-col + .tt-col {
    border-left: 2px solid #8b6914;
    padding-left: 15px;
}

.item-tooltip h4 {
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #8b6914;
    font-size: 17px;
    text-shadow: 0 0 8px rgba(255, 140, 0, 0.3);
}

.item-tooltip h5 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #ff8c00;
}

.item-tooltip .tt-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.item-tooltip .tt-row:hover {
    background: rgba(139, 105, 20, 0.1);
}

.item-tooltip .tt-label {
    color: #a89070;
    font-weight: 500;
}

.item-tooltip .tt-value {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #1a1210 0%, #0f0a08 100%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b6914 0%, #6b5010 100%);
    border-radius: 3px;
    border: 1px solid #1a1210;
}

/* 可折叠区块 */
.item-tooltip .tt-section {
    margin: 6px 0;
    border: 1px solid #5a4510;
    border-radius: 4px;
    overflow: hidden;
}

.item-tooltip .tt-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: linear-gradient(180deg, #3a2a15 0%, #2a1f10 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.item-tooltip .tt-section-header:hover {
    background: linear-gradient(180deg, #4a3520 0%, #3a2a15 100%);
}

.item-tooltip .tt-section-header .tt-section-title {
    font-weight: bold;
    font-size: 13px;
    color: #ff8c00;
}

.item-tooltip .tt-section-header .tt-section-arrow {
    font-size: 12px;
    color: #a89070;
    transition: transform 0.2s;
}

.item-tooltip .tt-section.collapsed .tt-section-arrow {
    transform: rotate(-90deg);
}

.item-tooltip .tt-section-content {
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 500px;
    overflow: hidden;
}

.item-tooltip .tt-section.collapsed .tt-section-content {
    max-height: 0;
    padding: 0 10px;
}

/* 套装区块特殊样式 */
.item-tooltip .tt-section.set-section {
    border-color: #00aa00;
}

.item-tooltip .tt-section.set-section .tt-section-header {
    background: linear-gradient(180deg, #1a3a15 0%, #0f2a0a 100%);
}

.item-tooltip .tt-section.set-section .tt-section-header:hover {
    background: linear-gradient(180deg, #2a4a20 0%, #1a3a15 100%);
}

.item-tooltip .tt-section.set-section .tt-section-title {
    color: #00ff00;
}

/* 镶嵌区块特殊样式 */
.item-tooltip .tt-section.socket-section {
    border-color: #6a5a30;
}

.item-tooltip .tt-section.socket-section .tt-section-header {
    background: linear-gradient(180deg, #2a2515 0%, #1a1510 100%);
}

.item-tooltip .tt-section.socket-section .tt-section-header:hover {
    background: linear-gradient(180deg, #3a3520 0%, #2a2515 100%);
}

.item-tooltip .tt-section.socket-section .tt-section-title {
    color: #aaa;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff8c00 0%, #8b6914 100%);
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.4);
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 1400px) {
    #main-content {
        grid-template-columns: 280px 280px 300px 1fr;
    }
}

@media (max-width: 1200px) {
    #main-content {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .log-column {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    #main-content {
        grid-template-columns: 1fr;
    }
    
    .log-column {
        grid-column: 1;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 140, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 140, 0, 0.6); }
}

.log-boss {
    animation: pulse 2s infinite;
}

/* ==================== 加载动画 ==================== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading {
    background: linear-gradient(90deg, #1a1210 25%, #2a1f14 50%, #1a1210 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}