* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
    overflow: hidden;
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: sans-serif;
    font-size: 17px;
}
#main-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: 100%;
    align-items: stretch;
}
h2 {
    color: #d1b06b;
    border-bottom: 2px solid #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
}
#character-panel {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
}
#stats-display {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}
.stat-line { background-color: #2a2a2a; padding: 8px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 1.15em; }
.stat-line .value { color: #fff; font-weight: bold; }
.stat-line .bonus { color: #7fbf7f; margin-left: 5px; }
#builder-panel {
    flex: 2.25;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
}




/* style.css (新代码) */
#equipped-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));

    grid-template-rows: repeat(auto-fit, minmax(0, 1fr));
    gap: 15px;
    flex: 1;
    overflow-y: hidden; /* 内容将被裁剪，没有滚动条 */
    /* 如果你想设置一个固定的上限，可以考虑添加 max-height */
    /* max-height: 300px; */
    align-content: start;
}

.paperdoll-slot {
    /*min-height: 377px;*/
    background-color: #2a2a2a;
    border: 1px dashed #555;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    font-size: 1.2em;
    color: #888;
    position: relative;
    cursor: pointer;
}
#right-placeholder-panel {
    flex: 2.2;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
}
.paperdoll-slot:hover { border-color: #d1b06b; border-style: solid; }

.paperdoll-slot.equipped { border-style: solid; color: #fff; justify-content: flex-start; align-items: stretch; /*overflow: hidden; /* <--- 新增的这行是关键 */}

.paperdoll-slot .item-name { font-size: 0.95em; font-weight: normal; word-break: break-all; }
.paperdoll-slot .unequip-btn { position: absolute; top: 3px; right: 3px; line-height: 1; background: #c04040; color: white; border: none; border-radius: 3px; cursor: pointer; padding: 2px 6px; font-size: 0.8em; z-index: 5; }
.equipped-item-header { font-weight: bold; text-align: center; padding-bottom: 3px; margin-bottom: 3px; border-bottom: 1px solid rgba(128, 128, 128, 0.5); font-size: 1em; flex-shrink: 0; }
.equipped-item-stats { display: flex; flex-direction: column; gap: 2px; width: 100%; font-size: 0.9em; font-weight: normal; overflow-y: auto; flex-grow: 1; }
/* 修改后 */
.stat-line-in-slot {
     display: grid; /* 【核心修改】从 flex 改为 grid */
    grid-template-columns: 1fr auto; /* 定义一个两栏网格：左栏(1fr)自动填充，右栏(auto)随内容大小 */
    gap: 10px; /* 设置两栏之间的间距 */
    align-items: center;
}

.hidden { display: none !important; }
.item-selector-popup { position: absolute; background-color: #222; border: 1px solid #777; border-radius: 4px; z-index: 1001; display: flex; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.selector-column { display: flex; flex-direction: column; max-height: 450px; overflow-y: auto; border-right: 1px solid #444; }
.selector-column:last-child { border-right: none; }
.selector-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #444; white-space: nowrap; width: 200px; }
.selector-item:last-child { border-bottom: none; }
.selector-item:hover { background-color: #4a4a4a; }
.selector-item.active { background-color: #4a4a4a; color: #d1b06b; }
.rarity-grid-container { display: grid; grid-template-columns: repeat(3, 160px); grid-template-rows: repeat(3, auto); gap: 8px; padding: 8px; }
.rarity-grid-cell { border: 1px solid #555; border-radius: 4px; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; font-weight: bold; cursor: pointer; transition: all 0.2s ease; padding: 8px; }
.rarity-grid-cell:not(.disabled):hover { transform: scale(1.08); border-width: 2.5px; }
.rarity-grid-cell.disabled { background-color: #222; color: #555; cursor: not-allowed; border-style: dashed; }
.rarity-header { text-align: center; padding-bottom: 5px; border-bottom: 1px solid #555; margin-bottom: 5px; font-size: 1.1em; }
.rarity-stats-list { display: flex; flex-direction: column; gap: 3px; font-size: 0.85em; font-weight: normal; }
.stat-line-in-popup { display: flex; justify-content: space-between; color: #ddd; }
.stat-line-in-popup span:last-child { font-weight: bold; }
.rarity-poor, .paperdoll-slot.rarity-poor { background-color: #3e3e3e; border-color: #9d9d9d; }
.rarity-poor .rarity-header { color: #9d9d9d; }
.rarity-common, .paperdoll-slot.rarity-common { background-color: #4a4a4a; border-color: #fff; }
.rarity-common .rarity-header { color: #fff; }
.rarity-uncommon, .paperdoll-slot.rarity-uncommon { background-color: #2a4b3a; border-color: #44cc44; }
.rarity-uncommon .rarity-header { color: #44cc44; }
.rarity-rare, .paperdoll-slot.rarity-rare { background-color: #2a3a5e; border-color: #5588ff; }
.rarity-rare .rarity-header { color: #5588ff; }
.rarity-epic, .paperdoll-slot.rarity-epic { background-color: #4a2a6b; border-color: #aa44dd; }
.rarity-epic .rarity-header { color: #aa44dd; }
.rarity-legendary, .paperdoll-slot.rarity-legendary { background-color: #6a5a2a; border-color: #f2b300; }
.rarity-legendary .rarity-header { color: #f2b300; }
.rarity-unique, .paperdoll-slot.rarity-unique { background-color: #6a3a2a; border-color: #f26b00; }
.rarity-unique .rarity-header { color: #f26b00; }

.random-affixes-container {
    margin-top: 10px;
    /* 将 padding-top 合并，并新增左右内边距 */
    padding: 10px 25px 0; /* 上:10px 左右:25px 下:0 */
    border-top: 1px solid rgba(128, 128, 128, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.random-affix-row { display: flex; gap: 4px; align-items: center;  font-size: 0.95em; /* <-- 新增这一行来控制整体大小 *//* justify-content: center; 已被删除 */}
.selected-option-display { background-color: transparent; color: #00aaee; border-radius: 4px; font-size: 1em; font-weight: bold; transition: all 0.2s ease; height: 26px; padding: 0 6px; line-height: 24px; border: 1px solid rgba(255, 255, 255, 0); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; flex-grow: 1; min-width: 130px; }
.selected-option-display:hover { border-color: rgba(255, 255, 255, 0.7); }
.custom-select-container { position: relative; flex-grow: 1; min-width: 130px; }
/* style.css (新代码) */

.options-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #777;
    border-radius: 4px;
    margin-top: 4px;
    z-index: 1002;


    height: auto;
    min-height: 100%;
    max-height: 350px;
    overflow-y: auto;

    /* 【核心修改】用透明度和可见性来隐藏，而不是 display: none */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px); /* 可以加一个轻微的向上位移动画 */
    pointer-events: none; /* 隐藏时不可点击 */
    transition: all 0.2s ease;
}

/* 当被打开时，让它变得可见 */
.custom-select-container.open .options-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}/* 别忘了还有这个向上展开的样式 */
.custom-select-container.open-up .options-panel {
    top: auto;
    bottom: 100%;
    margin-bottom: 4px;
    margin-top: 0;
}

.options-panel ul { list-style: none; padding: 0; margin: 0; }
.custom-option { color: white; padding: 8px 12px; cursor: pointer; transition: background-color 0.2s ease; font-size: 0.85em; white-space: nowrap; }
.custom-option:hover { background-color: #4a4a4a; }
#stats-display::-webkit-scrollbar, .selector-column::-webkit-scrollbar, .options-panel::-webkit-scrollbar, .rarity-grid-container::-webkit-scrollbar { width: 8px; height: 8px; }
#stats-display::-webkit-scrollbar-track, .selector-column::-webkit-scrollbar-track, .options-panel::-webkit-scrollbar-track, .rarity-grid-container::-webkit-scrollbar-track { background: transparent; }
#stats-display::-webkit-scrollbar-thumb, .selector-column::-webkit-scrollbar-thumb, .options-panel::-webkit-scrollbar-thumb, .rarity-grid-container::-webkit-scrollbar-thumb { background-color: #444444; border-radius: 4px; }
#stats-display::-webkit-scrollbar-thumb:hover, .selector-column::-webkit-scrollbar-thumb:hover, .options-panel::-webkit-scrollbar-thumb:hover, .rarity-grid-container::-webkit-scrollbar-thumb:hover { background-color: #666666; }


.equipped-item-stats::-webkit-scrollbar { height: 6px; width: 6px; }

.equipped-item-stats::-webkit-scrollbar-track { background: transparent; }

.equipped-item-stats::-webkit-scrollbar-thumb { background-color: #444444; border-radius: 3px; }

.equipped-item-stats::-webkit-scrollbar-thumb:hover { background-color: #666666; }

/* 修改后 */
.stat-name-range {
    /* 【核心修改】明确分配宽度，并禁止收缩 */
    flex-basis: 120px; /* 预留 110px 的基础宽度 */
    flex-shrink: 0;    /* 禁止在空间不足时被压缩 */

    margin-right: 10px;
    color: #ddd;

    /* 【调试专用】您可以临时加上这行，看看它是否显示为一个黄色块 */
    /*background-color: yellow;*/
}

/* 修改后 */
.range-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    /* flex: 1; 已被删除 */
    min-width: 0;
}



.item-stat-slider { flex-grow: 1; -webkit-appearance: none; appearance: none; height: 8px; background: #333; border-radius: 4px; outline: none; cursor: grab; }
.item-stat-slider::-webkit-slider-track { background: #333; border-radius: 4px; height: 8px; cursor: grab; }
.item-stat-slider::-moz-range-track { background: #333; border-radius: 4px; height: 8px; cursor: grab; }
.item-stat-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #00aaee; cursor: grab; border: 2px solid #1a1a1a; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.item-stat-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #00aaee; cursor: grab; border: 2px solid #1a1a1a; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.range-slider-value { font-weight: bold; min-width: 30px; text-align: right; color: #ddd; }
@media (max-width: 1300px) {
    #right-placeholder-panel { display: none; }
    #character-panel { flex: 1; }
    #builder-panel { flex: 3; }
    #equipped-items { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
    #main-container { flex-direction: column; height: auto; overflow-y: auto; }
    #character-panel, #builder-panel { width: 100%; flex: none; }
    #equipped-items { grid-template-columns: repeat(2, 1fr); }
    #main-container { padding: 10px; gap: 10px; }
}
.stat-positive { color: #b3de05; }
.stat-negative { color: #db0505; }
.stat-separator { height: 1px; background-color: #444; margin: 8px 2px; border: none; border-radius: 1px; }
#character-title { cursor: pointer; user-select: none; padding: 1px 1px; border-radius: 8px; transition: background-color 0.2s ease; text-align: center; border-bottom: 2px solid #444; font-size: 1.45rem; }
#character-title:hover { background-color: #3a3a3a; }
.class-list-popup { position: absolute; background-color: #2a2a2a; border: 1px solid #777; border-radius: 4px; z-index: 1000; box-shadow: 0 5px 15px rgba(0,0,0,0.5); padding: 5px 0; margin: 0; }
.class-list-popup ul { list-style: none; padding: 0; margin: 0; }
.class-list-popup li { padding: 8px 25px; cursor: pointer; white-space: nowrap; font-size: 1.1em; }
.class-list-popup li:hover { background-color: #4a4a4a; color: #d1b06b; }
.class-list-popup li.active { font-weight: bold; color: #d1b06b; }

/* 修改后 */
.affix-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 4px;
    height: 26px;
    padding: 0 6px;
    transition: border-color 0.2s ease;

    /* --- 新增 --- */
    min-width: 80px; /* 1. 给它一个最小宽度，确保所有行的这部分都一样宽 */
    justify-content: flex-start; /* 2. 让它内部的元素(+ 1 %)靠左对齐 */
}

.affix-input-wrapper:hover { border-color: rgba(255, 255, 255, 0.7); }
.affix-input { border: none; background: transparent; padding: 0; height: 100%; color: #00aaee; font-weight: bold; font-size: 1em; cursor: text; text-align: right; width: 35px; padding-right: 3px; }
.affix-input:focus { outline: none; }
.affix-input::-webkit-outer-spin-button, .affix-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.affix-input[type=number] { -moz-appearance: textfield; }
.affix-percent-sign { color: #00aaee; font-weight: bold; font-size: 0.9em; user-select: none; /* --- 新增：手动微调垂直位置 --- */
    position: relative;
    top: -1px; /* <-- 和“+”号一样，你可以调整这个值, 负数向上, 正数向下 */}
.affix-plus-sign { color: #00aaee; font-weight: bold; font-size: 1em; user-select: none; padding-right: 0px; /* --- 新增：手动微调垂直位置 --- */
    position: relative; /* 1. 开启相对定位，让 top 属性生效 */
    top: -1px;          /* 2. 向上微调1个像素。你可以尝试 -2px, 1px 等值 */}

/* --- 新增：为中间的“配装面板”美化滚动条 --- */
#builder-panel::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#builder-panel::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

#builder-panel::-webkit-scrollbar-thumb {
    background-color: #444444;
    border-radius: 4px;
    border: 2px solid #2a2a2a;
}

#builder-panel::-webkit-scrollbar-thumb:hover {
    background-color: #666666;
}

/* --- 新增：为3x3装备网格美化滚动条 --- */
#equipped-items::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#equipped-items::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

#equipped-items::-webkit-scrollbar-thumb {
    background-color: #444444;
    border-radius: 4px;
    border: 2px solid #2a2a2a;
}

#equipped-items::-webkit-scrollbar-thumb:hover {
    background-color: #666666;
}

/* --- 新增：右侧“已保存配装”面板的样式 --- */

/* 让右侧面板也成为一个flex容器，方便内部元素布局 */
#right-placeholder-panel {
    display: flex;
    flex-direction: column;
    gap: 0px; /* 在标题、保存区域和列表之间增加间距 */
}

/* “保存”操作区域的样式 */
#save-build-action-area {
    display: flex;
    gap: 10px; /* 在输入框和按钮之间增加间距 */
}

/* 输入框的样式 */
#build-name-input {
    flex-grow: 1; /* 让输入框占据大部分空间 */
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 8px 12px;
    font-size: 1em;
}
#build-name-input:focus {
    outline: none;
    border-color: #d1b06b;
}

/* 保存按钮的样式 */
#save-build-button {
    background-color: #3e6b3a; /* 一个表示“成功”的绿色 */
    color: white;
    border: 1px solid #44cc44;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap; /* 防止文字换行 */
}
#save-build-button:hover {
    background-color: #4a8b44;
}

/* 保存列表的容器样式 */
#saved-builds-list {
    list-style: none; /* 去掉列表默认的小圆点 */
    flex-grow: 1; /* 占据所有剩余的垂直空间 */
    overflow-y: auto; /* 当列表项太多时，出现滚动条 */
    padding-right: 5px; /* 为滚动条留出一点空间 */
}

/* 每一个列表项的样式 */
.saved-build-item {
    background-color: #2a2a2a;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}
.build-info {
    /* 新增：让 build-info 作为一个 flex item，可以收缩和增长 */
    flex-grow: 1;    /* 允许它占据可用空间 */
    flex-shrink: 1;  /* 允许它在必要时收缩 */
    min-width: 0;    /* 关键：防止内部内容撑开容器，允许它收缩到0，文本换行 */
    /* 如果 build-info 内部的子元素（如 build-name）是 block 元素，
       通常不需要 display: flex; flex-direction: column; 也可以自动换行。
       如果需要更精细的控制，可以加上：
       display: flex;
       flex-direction: column;
    */
}
/* 列表项中左侧信息区域的样式 */
.build-info .build-name {
    font-size: 1.1em;
    white-space: normal;
    overflow-wrap: break-word;
    font-weight: bold;
    color: #fff;
}
.build-info .build-class,
.build-info .build-date {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

/* 列表项中右侧按钮区域的样式 */
.build-actions button {
    background-color: #2a3a5e;
    color: white;
    border: 1px solid #5588ff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
}
.build-actions button:hover {
    background-color: #3a5a8e;
}
/* 为删除按钮设置一个不同的、表示“危险”的颜色 */
.build-actions .delete-build-btn {
    background-color: #6b2a2a;
    border-color: #c04040;
}
.build-actions .delete-build-btn:hover {
    background-color: #8b3a3a;
}

/* 移除原h2的下边距，因为它现在由父容器控制 */
#builder-panel h2 {
    margin-bottom: 0;
}






.builder-action-btn {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #666;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.2s ease;
}

.builder-action-btn:hover {
    background-color: #444;
    border-color: #d1b06b;
}


/* ========================================================== */
/* ============= 新增：保存配装弹窗 (Modal) 样式 ============= */
/* ========================================================== */
.modal-overlay {
    position: fixed; /* 固定定位，覆盖全屏 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 半透明黑色蒙层 */
    z-index: 2000; /* 确保在最上层 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 为显示/隐藏添加渐变动画 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 当没有hidden类时，弹窗显示 */
.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 25px 30px;
    border-radius: 8px;
    border: 1px solid #555;
    width: 100%;
    max-width: 450px; /* 限制最大宽度 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* 当弹窗出现时，有一个从小到大的动画效果 */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}


.modal-content h3 {
    color: #d1b06b;
    margin: 0;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1.5em;
}

.modal-content p {
    color: #aaa;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
}

/* 移动过来的输入框，给它新的样式 */
#build-name-input {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 10px 14px;
    font-size: 1em;
    margin-bottom: 20px;
}
#build-name-input:focus {
    outline: none;
    border-color: #d1b06b;
}

.modal-actions {
    display: flex;
    justify-content: flex-end; /* 按钮靠右 */
    gap: 15px;
}

.modal-btn-primary, .modal-btn-secondary {
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95em;
}

/* 确认按钮（主按钮）的样式 */
.modal-btn-primary {
    background-color: #3e6b3a;
    border-color: #44cc44;
    color: white;
}
.modal-btn-primary:hover {
    background-color: #4a8b44;
}

/* 取消按钮（次要按钮）的样式 */
.modal-btn-secondary {
    background-color: #555;
    border-color: #777;
    color: white;
}
.modal-btn-secondary:hover {
    background-color: #666;
}

/* ========================================================== */
/* ============= 新增：查看配装抽屉 (Drawer) 样式 ============= */
/* ========================================================== */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    /*width: 700px; /* 抽屉宽度 */
    height: 100%;
    background-color: #1e1e1e;
    border-left: 1px solid #555;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4);
    z-index: 1010; /* 比背景板高，比弹窗低 */
    display: flex;
    flex-direction: column;
    /* 核心动画：默认将自己向右移动100%的宽度，即移出屏幕外 */
    transform: translateX(100%);
    transition: transform 0.35s ease-in-out;
}

/* 当JS添加.open类时，抽屉滑入屏幕 */
.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    flex-shrink: 0; /* 防止头部被压缩 */
}

.drawer-header h3 {
    margin: 0;
    color: #d1b06b;
    font-size: 1.3em;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
}
.close-btn:hover {
    color: #fff;
}

.drawer-content {
    padding: 10px;
    overflow-y: auto; /* 当列表内容过多时出现滚动条 */
    flex-grow: 1;
}

/* 为抽屉内的列表美化滚动条 */
.drawer-content::-webkit-scrollbar { width: 8px; }
.drawer-content::-webkit-scrollbar-track { background: transparent; }
.drawer-content::-webkit-scrollbar-thumb { background-color: #444; border-radius: 4px; }
.drawer-content::-webkit-scrollbar-thumb:hover { background-color: #666; }


/* 背景板样式 */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1009; /* 比抽屉低一层 */
}
/* ========================================================== */
/* ============= 新增：吐司提示框 (Toast) 样式 ============= */
/* ========================================================== */
/* ========================================================== */
/* ========= 修改后：居中显示的吐司提示框 (Toast) 样式 ======== */
/* ========================================================== */

.toast {
    position: fixed;
    /* 步骤1: 让元素的顶部处于屏幕垂直中心线 */
    top: 50%;
    /* 步骤2: 让元素的左侧处于屏幕水平中心线 */
    left: 50%;

    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;

    /* 动画准备：默认状态是透明的，并且尺寸略微缩小 */
    opacity: 0;
    /* 步骤3: 将元素向左、向上移动自身宽高的一半，实现完美居中，同时缩小尺寸 */
    transform: translate(-50%, -50%) scale(0.9);
    pointer-events: none;

    /* 动画定义：现在 transform 里面包含了 scale，所以动画会更平滑 */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* 当JS给它添加 .show 类时，应用这个样式 */
.toast.show {
    /* 变为不透明 */
    opacity: 1;
    /* 尺寸恢复正常大小，实现“放大”出现的动画效果 */
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* ========================================================== */
/* ========= 新增：删除确认弹窗的按钮样式 ========= */
/* ========================================================== */

/* 这是一个新的“危险”按钮样式 */
.modal-btn-danger {
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95em;
    background-color: #a13030; /* 危险的红色 */
    border-color: #e04c4c;
    color: white;
}
.modal-btn-danger:hover {
    background-color: #c03e3e;
}

/* ========================================================== */
/* ============= 新增：用户认证弹窗样式 ============= */
/* ========================================================== */

/* 登录/注册弹窗的选项卡容器 */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #444;
    margin-bottom: 25px;
}

/* 单个选项卡的样式 */
.auth-tab {
    flex-grow: 1;
    padding: 12px 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 3px solid transparent; /* 默认下边框是透明的 */
    transition: all 0.2s ease;
}

/* 鼠标悬停时变色 */
.auth-tab:hover {
    color: #ccc;
}

/* 被选中的选项卡的样式 */
.auth-tab.active {
    color: #d1b06b;
    border-bottom-color: #d1b06b; /* 下边框变为主题色 */
}

/* 表单通用样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 表单内元素的间距 */
}

/* 表单输入框样式 */
.auth-form input {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 12px 14px;
    font-size: 1em;
}

.auth-form input:focus {
    outline: none;
    border-color: #d1b06b;
}

/* 表单提交按钮样式（复用已有的 .modal-btn-primary） */
.auth-form button {
    margin-top: 10px;
    padding: 12px;
    font-size: 1.1em;
}

/* 用于显示错误信息的小字 */
.auth-error-message {
    color: #e04c4c; /* 红色 */
    text-align: center;
    font-size: 0.9em;
    min-height: 1.2em; /* 即使没错误也占一点高度，防止布局跳动 */
    margin: -10px 0 0; /* 调整位置 */
}

/* ========================================================== */
/* ============= 新增：分享功能相关样式 ============= */
/* ========================================================== */

/* 分享按钮的样式，让它带点蓝色 */
.share-build-btn {
    background-color: #2a3a5e;
    border-color: #5588ff;
}
.share-build-btn:hover {
    background-color: #3a5a8e;
}

/* 分享码弹窗里的输入框和按钮的容器 */
.share-code-wrapper {
    display: flex;
    margin-top: 20px;
}

/* 显示分享码的输入框 */
#share-code-input {
    flex-grow: 1;
    background-color: #1a1a1a;
    border: 1px solid #555;
    border-radius: 4px 0 0 4px; /* 左侧圆角 */
    color: #d1b06b;
    padding: 10px 14px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px; /* 增加字符间距，更像一个“码” */
}
#share-code-input:focus {
    outline: none;
}

/* 复制按钮 */
#copy-share-code-btn {
    flex-shrink: 0;
    padding: 0 20px;
    border-radius: 0 4px 4px 0; /* 右侧圆角 */
    background-color: #555;
    border: 1px solid #555;
    color: white;
    cursor: pointer;
    font-weight: bold;
}
#copy-share-code-btn:hover {
    background-color: #666;
}
#copy-share-code-btn:active {
    background-color: #3e6b3a; /* 点击时变绿，给用户反馈 */
}

/* 让右上角区域的按钮能并排 */
#user-actions-area-wrapper {
    display: flex;
    gap: 10px;
}
#user-actions-area {
    display: contents; /* 特殊的display值，让子元素表现得像是在父容器里一样 */
}

/* 使用配装码按钮的样式，让它带点紫色 */
#show-load-code-modal-btn {
    background-color: #4a2a6b;
    border-color: #aa44dd;
}
#show-load-code-modal-btn:hover {
    background-color: #6a4a8b;
}

/* 加载配装码弹窗里的输入框 */
#load-code-input {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 12px 14px;
    font-size: 1em;
    margin-bottom: 5px; /* 调整与下方错误信息的距离 */
}
#load-code-input:focus {
    outline: none;
    border-color: #d1b06b;
}

/* ========================================================== */
/* ============ 单独为“保存配装”按钮设置绿色 ============ */
/* ========================================================== */

#show-save-modal-btn {
    background-color: #3e6b3a; /* 我们之前用过的“成功”绿色 */
    border-color: #44cc44;
}

#show-save-modal-btn:hover {
    background-color: #4a8b44; /* 鼠标悬停时颜色变亮一点 */
}

/* ========================================================== */
/* ============ 单独为“查看配装”按钮设置金色 ============ */
/* ========================================================== */

#show-builds-drawer-btn {
    background-color: #2a3a5e; /* 我们之前用于“传说”品质的金色背景 */
    border-color: #5588ff;     /* 亮金色边框 */
}

#show-builds-drawer-btn:hover {
    background-color: #3a5a8e; /* 鼠标悬停时颜色变亮 */
}


/* ========================================================== */
/* ============= 新增：登录后欢迎信息的样式 ============ */
/* ========================================================== */

.welcome-message {
    font-size: 1em; /* 将字体稍微调大一点 */
    font-weight: 500; /* 字体加粗 */
    color: #e0e0e0; /* 使用标准的亮色文字 */
    -webkit-font-smoothing: antialiased;

    /* 下面这两行是为了让用户名和旁边的“退出”按钮垂直对齐，更美观 */
    display: flex;
    align-items: center;

    /* 在用户名和“退出”按钮之间增加一点间距 */
    padding-right: 15px;
}


/* ========================================================== */
/* ============= 新增：分享弹窗信息美化样式 ============ */
/* ========================================================== */

/* 配装名称的样式 (大号、主题色) */
#share-build-name-display {
    color: #d1b06b;
    margin: 0;
    margin-bottom: 5px;
    text-align: center;
    font-size: 1.6em; /* 让名称更突出 */
    font-weight: bold;
}

/* 职业和提示文字的通用样式 (小号、灰色) */
.share-build-details {
    color: #aaa;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.95em;
}
/* ======================================= */
/* === 分享弹窗信息美化样式 (V2) === */
/* ======================================= */

/* ... (保留 #share-build-name-display 的样式) ... */

/* 【修改】将职业和作者的样式合并，并去掉斜体 */
#share-build-class-display,
#share-build-author-display {
    color: #aaa;
    text-align: center;
    font-size: 1.1em; /* 可以适当放大字体，让信息更清晰 */
    font-style: normal; /* 去掉斜体 */
    margin-bottom: 5px; /* 调整下方间距 */
}

/* 单独调整主提示语与上方信息的距离 */
#share-build-class-display + #share-build-author-display + .share-build-details {
    margin-top: 25px;
}

/* ========================================================== */
/* ============= 新增：配装状态文本样式 ============= */
/* ========================================================== */
.status-text {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    margin-left: 8px;
    text-align: center;
}

.status-text.pending {
    background-color: #555;
    color: #ccc;
}

.status-text.approved {
    background-color: #3e6b3a;
    color: white;
}

/* ========================================================== */
/* ============ 标题与在线方案按钮的正确样式 ============ */
/* ========================================================== */

/* 这个样式负责将标题和附属按钮横向排列并给出间距 */
.builder-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* ======================================= */
/* === “在线方案”按钮专属颜色 === */
/* ======================================= */
#show-community-builds-btn {
    background-color: #6a5a2a; /* 一个不错的深蓝色 */
    border-color: #f2b300;
}

#show-community-builds-btn:hover {
    background-color: #8a7a4a;
}



/* ========================================================== */
/* ============= 新增：抽屉内筛选器样式 ============= */
/* ========================================================== */

/* 让抽屉的头部变成flex布局，以便对齐标题和筛选器 */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* 元素间的间距 */
}

/* 筛选器下拉框的样式 */
.class-filter-select {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.9em;
}


/* ========================================================== */
/* ============ 新增：抽屉头部标题组合的样式 ============ */
/* ========================================================== */

/* 这个样式负责将标题和下拉框横向排列并给出间距 */
.drawer-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* ========================================================== */
/* ============ 点赞功能最终美化样式 ============ */
/* ========================================================== */

/* 操作按钮区域的容器，让所有按钮能水平排列 */
.build-actions {
    display: flex;
    align-items: center; /* 垂直居中对齐 */
    gap: 13px; /* <--- 控制按钮间隔的就是这一行 */
    /* 步骤1: 给容器一个固定的宽度，以此创建“对齐线” */
    width: 300px; /* 你可以根据需要微调这个宽度 */

    /* 步骤2: 让按钮在容器内从左开始排列 (这是flex的默认行为) */
    justify-content: flex-start;
}

/* 点赞按钮的样式 */
.build-actions .like-btn {
    background: transparent; /* 取消背景色 */
    border: none; /* 取消边框 */
    padding: 5px;
    cursor: pointer;

    /* 核心：让按钮内部的图标和数字水平排列 */
    display: flex;
    flex-direction: row;
    align-items: center;    /* 垂直居中 */
}

/* 【请用这个新版本替换旧的 .like-btn .like-count 样式】 */
.build-actions .like-btn .like-count {
    font-size: 1em;
    color: #ccc;
    font-weight: bold;
    /* 将 margin-right 改为 margin-left，在爱心和数字之间增加间距 */
    margin-left: 6px;
}

/* 爱心图标的样式 */
.build-actions .like-btn .fa-heart {
    font-size: 2em; /* 较大的图标 */
    color: #aaa; /* 默认是灰色 */
    transition: all 0.2s ease;
}

/* 鼠标悬停在整个按钮上时，爱心图标的效果 */
.build-actions .like-btn:hover .fa-heart {
    color: #e04c4c; /* 悬停时变橙色 */
    transform: scale(1.2); /* 放大一点 */
}

/* 已点赞状态的样式 (红心) */
.build-actions .like-btn.liked .fa-heart {
    color: #e04c4c;
}

/* ...已有的 .like-btn 样式... */
.build-actions .like-btn {
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* 【请在这里新增下面这段代码】 */
/* 这是专门为“爱心按钮”的“悬停”状态写的规则 */
.build-actions .like-btn:hover {
    background-color: transparent; /* 强制悬停时背景依然透明 */
    opacity: 1; /* 取消其他通用按钮的悬停透明度变化，保持清晰 */
}

/* ...已有的 .like-btn:hover .fa-heart 样式... */
.build-actions .like-btn:hover .fa-heart {
    color: #e04c4c;
    transform: scale(1.2);
}

/* ========================================================== */
/* ============ 分别为两个抽屉设置独立宽度 ============ */
/* ========================================================== */

/* 为“我的配装”抽屉 (#builds-drawer) 单独设置宽度 */
#builds-drawer {
    width: 700px; /* 比如，这个可以窄一些 */
}

/* 为“社区精选方案”抽屉 (#community-builds-drawer) 单独设置宽度 */
#community-builds-drawer {
    width: 700px; /* 比如，这个可以宽一些，以显示更多信息 */
}

/* ========================================================== */
/* ======== 单独设置社区方案列表按钮为“靠右对齐” ======== */
/* ========================================================== */

/* 这个选择器的意思是：
   找到ID为 #community-builds-drawer 的抽屉 (这是社区方案抽屉)，
   再找到它里面的 .build-actions 容器，
   然后只对它应用下面的样式。
*/
#community-builds-drawer .build-actions {
    /* 使用 flex-end 将内部的按钮们推到容器的最右侧 */
    justify-content: flex-end;
}

/* style.css */

/* ... 你现有的所有 style.css 代码 ... */

/* ======================================= */
/* === V3 配装栏下拉框层叠顺序最终修正 === */
/* ======================================= */

.random-affix-row.row-active {
    position: relative; /* 必须设置定位，z-index才会生效 */
    z-index: 20;      /* 提升到比其他行更高的“楼层” */
}

/* style.css */

/* ... 你现有的所有 style.css 代码 ... */

/* ======================================= */
/* === V4 配装栏禁止滚动最终修正 === */
/* ======================================= */

/* 当 #equipped-items 拥有 .no-scroll 类时，强制隐藏其垂直滚动条 */
#equipped-items.no-scroll {
    overflow-y: hidden;
}


/* 新增这条规则，专门用于抵消右侧面板标题的下边距 */
#right-placeholder-panel .builder-header {
    margin-bottom: 0;
}

.admin-action-btn {
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid;
    color: white;
    font-weight: bold;
    margin-right: 5px;
}
.admin-action-btn:hover {
    opacity: 0.8;
}
.btn-delete {
    background-color: #a13030;
    border-color: #e04c4c;
}
.btn-edit {
    background-color: #2a3a5e;
    border-color: #5588ff;
}
.btn-approve {
    background-color: #3e6b3a;
    border-color: #44cc44;
}
.btn-reject {
    background-color: #555;
    border-color: #777;
}
.btn-unlist {
    background-color: #6a5a2a;
    border-color: #f2b300;
}
.btn-toggle-on {
    background-color: #3e6b3a;
    border-color: #44cc44;
}
.btn-toggle-off {
    background-color: #555;
    border-color: #777;
}




/* 添加到 style.css 末尾 */
.auto-price-display {
    float: left; /* 让它浮动到左侧 */
    color: #f2b300; /* 金色 */
    font-weight: bold;
    font-size: 1em;
    margin-right: 0px; /* 和物品名称之间留点空隙 */
}

/* style.css */

/* ... 你现有的 .options-panel 样式 ... */

/* 【新增】当父容器拥有 .open-up 类时，让下拉框向上展开 */
.custom-select-container.open-up .options-panel {
    top: auto; /* 取消默认的向下定位 */
    bottom: 100%; /* 将菜单的底部对齐到容器的顶部 */
    margin-top: 0;
    margin-bottom: 4px; /* 在菜单和选择框之间留出一点空隙 */
}

/* ======================================= */
/* === 新增：总估价显示样式 === */
/* ======================================= */
#total-valuation-display {
    /* --- 保留您想要的颜色和背景 --- */
    color: #f2b300;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #555; /* 您也可以改成 #666 来和按钮边框统一 */
    margin-left: 15px; /* 与左侧标题的间距 */
    transition: all 0.3s ease;

    /* --- 【核心修改】采用和按钮一致的大小/形状/字体 --- */
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

/* 当没有价格时，让它优雅地隐藏 */
#total-valuation-display:empty {
    display: none;
}

/* ======================================================= */
/* === 社区方案列表项专属布局与元数据样式 === */
/* ======================================================= */

/*
 * 目标：只修改社区方案列表项，让其适应多行文字
 * 选择器 #community-builds-list .saved-build-item 确保只影响社区方案列表
 * 将垂直对齐方式从居中（center）改为顶部对齐（flex-start），
 * 这样右侧的“加载”“点赞”按钮会和左侧信息的第一行对齐，更美观。
*/
#community-builds-list .saved-build-item {
    align-items: flex-start;
}

/*
 * 目标：只为社区方案的第二行元数据（作者、配装码等）添加样式
 * 选择器 #community-builds-list .build-meta 确保样式不会泄露到“我的配装”列表
*/
#community-builds-list .build-meta {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}


/* ======================================= */
/* === 输入框与字数计数器样式 === */
/* ======================================= */
.input-with-counter {
    position: relative;
    margin-bottom: 20px;
}

.char-counter {
    position: absolute;
    right: 2px;
    top: 105%;
    transform: translateY(-50%);
    font-size: 0.9em;
    color: #888;
    user-select: none; /* 禁止用户选中文字 */
}

/* 当输入框的父容器有 .error 类时，计数器变红 */
.input-with-counter.error .char-counter {
    color: #e04c4c;
    font-weight: bold;
}




/* ======================================= */
/* === 新增：提交审核弹窗的留言区样式 === */
/* ======================================= */
#submit-review-modal .modal-content {
    max-width: 550px; /* 可以让这个弹窗宽一点，方便写字 */
}

#author-note-textarea {
    width: 100%;
    min-height: 120px; /* 给一个合适的高度 */
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 10px 14px;
    font-size: 1em;
    resize: none; /* 允许用户垂直拖动调整大小 */
    font-family: sans-serif; /* 继承页面字体 */
    overflow-y: hidden;
}

#author-note-textarea:focus {
    outline: none;
    border-color: #d1b06b;
}


/* ======================================= */
/* === 新增：社区方案留言区样式与动画 === */
/* ======================================= */

/* 重新组织一下列表项的内部布局 */
.build-info-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.build-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

/* 作者留言按钮的特定样式 */
.show-note-btn {
    background-color: #6a5a2a;
    border-color: #f2b300;
}
.show-note-btn:hover {
    background-color: #8a7a4a;
}

/* 留言内容容器的样式 */
.author-note-content {
    background-color: #222;
    border-radius: 5px;
    margin-top: 10px;
    padding: 12px 15px;
    border-left: 3px solid #f2b300;
    color: #ccc;

    /* 动画核心：设置max-height和overflow，并添加过渡效果 */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, margin-top 0.4s ease;

    /* 默认状态下没有内边距和上边距 */
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
}

/* 当 .hidden 类被移除时，应用这些样式，触发动画 */
.author-note-content:not(.hidden) {
    max-height: 200px; /* 一个足够大的高度，让内容可以完全显示 */
    padding-top: 12px;
    padding-bottom: 12px;
    margin-top: 10px;
}

.author-note-content p {
    margin: 0;
    line-height: 1.6;
    text-align: left;
}


/* ======================================= */
/* === “作者留言”文本域的滚动条（最终版） === */
/* ======================================= */

/* 1. 设置滚动条的整体宽度 */
#author-note-textarea::-webkit-scrollbar {
    width: 8px;
}

/* 2. 设置滚动条的轨道（背景）样式 */
#author-note-textarea::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* 3. 设置滚动条的滑块样式 */
#author-note-textarea::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 4px;
}

/* 4. 设置鼠标悬停在滑块上时的颜色 */
#author-note-textarea::-webkit-scrollbar-thumb:hover {
    background-color: #666;
}

/* 5. 【新增】设置角落的样式，解决右下角的小白块问题 */
#author-note-textarea::-webkit-scrollbar-corner {
    background: transparent;
}


/* 方案一：为社区方案按钮增加右边距 */
/*#show-community-builds-btn {
/*    margin-right: 30px; /* 您可以把 20px 改成任何您想要的距离 */
/*}

/* 方案二：使用自动边距实现分组 */
/*#show-community-builds-btn {
/*    margin-right: auto; /* auto 会自动占据所有可用空间，从而推开右边的元素 */
/*}
/* ========================================================== */
/* === 头部布局最终修正方案 (2025-06-17) === */
/* ========================================================== */

/* 1. 为所有 .builder-header 设置一个“两端对齐”的通用基础规则 */
.builder-header {
    display: flex;
    justify-content: space-between; /* 默认两端对齐 */
    align-items: center;
    margin-bottom: 10px;
}

/* 2. 为所有 .builder-actions 设置一个通用的基础规则（没有 flex: 1）*/
.builder-actions {
    display: flex;
    align-items: center; /* 确保内部元素垂直居中 */
}

/* 3. 【专门】为配装表面板的头部，覆写为“靠左对齐” */
#builder-panel .builder-header {
    justify-content: flex-start;
    gap: 15px; /* 在标题和右侧按钮组之间增加间距 */
}

/* 4. 【专门】为配装表面板的按钮组，添加 flex: 1 使其能够伸展 */
#builder-panel .builder-actions {
    flex: 1;
    gap: 20px;
}

/* 5. 【专门】为估值按钮后的第一个按钮设置自动边距，实现内部分组 */
/* 这个规则我们之前已经加过，请保留 */
#total-valuation-display + .builder-action-btn {
    margin-left: auto;
}


/* 【新增】让欢迎信息在鼠标悬停时可点击 */
.welcome-message {
    cursor: pointer; /* 鼠标变为小手 */
    transition: color 0.2s ease;
}

.welcome-message:hover {
    color: #d1b06b; /* 悬停时变为主题金色 */
}
/* 美化API Key输入框 */
#api-key-input {
    width: calc(100% - 20px); /* 撑满容器，留出一些内边距 */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #555; /* 深色边框 */
    border-radius: 5px; /* 圆角 */
    background-color: #222; /* 深色背景 */
    color: #eee; /* 浅色文字 */
    font-size: 16px;
    box-sizing: border-box; /* 保证内边距和边框不增加元素尺寸 */
    transition: border-color 0.3s ease; /* 边框颜色过渡效果 */
}

#api-key-input:focus {
    outline: none; /* 移除默认聚焦边框 */
    border-color: #d1b06b; /* 聚焦时显示主题金色边框 */
}

#api-key-input::placeholder {
    color: #888; /* 浅灰色占位符 */
}

/* 美化错误提示信息 */
#api-key-error {
    color: #ff6666; /* 醒目的错误颜色 */
    font-size: 14px;
    margin-bottom: 10px;
}

/* 微调模态框内容区域的padding，如果需要的话 */
.modal-content {
    padding: 20px;
}


/* ======================================= */
/* === “关于与支持”功能专属样式 === */
/* ======================================= */

/* 为按钮设置一个独特的颜色，比如柔和的蓝色 */
#show-about-modal-btn {
    background-color: #2a3a5e;
    border-color: #5588ff;
}
#show-about-modal-btn:hover {
    background-color: #3a5a8e;
}

/* 让“关于”弹窗可以更宽一些 */
#about-modal .modal-content.large {
    max-width: 50vw; /* 使用vw单位，适应性更好 */
    min-height: 40vw; /* 使用vw单位，适应性更好 */
    text-align: center;
}

/* 弹窗顶部的关闭按钮 */
#about-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5em;
}

/* 介绍段落 */
.about-intro {
    font-size: 1.1em;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 25px !important;
}

/* 社交平台链接 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
    color: #d1b06b;
}
.social-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
    color: #d1b06b;
}
.social-links a:hover {
    color: #f2b300;
}
.social-links .fab, .social-links .fas {
    font-size: 1.8em;
}

/* 捐赠区域 */
.donation-section p {
    color: #bbb;
    margin-bottom: 25px !important;
}

/* 二维码容器 */
.qr-code-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}
.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.qr-code-item img {
    max-width: 350px; /* 设置最大宽度为180px，防止图片过大 */
    max-height: 350px; /* 设置最大高度为180px，防止图片过大 */
    width: auto;       /* 让宽度根据图片比例自动调整 */
    height: auto;      /* 让高度根据图片比例自动调整 */
    border: 2px solid #555;
    border-radius: 8px;
    background-color: #fff;
    display: block;    /* 确保图片是块级元素，方便居中等布局 */
    margin: 0 auto;     /* 让图片在容器中水平居中 */
}
.qr-code-item span {
    font-weight: bold;
    color: #ccc;
    font-size: 1.1em;
}
/* ======================================= */
/* === 免责声明区域样式 (修正版) === */
/* ======================================= */
.disclaimer-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: left; /* 【核心修正①】强制整个区域内的所有文本都左对齐 */
}

.disclaimer-section h4 {
    text-align: left; /* 确保标题也是左对齐 */
    margin-bottom: 15px; /* 增加标题和正文的间距 */
}

/* 确保普通段落也是左对齐 */
.disclaimer-section p {
    text-align: left !important; /* 使用!important提高优先级，确保生效 */
}

/* 有序列表的样式 */
.disclaimer-section ol {
    /* 【核心修正②】使用 padding-left 来创建可靠的缩进，让数字有空间显示 */
    padding-left: 30px;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* 列表项的样式 */
.disclaimer-section li {
    margin-bottom: 12px; /* 增加每个条款之间的垂直间距 */
    padding-left: 8px;   /* 增加数字和文字之间的间距 */
    line-height: 1.6;    /* 增加行高，提升阅读舒适度 */
}

.disclaimer-section li strong {
    color: #c5c5c5; /* 让每个条款的小标题颜色更醒目一点 */
}

/* 让邮箱链接使用网站的主题金色 */
.disclaimer-section p a {
     color: #d1b06b;
     text-decoration: none;
}
.disclaimer-section p a:hover {
     text-decoration: underline;
}

/* ======================================= */
/* === 表单辅助提示文字样式 === */
/* ======================================= */
.form-helper-text {
    font-size: 0.85em;      /* 字体小一点 */
    color: #888;            /* 颜色暗一点 */
    text-align: left;       /* 左对齐 */
    margin-top: -8px;       /* 向上移动一点，靠近输入框 */
    margin-bottom: 10px;    /* 和下方的元素保持一点距离 */
    padding-left: 2px;
}



/* static/css/style.css */

/* ======================================= */
/* === 社区方案留言区样式与动画 === */
/* ======================================= */
#about-modal h3 {
    font-size: 2em; /* 您可以把这个值调得更大或更小 */
}
/* 重新组织一下列表项的内部布局 */
.build-info-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.build-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

/* 作者留言按钮的特定样式 (金色) */
.show-note-btn {
    background-color: #6a5a2a;
    border-color: #f2b300;
}
.show-note-btn:hover {
    background-color: #8a7a4a;
}

/* 留言内容容器的样式 */
.author-note-content {
    background-color: #222;
    border-radius: 5px;
    border-left: 3px solid #f2b300;
    color: #ccc;

    /* 动画核心：设置max-height和overflow，并添加过渡效果 */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, margin-top 0.4s ease;

    /* 默认状态下没有内边距和上边距，完全折叠 */
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
}

/* 当 .hidden 类被移除时，应用这些样式，触发动画 */
.author-note-content:not(.hidden) {
    max-height: 200px; /* 一个足够大的高度，让内容可以完全显示 */
    padding: 12px 15px;
    margin-top: 10px;
}

.author-note-content p {
    margin: 0;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap; /* 保留换行符 */
    word-break: break-word; /* 长单词自动换行 */
}

#about-modal .modal-content.large {
    transform: scale(0.9);
}

/* 添加到 style.css 末尾 */
.auto-build-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}
.auto-build-form .form-label {
    flex-basis: 120px;
    text-align: right;
    color: #ccc;
    font-weight: bold;
}
.auto-build-form .form-input {
    font-size: 1em;
}
.target-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.target-stat-row .remove-filter-btn {
    font-size: 0.8em;
    width: 28px;
    height: 28px;
    line-height: 28px;
}
#show-auto-build-modal-btn {
    background-color: #6a3a2a;
    border-color: #f26b00;
}
#show-auto-build-modal-btn:hover {
    background-color: #8a5a4a;
}


/* ========================================================== */
/* ============= 智能配装弹窗UI优化 (V2) ============= */
/* ========================================================== */

/* 修复“期望值”输入框溢出问题 */
.target-stat-row .form-label { flex-shrink: 0; }
.target-stat-row .form-input { flex-grow: 1; min-width: 80px; }
.target-stat-row .custom-select-container { flex-grow: 4; min-width: 150px; }
.target-stat-row .remove-filter-btn { flex-shrink: 0; }

/* 隐藏总预算和期望值输入框的上下箭头 */
#auto-build-budget::-webkit-outer-spin-button,
#auto-build-budget::-webkit-inner-spin-button,
.target-stat-value::-webkit-outer-spin-button,
.target-stat-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#auto-build-budget[type=number],
.target-stat-value[type=number] {
  -moz-appearance: textfield;
}

/* 美化自定义下拉框 (复用已有样式) */
.target-stat-row .custom-select-container .selected-option-display {
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px 12px;
    height: auto;
    line-height: normal;
}
.target-stat-row .custom-select-container.open .options-panel {
    display: block;
}

/* 这是每个选项的样式 */
.options-panel .custom-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1em; /* 确保字体大小正常 */
    white-space: nowrap;
}
.options-panel .custom-option:hover {
    background-color: #4a4a4a;
    color: #d1b06b;
}

/* ======================================= */
/* === 智能配装 - 隐藏原生下拉框滚动条 === */
/* ======================================= */

/* 目标：选中“智能配装”弹窗内的原生 <select> 标签 */
#auto-build-modal .target-stat-name {
    /* 针对 Firefox 浏览器 */
    scrollbar-width: none;
    /* 针对 IE 和 Edge (旧版) */
    -ms-overflow-style: none;
}

/* 专门针对 Chrome, Safari, Edge 等 WebKit 内核浏览器 */
#auto-build-modal .target-stat-name::-webkit-scrollbar {
    display: none; /* 彻底隐藏滚动条 */
}

/* ======================================= */
/* === 智能配装 - 调整属性/期望值输入框宽度 === */
/* ======================================= */

#auto-build-modal .target-stat-name {
    width: 250px; /* 设置一个固定的宽度 */
    flex-grow: 0; /* 禁止它自动伸展 */
}

#auto-build-modal .target-stat-value {
    width: 120px; /* 设置一个固定的宽度 */
    flex-grow: 0; /* 禁止它自动伸展 */
}
/* ======================================= */
/* === 智能配装 - 增加属性目标行间距 === */
/* ======================================= */

/* 目标：选中“智能配装”弹窗(#auto-build-modal)内的
  每一条属性目标行(.target-stat-row)
*/
#auto-build-modal .target-stat-row {
    margin-bottom: 10px; /* 为每一行的下方增加12像素的间距 */
}
/* ======================================= */
/* === 切换方案复合按钮样式 === */
/* ======================================= */

/* 默认状态下隐藏我们唯一的按钮 */
#switch-solution-btn {
    display: none;
    /* 沿用之前的颜色，保持风格统一 */
    background-color: #2e6b50;
    border-color: #44cc88;
}
#switch-solution-btn:hover {
    background-color: #3e8b70;
}


/* 当JS添加.visible类时才显示 */
#switch-solution-btn.visible {
    display: inline-block;
}