/* 🌳 技能树独立模块样式表 */

/* 1. 技能树容器自适应调整，将卡片稍微下移 */
.skilltree-scroll-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 6px 4px 10px 4px; /* 顶部缩减至 6px 紧密贴合 */
    box-sizing: border-box;
}

/* 2. 🌌 技能树外框面板基础样式 */
#mode-skilltree .result-panel {
    background: #0d111a !important;
    border: 1px solid #30363d !important;
    box-sizing: border-box !important;
}
#mode-skilltree .help-tip {
    color: #8b949e;
}
#mode-skilltree .result-header {
    font-size: 18px;
}

/* 3. 🎮 游戏风格技能面板外框 (Step 1) */
.skilltree-window {
    width: 100%;
    max-width: 440px;
    height: 620px;
    background: #111925;
    border: 3px solid #324353;
    border-radius: 8px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0,0,0,0.8), 0 0 0 1px rgba(255, 255, 255, 0.65);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 8px;
    position: relative;
    margin-top: 75px;
    flex-shrink: 0 !important; /* 强制绝对不缩减、不压缩技能栏大卡片尺寸 */
}

/* 4. 窗口头部装饰条 (Step 2) */
.st-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 28px;
    padding: 0 4px;
    padding-top: 0;
    margin-top: -5px; /* 向上移动5px */
    border-bottom: 1px solid #253341;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.st-header-title {
    flex: 1;
    text-align: center;
    color: #e2b464; /* 古典淡金黄，比亮橙色更高档 */
    font-weight: normal;
    font-size: 16px;
    letter-spacing: 4px;
    padding-left: 16px; /* 补偿右侧关闭按钮产生的偏心 */
    padding-top: 0;
    margin-top: -5px; /* 向上移动5px */
}
.st-header-close {
    width: 18px;
    height: 18px;
    background: #4a1818;
    border: 1px solid #7c5a43;
    margin-top: -5px; /* 向上移动5px */
    color: #e5cfb3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.2s, border-color 0.2s;
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
}
.st-header-close:hover {
    background: #6c2020;
    border-color: #9a6d51;
}

/* 5. 大卡片式选项卡 (Step 3) */
.st-tabs-row {
    display: flex;
    gap: 3px;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.st-tab {
    flex: 1;
    height: 30px;
    background: #141c25;
    border: 1px solid #233140;
    color: #8b949e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    user-select: none;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
}
.st-tab.active {
    background: #1f2b38;
    border: 1px solid;
    border-image: linear-gradient(to bottom, #3b4e5e, #a0b2c6, #3b4e5e) 1; /* 上下居中渐变 */
    color: #e2b464; /* 与第一行技能标题相同的金色 */
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1);
}
.st-tab:hover:not(.active) {
    background: #1a2533;
    border-color: #2e3e4f;
    color: #c9d1d9;
}

/* 正在开发中提示区域 */
.st-under-development {
    padding: 60px 20px;
    text-align: center;
    color: #8b949e;
    font-size: 14px;
    font-weight: bold;
    background: #141c25;
    border: 1px solid #233140;
    border-radius: 4px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

/* 6. 技能解放小区域 (Step 4) */
.st-release-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #0d141e;
    border: 1px solid #1a2533;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 1.5px;
    flex-shrink: 0;
}
.st-release-icon {
    width: 22px;
    height: 22px;
    background: #731e13;
    border: 1.5px solid #ab3f27;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.15), 0 1px 2px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.st-release-text {
    color: #e5b565; /* 暖金色/暖黄文字 */
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 7. 分栏与技能网格 (Step 5) */
.st-tree-body {
    flex: 1;
    display: flex;
    gap: 4px;
    min-height: 0;
    overflow: visible;
}
.st-tree-col {
    flex: 1;
    background: #0f1621;
    border: 1.5px solid #233140;
    border-radius: 4px;
    padding: 6px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}
/* 7. 分栏标题与技能点卡片 (Step 6) */
.st-headers-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 26px;
    padding: 0 16px;
    height: 32px;
    margin-top: 1.5px;
    margin-bottom: 1.5px;
    flex-shrink: 0;
    user-select: none;
}
.st-col-title {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    width: 60px;
    text-align: center;
}
.st-col-title.warm {
    color: #f3a83b; /* 暖色调：暖黄色/琥珀橙 */
}
.st-col-title.cool {
    color: #00e5ff; /* 冷色调：亮青色/冰蓝色 */
}

/* 技能点卡片 (Points Widget) */
.st-pts-widget {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #0f1622;
    border: 1.5px solid #233140;
    border-radius: 3px;
    padding: 1px 4px;
    height: 20px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
}
.st-pts-btn {
    width: 16px;
    height: 16px;
    background: #141c26;
    border: 1px solid #2c3c4d;
    color: #8b949e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: all 0.15s;
    user-select: none;
}
.st-pts-btn.confirm:hover {
    color: #3fb950;
    border-color: #2b7d37;
    background: #0d1e11;
}
.st-pts-btn.reset:hover {
    color: #f85149;
    border-color: #ad302a;
    background: #200f0f;
}
.st-pts-display {
    background: #040609;
    border: 1px solid #1a2533;
    border-radius: 2px;
    padding: 0 8px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.9);
}
.st-pts-val {
    color: #ffd88c; /* 数字金色 */
    font-family: monospace, monospace;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}
.st-col-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 6px 4px;
    overflow: visible;
    justify-items: center;
    align-items: center;
}
.st-slot {
    width: 100%;
    max-width: 40px;
    aspect-ratio: 1;
    background: #090e15;
    border: 3px solid rgba(74, 85, 104, 0.5);
    border-radius: 4px;
    overflow: visible;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}
.st-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
.st-slot-empty {
    width: 100%;
    max-width: 40px;
    aspect-ratio: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    box-sizing: border-box;
}

/* 🌟 技能格子交互与动态角标样式 🌟 */
.st-slot {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

/* 未解锁锁定状态：极暗遮罩，不显示可点击手势 */
.st-slot.locked {
    cursor: not-allowed;
    border-color: #1a2332 !important;
    background: #06090e !important;
    box-shadow: none !important;
}
.st-slot.locked img {
    filter: grayscale(100%) brightness(30%) !important;
}

/* 未加点状态：图标轻微变暗、微量灰度化（确保图标依旧清晰可读） */
.st-slot.zero img {
    filter: grayscale(45%) brightness(60%);
    transition: filter 0.2s;
}

/* 悬浮在未加点技能上高度复原并亮起 */
.st-slot.zero:hover img {
    filter: grayscale(15%) brightness(85%);
}

/* 已加点（激活）状态：图标恢复正常，边框亮青色/金黄 */
.st-slot.active-level {
    border-color: rgba(56, 189, 248, 0.5) !important; /* 经典天蓝色亮边框，50%透明度 */
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}
.st-slot.active-level img {
    filter: none;
}

/* 技能加满（超极值）状态：金色亮边框 + 呼吸发光特效 */
.st-slot.max-level {
    border-color: rgba(251, 191, 36, 0.65) !important; /* 暗金亮边框，65%透明度 */
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.65), inset 0 0 4px rgba(251, 191, 36, 0.4);
    animation: goldGlow 2.5s infinite alternate;
}
.st-slot.max-level img {
    filter: none;
}

/* 技能格右下角等级角标 */
.st-slot-level {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background: rgba(12, 17, 24, 0.85);
    color: #8b949e;
    font-size: 9px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 1px 3px;
    border-top-left-radius: 4px;
    border-left: 1px solid #30363d;
    border-top: 1px solid #30363d;
    line-height: 1;
    pointer-events: none;
    z-index: 5;
    transition: all 0.2s;
}

/* 激活状态角标变蓝色 */
.st-slot.active-level .st-slot-level {
    color: #38bdf8;
    background: rgba(12, 33, 48, 0.9);
    border-color: #38bdf8;
}

/* 满级状态角标变金色 */
.st-slot.max-level .st-slot-level {
    color: #fbbf24;
    background: rgba(28, 22, 10, 0.95);
    border-color: #fbbf24;
}

/* 锁定状态角标黑白 */
.st-slot.locked .st-slot-level {
    color: #8b949e;
    background: rgba(12, 17, 24, 0.85);
    border-color: #30363d;
    filter: grayscale(100%);
}

/* 金色边框呼吸发光动画 */
@keyframes goldGlow {
    0% {
        box-shadow: 0 0 8px rgba(251, 191, 36, 0.5), inset 0 0 2px rgba(251, 191, 36, 0.3);
    }
    100% {
        box-shadow: 0 0 14px rgba(251, 191, 36, 0.8), inset 0 0 6px rgba(251, 191, 36, 0.5);
    }
}

/* 🌟 职业与等级配置行样式 🌟 */
.st-config-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 440px !important; /* 与技能栏大卡片宽度一致 */
    margin: 0 auto 6px auto !important; /* 居中对齐 */
    padding: 6px 12px !important;
    background: rgba(20, 28, 38, 0.6) !important;
    border: 1px solid #1f2b38 !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}
.st-config-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #ffd88c !important; /* 暗金字体 */
    font-weight: bold !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}
.st-config-item label {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    color: #ffd88c !important;
}
.st-select, .st-input {
    background: #0d131a !important;
    border: 1px solid #2e3e4f !important;
    border-radius: 3px !important;
    color: #e2b464 !important; /* 金黄色文字 */
    font-size: 11px !important;
    padding: 2px 6px !important;
    outline: none !important;
    line-height: normal !important;
    vertical-align: middle !important;
    font-weight: bold !important;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    height: 20px !important;
}

/* 顶部配置重置按钮样式：红褐深色背景、圆角、灰色圆圈循环箭头图标 */
.st-header-reset-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: #471b16 !important; /* 暗红褐色背景 */
    border: 1px solid #6b2a21 !important; /* 灰红褐色圆角边框 */
    border-radius: 3px !important; /* 精致小圆角 */
    color: #a3a8b4 !important; /* 经典灰色 */
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s ease-in-out !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.05), 0 1px 3px rgba(0,0,0,0.4) !important;
}

.st-header-reset-btn:hover {
    background: #5d251d !important; /* 悬浮时稍亮 */
    border-color: #8c3529 !important;
    color: #e1e7f0 !important; /* 箭头变亮 */
    box-shadow: 0 0 6px rgba(140, 53, 41, 0.4) !important;
}

.st-header-reset-btn:active {
    transform: scale(0.92) !important; /* 按下微缩 */
    background: #331210 !important; /* 按下变暗 */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8) !important;
}

.st-header-reset-btn svg {
    pointer-events: none !important;
    transition: transform 0.3s ease !important;
}

.st-header-reset-btn:hover svg {
    transform: rotate(180deg) !important; /* 悬浮时箭头旋转动画，生动有趣 */
}
.st-select {
    width: auto !important; /* 强制覆盖手机端 select width: 100% 的规则 */
    max-width: 120px !important;
    height: auto !important;
    cursor: pointer !important;
}
.st-select:focus, .st-input:focus {
    border-color: #ffd88c !important;
    box-shadow: 0 0 4px rgba(255, 216, 140, 0.3) !important;
}
.st-input {
    width: 60px !important; /* 强制覆盖手机端 input width: 100% 的规则 */
    height: auto !important;
    text-align: center !important;
    -moz-appearance: textfield !important;
}
/* 隐藏 type="number" 的增减微调按钮 */
.st-input::-webkit-outer-spin-button,
.st-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 技能解放弹窗样式 */
.st-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.st-modal-content {
    background: #0d1117;
    border: 1px solid #2c3c4d;
    border-radius: 6px;
    width: 80%;
    max-width: 320px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

.st-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2c3c4d;
    color: #ffd88c;
    font-size: 14px;
    font-weight: bold;
}

.st-modal-close {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.st-modal-close:hover {
    color: #da3633;
}

.st-modal-body {
    padding: 20px 16px;
    color: #8b949e;
    font-size: 13px;
    text-align: center;
}

/* 技能 +/- 按钮样式 - 精致微型半透明设计 */
.st-skill-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 999;
    transition: all 0.15s;
    background: none; /* 无背景色 */
    border: none;
}

.st-skill-btn:active {
    transform: translateY(-50%) scale(0.85);
}

.st-skill-plus {
    left: -6px; /* 更靠近图标中心 */
    color: rgba(255, 255, 255, 0.4); /* +号40%透明度，更明显地透明 */
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5); /* 减弱阴影，让透明效果更明显 */
}
.st-skill-plus:hover {
    color: rgba(255, 255, 255, 1); /* hover时不透明 */
    transform: translateY(-50%) scale(1.15);
}

.st-skill-minus {
    right: -6px; /* 更靠近图标中心 */
    color: rgba(255, 255, 255, 0.4); /* -号40%透明度，更明显地透明 */
    font-size: 18px;
    font-weight: bold;
    transform: translateY(-50%) scaleX(1.5); /* 横向拉伸1.5倍让减号看起来更长 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5); /* 减弱阴影，让透明效果更明显 */
}
.st-skill-minus:hover {
    color: rgba(255, 255, 255, 1); /* hover时不透明 */
    transform: translateY(-50%) scaleX(1.5) scale(1.15); /* 保持横向拉伸并添加hover放大效果 */
}

/* 技能格子容器：必须要溢出可见，且左右留出微量边距给按钮 */
.st-slot {
    position: relative;
    overflow: visible !important; /* 核心修复：确保溢出的按钮能显示出来 */
}

/* 🌟 手机端专属极简化微调与禁止滚动补丁 🌟 */
@media screen and (max-width: 900px) {
    /* 彻底禁止手机端技能树容器的上下滑动 */
    .skilltree-scroll-container {
        overflow-y: hidden !important;
        padding-top: 0px !important;
        padding-bottom: 0px !important;
    }
    
    /* 撤销手机端顶部 75px 的无用留白，往上提拉，释放整个视口空间 */
    .st-config-row {
        margin-top: 2px !important;
        margin-bottom: 4px !important;
    }
    
    /* 恢复技能大卡片原汁原味的高度与身材尺寸，仅作顶部零留白对齐 */
    .skilltree-window {
        margin-top: 0px !important;
    }
}


