/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;

}

.modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 1000px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: white;
    animation: modalFadeIn 0.3s;
    /* border: 2px solid #4db8ff; */
    /* box-shadow: 0 0 15px rgba(77, 184, 255, 0.3); */
    text-align: center;
}

.modal-content h2 {
    font-size: 2.0rem;
    margin-bottom: 10px;
    color: #4db8ff;
    text-shadow: 0 0 10px rgba(77, 184, 255, 0.5);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-top: 30px;
}

.dialog-buttons {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 1.4rem;
}

.dialog-buttons-primary {
    background: #2ecc71;
    color: white;
}

.dialog-buttons-secondary {
    background: #e74c3c;
    color: white;
}

.dialog-buttons:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/*
    模态框内部
*/

.character-card {
    background: rgba(20, 20, 40, 0.6);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid #4db8ff;
    box-shadow: 0 0 15px rgba(77, 184, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
}

.character-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #43cea2, #185a9d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 0 20px rgba(67, 206, 162, 0.5);
}

.character-info {
    flex: 1;
    text-align: left;
}

.character-stats {
    font-size: 1.8rem;
    color: #ffcc66;
    margin-bottom: 15px;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.attribute-card {
    background: rgba(20, 20, 40, 0.6);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.attribute-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.attribute-card.attack {
    border-color: #e74c3c;
}

.attribute-card.heal {
    border-color: #2ecc71;
}

.attribute-card.magic {
    border-color: #3498db;
}

.attribute-card.shield {
    border-color: #cec8bf;
}

.attribute-card.coin {
    border-color: #f39c12;
}

.attribute-card.func {
    border-color: blueviolet;
}

.attribute-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.attribute-name {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.attribute-name i {
    font-size: 1.8rem;
}

.attack .attribute-name {
    color: #e74c3c;
}

.heal .attribute-name {
    color: #2ecc71;
}

.magic .attribute-name {
    color: #3498db;
}

.shield .attribute-name {
    color: #cec8bf;
}

.coin .attribute-name {
    color: #f39c12;
}

.func .attribute-name {
    color: blueviolet;
}


.attribute-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.attribute-controls span {
    display: flex;
    justify-content: center;
    font-size: 1.3rem;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
}

.btn-remove {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
}

/* 技能选择相关 */
.select-skill-grid {
    display: flex;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
    gap: 30px;
    padding-bottom: 30px;
    padding-top: 30px;

    align-items: center;
    justify-content: center;

}

.select-skill-card {
    width: 20vw;
    height: 30vh;
    background: rgba(20, 20, 40, 0.6);
    border-radius: 15px;
    padding: 5px;
    border: 2px solid;
    transition: all 0.3s;
    position: relative;
    /* overflow-x: hidden;
    overflow-y: auto; */
    overflow: hidden;
    border-color: #3498db;
    /* display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; */
}

.select-skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: gold;
    border-width: 2px;
}

.select-skill-card.selected {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: gold;
    border-width: 5px;
}

.select-skill-avatar {
    width: 120px;
    height: 120px;
    align-items: center;
    font-size: 4rem;
}

.select-skill-avatar img {
    position: absolute;
    left: 50%;
    /* 先移到父节点中心线 */
    top: 10%;
    /* 垂直位置不变（贴着父节点顶部）*/
    transform: translateX(-50%);
    /* 再向左移自身宽度的一半，实现水平居中 */
    /* 拉伸并裁剪 */
    pointer-events: none;
    /* 防止干扰点击 */
    image-rendering: pixelated;
    /* 现代浏览器 */
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
    /* IE */
    /* border: 4px solid #3498db; */
    border: 3px solid #00152c;

    border-radius: 8px;
}

.select-skill-info {
    height: 200px;
    overflow-y: auto;

}

/* 1. 整个滚动条区域 */
.select-skill-info::-webkit-scrollbar {
    width: 8px;
    /* 竖滚动条宽度 */
}

/* 2. 滚动条轨道（背景） */
.select-skill-info::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

/* 3. 滚动条滑块（可拖动部分） */
.select-skill-info::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: background 0.2s;
}

/* 4. 滑块悬停/激活态 */
.select-skill-info::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.select-skill-info::-webkit-scrollbar-thumb:active {
    background: #787878;
}

.select-skill-stats {
    font-size: 1.3rem;
    color: #ffcc66;
    /* 2. 文字超出宽度自动换行 */
    overflow-wrap: break-word;
    /* 或 word-wrap: break-word; */
    white-space: normal;

}


.shadow-stroke {
    color: gold;
    text-shadow:
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
}