/* ---- style block 1 ---- */
/* 基础样式 */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        -webkit-user-select: none;
    }

    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background-color: #f4f4f9;
        background: linear-gradient(-45deg, #ffefba, #ffffff);
    }

    /* 主容器 */
    .main-container {
        display: flex;
        flex-direction: row;
        padding: 20px;
        gap: 20px;
        height: 94vh;
    }

    /* 武器区域 */
    .weaponList-container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* 词条详情 */
    #entry-detail-container {
        display: flex;
        flex-direction: column;
        /* align-items: center; */
        justify-content: center;
        width: 40vw;
        background-color: #f9f9f9;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        background: linear-gradient(-45deg, #ffefba, #ffffff);
    }

    #enchantment-info {
        font-size: x-large;
        font-weight: bold;
        margin-bottom: 5px;
        color: #333;
    }

    #weaponValue {
        margin-bottom: 20px;
    }

    #attribute-list .attribute-item {
        font-size: 16px;
        color: #555;
        margin-bottom: 8px;
    }

    /* 顶侧栏容器 */
    .top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        background-color: #2c3e50;
        color: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        height: 5vh;
        transform: translateY(1vh);
        margin-left: 1vw;
        margin-right: 1vw;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 10px;
        text-align: center;
    }

    .attributes-info-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .attributes {
        font-weight: bold;
    }

    .attribute {
        display: flex;
        justify-content: space-between;
        white-space: nowrap;
        justify-content: flex-start;
        margin: 5px 0;
        padding: 5px;
        background-color: #fff;
        border-radius: 5px;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
        background: linear-gradient(-45deg, #ffefba, #ffffff);
    }

    .weaponValue {
        color: #45465e;
    }

    .locked {
        color: red;
    }

/* ---- style block 2 ---- */
.top-bar .title {
        font-size: 18px;
        font-weight: bold;
        color: #ecf0f1;
        padding-left: 10px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .top-bar .title .title-logo {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .top-bar #resources {
        display: flex;
        align-items: center;
    }

    /* 白石和彩玉数量容器 */
    .top-bar div {
        display: flex;
        align-items: center;
        font-size: 16px;
    }

    /* 数字显示样式 */
    .top-bar span {
        font-weight: bold;
        font-size: 18px;
        margin-right: 8px;
    }

    /* add-button按钮样式 */
    .add-button {
        background-color: #3498db;
        border: none;
        color: white;
        cursor: pointer;
        transition: background-color 0.3s, transform 0.2s;
        padding: 2px 7px;
        font-size: 16px;
        border-radius: 4px;
    }



    .add-button:hover {
        background-color: #2980b9;
        transform: translateY(-2px);
    }

    .add-button:active {
        background-color: #1c5986;
        transform: translateY(0);
    }

    /* 白石和彩玉间距 */
    .top-bar div+div {
        margin-left: 20px;
    }

    /* 移动设备 */
    @media (max-height: 450px) {

        #totalBattlePower {
            font-size: smaller !important;
        }

        .add,
        .subtract {
            font-size: small !important;
        }

        .attribute {
            font-size: smaller;
        }

        .weaponValue {
            font-size: smaller;
        }

        #weaponValue {
            margin-bottom: 10px;
        }

        .custom-dialog-content {
            transform: scale(0.8);
        }

        .add-button {
            padding: 1px 4px;
            font-size: 10px;
            border-radius: 3px;
        }

        .top-bar .title {
            font-size: 14px;
        }

        .top-bar span {
            font-size: 12px;
        }

        #enchantment-info {
            font-size: medium;
        }

        #refreshButton {
            padding: 8px 12px !important;
            font-size: 14px !important;
        }

        #refreshCost {
            font-size: 12px !important;
        }
    }

/* ---- style block 3 ---- */
/* 左侧栏样式 */
    .left-bar {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        width: 10vw;
        background-color: #f4f4f4;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        background: linear-gradient(-45deg, #ffefba, #ffffff);
    }

    .left-bar .section-title {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .left-bar ul {
        list-style-type: none;
    }

    .left-bar ul li {
        margin: 10px 0;
    }

    .left-bar .eo-button {
        width: 100%;
        padding: 10px;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-weight: weight;
        transition: transform 0.5s ease, opacity 0.5s ease, background-color 0.5s ease, font-size 0.5s ease;
    }

/* ---- style block 4 ---- */
/* 总战力 */
    #totalBattlePower {
        font-size: 20px;
        font-weight: bold;
        color: #333;
        margin-bottom: 20px;
    }

    .change-text {
        position: absolute;
        font-size: 18px;
        font-weight: bold;
        transition: transform 0.5s ease-out;
        z-index: 10;
    }

    .add,
    .subtract {
        font-size: 24px;
    }

    .add {
        color: #fa541c;
        animation: floatUp 1s ease-out forwards;
    }

    .subtract {
        color: #8c8c8c;
        animation: floatDown 1s ease-out forwards;
    }

    @keyframes floatUp {
        0% {
            transform: translateY(0);
            opacity: 1;
        }

        100% {
            transform: translateY(-30px);
            opacity: 0;
        }
    }

    @keyframes floatDown {
        0% {
            transform: translateY(0);
            opacity: 1;
        }

        100% {
            transform: translateY(30px);
            opacity: 0;
        }
    }

/* ---- style block 5 ---- */
/* 武器区域 */
    .weaponList-container {
        position: relative;
    }

    /* 武器列表 */
    .weapon-list {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* 每个武器项的样式 */
    .weapon-item {
        position: absolute;
        text-align: center;
        padding: 10px;
        background-color: #fafafa;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        transition: transform 0.3s;
    }

    .weapon-item.active {
        transform: scale(1.2) !important;
    }

    .img_div {
        position: relative;
        margin: auto;
    }

    .Img_active {
        --colorA: #b78eff;

        &::before,
        &::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            border-radius: 50%;
            border-top: 2px solid #fff;
            filter:
                drop-shadow(0 0 2px var(--colorA)) drop-shadow(0 0 5px var(--colorA)) drop-shadow(0 0 10px var(--colorA)) drop-shadow(0 0 20px var(--colorA));
            animation: rotate 3s infinite linear;
        }

        &::after {
            --colorA: #ffec41;
            animation-delay: -1.5s;
        }
    }

    @keyframes rotate {
        100% {
            transform: rotate(360deg);
        }
    }

    .weaponPNG {
        width: 100%;
        height: auto;
        border-radius: 50%;
        /* border: 3px solid #595959; */
        object-fit: cover;
    }


    .weapon-item .stats {
        margin-top: 10px;
        font-size: 14px;
        color: #555;
        white-space: nowrap;
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    }

    /* 武器按六边形分布 */
    .weapon-item:nth-child(1) {
        background: linear-gradient(135deg, #ea5455, #feb692);
        transform: rotate(0deg) translate(0, -180px) rotate(0deg);
    }

    .weapon-item:nth-child(2) {
        background: linear-gradient(135deg, #f09819, #edde5d);
        transform: rotate(60deg) translate(0, -180px) rotate(-60deg);
    }

    .weapon-item:nth-child(3) {
        background: linear-gradient(135deg, #ffec3d, #fff799);
        transform: rotate(120deg) translate(0, -180px) rotate(-120deg);
    }

    .weapon-item:nth-child(4) {
        background: linear-gradient(135deg, #49c628, #70f570);
        transform: rotate(180deg) translate(0, -180px) rotate(-180deg);
    }

    .weapon-item:nth-child(5) {
        background: linear-gradient(135deg, #3c8ce7, #00eaff);
        transform: rotate(240deg) translate(0, -180px) rotate(-240deg);
    }

    .weapon-item:nth-child(6) {
        background: linear-gradient(135deg, #7367f0, #ce9ffc);
        transform: rotate(300deg) translate(0, -180px) rotate(-300deg);
    }

/* ---- style block 6 ---- */
/* 刷新按钮 */
    #refreshButton-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #refreshButton {
        padding: 12px 20px;
        font-size: 16px;
        background-color: #28a745;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s;
        margin-bottom: 10px;
    }

    /* 激活状态样式 */
    #refreshButton:active {
        background-color: #218838;
    }

    /* 禁用状态样式 */
    #refreshButton:disabled {
        background-color: #b1d5c8;
        color: #6b798e;
        cursor: not-allowed;
        border: 1px solid #ccc;
    }

    #refreshCost {
        font-size: 14px;
        color: #555;
    }

    #refreshCost.disabled {
        text-decoration: line-through;
    }

    #refreshCost span {
        font-weight: bold;
        color: #333;
    }

/* ---- style block 7 ---- */
.lock-status {
        cursor: pointer;
    }

    /* 放大效果 */
    .expand {
        transform: scale(1.2);
        opacity: 0.8;
    }

    .blink {
        animation: blink 0.3s infinite;
    }

    /* 闪烁效果 */
    @keyframes blink {
        0% {
            opacity: 1;
        }

        50% {
            opacity: 0;
        }

        100% {
            opacity: 1;
        }
    }

    /* 背景闪烁效果 */
    .dark {
        animation: blinkBackground 0.3s infinite;
    }

    @keyframes blinkBackground {
        /* 0% {
            background-color: #f0f0f0;
        }
        50% {
            background-color: #dcdcdc;
        }
        100% {
            background-color: #f0f0f0;
        }  */
    }

/* ---- style block 8 ---- */
/* 弹窗的背景遮罩层 */
    .shop-background {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 99;
        transition: background-color 0.5s ease-in-out;
    }

    /* 弹窗样式 */
    .shop {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 40px;
        background: linear-gradient(145deg, #4b6cb7, #182848);
        border-radius: 20px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
        z-index: 100;
        max-width: 500px;
        width: 100%;
        text-align: center;
        color: white;
        font-size: 18px;
        box-sizing: border-box;
        transition: all 0.4s ease-out;
        overflow-y: auto;
    }

    .purchase-popup h3 {
        font-size: 28px;
        margin-bottom: 20px;
        font-weight: bold;
        letter-spacing: 1px;
    }

    .purchase-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }

    .purchase-buttons button {
        padding: 15px;
        font-size: 16px;
        background: linear-gradient(145deg, #ff6a00, #d40000);
        color: white;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    }

    .purchase-buttons button:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    }

    /* 关闭按钮 */
    .closeShop-btn {
        background: linear-gradient(135deg, #2afadf, #4c83ff);
        font-size: 18px;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        border: none;
        transition: background-color 0.3s ease, transform 0.3s ease;
    }

    .closeShop-btn:hover {
        background: linear-gradient(135deg, #fff720, #2afadf);
        transform: translateY(-2px);
    }

    @media (max-height: 450px) {
        .shop {
            padding: 20px;
            border-radius: 10px;
            max-height: 80vh;
            width: 100%;
            font-size: 12px;
        }

        .purchase-popup h3 {
            font-size: 14px;
            margin-bottom: 20px;
        }

        .purchase-buttons {
            gap: 20px;
            margin-bottom: 20px;
        }

        .purchase-buttons button {
            padding: 15px;
            font-size: 12px;
            border-radius: 12px;
        }

        .closeShop-btn {
            font-size: 12px;
            padding: 10px 20px;
            border-radius: 8px;
        }
    }

/* ---- style block 9 ---- */
h2 svg {
        width: 1em;
        height: 1em;
        margin-bottom: 10px;
        vertical-align: middle;
    }

    .custom-dialog-content .h2_NotEnough {
        text-align: left;
        color: red;
    }

    .custom-dialog-content .h2_unlock {
        text-align: left;
        color: blue;
    }

    .custom-dialog-content .h2_setting {
        text-align: left;
        text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.7),
            /* 上右阴影 */
            -1px -1px 0px rgba(0, 0, 0, 0.7),
            /* 下左阴影 */
            1px -1px 0px rgba(0, 0, 0, 0.7),
            /* 上左阴影 */
            -1px 1px 0px rgba(0, 0, 0, 0.7)
    }

    /* 对话框的背景遮罩 */
    .custom-dialog {
        display: none;
        /* 初始时隐藏 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        justify-content: center;
        align-items: center;
        z-index: 200;
    }

    /* 对话框内容 */
    .custom-dialog-content {
        background: linear-gradient(135deg, #fce38a, #f38181);
        padding: 20px;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }

    .button {
        padding: 5px 10px;
        cursor: pointer;
    }

    .button:active {
        background-color: #ddd;
    }

    .confirmButton,
    .cancelButton {
        margin: 10px;
        padding: 10px 20px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        border: none;
        border-radius: 5px;
    }

    .p_container {
        font-weight: bold;
        background: linear-gradient(135deg, #ffeeee, #ddefbb);
        padding: 15px 30px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* 自定义滚动条样式 */
    .p_container::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }

    /* 滚动条的滑块（抓手） */
    .p_container::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }

    /* 滚动条滑块在悬停时的效果 */
    .p_container::-webkit-scrollbar-thumb:hover {
        background-color: rgba(0, 0, 0, 0.4);
    }

    /* 滚动条轨道 */
    .p_container::-webkit-scrollbar-track {
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 6px;
    }

    /* 横向滚动条的样式 */
    .p_container::-webkit-scrollbar-horizontal {
        height: 12px;
    }

    .p_container::-webkit-scrollbar-thumb:horizontal {
        background-color: rgba(0, 0, 0, 0.3);
    }


    /* 确认按钮 */
    .confirmButton {
        background: linear-gradient(135deg, #81fbb8, #28c76f);
        color: black;
    }

    /* 取消按钮 */
    .cancelButton {
        background: linear-gradient(135deg, #fe8c00, #f83600);
        color: black;
    }

    .confirmButton:hover,
    .cancelButton:hover {
        transform: translateY(-2px);
    }

    #p_info_container {
        max-height: 40vh;
        overflow-y: auto;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .info-item {
        text-align: left;
    }

/* ---- style block 10 ---- */
/* 输入框样式 */
    #developer_code_input {
        width: 250px;
        padding: 10px;
        font-size: 16px;
        border: 2px solid #ccc;
        border-radius: 5px;
        margin-right: 10px;
        text-align: center;
        transition: all 0.3s ease;
    }

    #developer_code_input:focus {
        border-color: #007bff;
        box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
        outline: none;
    }

    /* 定制词条按钮样式 */
    #developer_code_button {
        padding: 10px 20px;
        font-size: 16px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        transition: background-color 0.3s ease, transform 0.3s ease;
        display: inline-block;
    }

    /* 按钮按下时的效果 */
    #developer_code_button:active {
        background-color: #004085;
        transform: scale(0.95);
    }

    /* 按钮聚焦时去除轮廓 */
    #developer_code_button:focus {
        outline: none;
    }

    /* 流光效果的背景动画 */
    @keyframes glowing {
        0% {
            background-position: 100%;
        }

        100% {
            background-position: -100%;
        }
    }

    /* 流光效果的样式，默认不显示 */
    #developer_code_button.glowing {
        background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
        background-size: 400% 100%;
        animation: glowing 2s linear infinite;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }



    #p_setting_container {
        height: 250px;
        width: 500px;
        overflow: auto;
    }

    .p_setting_item {
        white-space: nowrap;
        display: flex;
        align-items: center;
        text-align: center;
    }

    /* 矩形选择框 */
    .selector_rectangle {
        width: 15%;
        max-height: 100px;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #ddd;
        font-size: 16px;
        background-color: #fff;
        color: #333;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: border 0.3s, box-shadow 0.3s;
    }

    .selector_rectangle:focus {
        border: 1px solid #1890ff;
        box-shadow: 0 0 8px rgba(24, 144, 255, 0.4);
        outline: none;
    }

    .selector_rectangle option:checked {
        background-color: #d0e0ff;
    }

    .selector_rectangle option {
        padding: 10px;
        font-size: 18px;
        text-align: center;
        background-color: #fff;
        color: #333;
        transition: background-color 0.3s;
    }

    .selector_rectangle option:hover {
        background-color: #f0f0f0;
    }

    /* 圆形选择框 */
    .selector_circle {
        cursor: pointer;
        width: 30px;
        height: 30px;
        padding: 0;
        font-size: 16px;
        text-align: center;
        border-radius: 50%;
        border: 1px solid #ccc;
        background-color: #f9f9f9;
        color: #333;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        appearance: none;
        transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    }

    .selector_circle:hover {
        background-color: #f1f1f1;
        border-color: #888;
        transform: scale(1.1);
    }

    .selector_circle:focus {
        outline: none;
        border-color: #007bff;
        background-color: #e6f0ff;
        transform: scale(1.05);
    }

    .selector_circle:active {
        background-color: #e0e0e0;
        transform: scale(0.95);
    }

    .selector_circle option:checked {
        background-color: #d0e0ff;
    }

/* ---- style block 11 ---- */
/* 加载界面 */
    .load-background {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 99;
    }

    #load-background {
        animation: fadeOut 1s ease-out forwards;
    }

    #load-background.hidden {
        display: none;
    }

    .loader {
        display: none;
        width: 48px;
        height: 48px;
        margin: auto;
        position: relative;
        z-index: 100;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .loader:before {
        content: '';
        width: 48px;
        height: 5px;
        background: #f0808050;
        position: absolute;
        top: 60px;
        left: 0;
        border-radius: 50%;
        animation: shadow324 0.5s linear infinite;
    }

    .loader:after {
        content: '';
        width: 100%;
        height: 100%;
        background: #f08080;
        position: absolute;
        top: 0;
        left: 0;
        border-radius: 4px;
        animation: jump7456 0.5s linear infinite;
    }

    #loadDiag_info {
        display: none;
        position: fixed;
        margin-top: 3vh;
        top: 60%;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        font-size: 18px;
        font-family: Arial, sans-serif;
        z-index: 101;
    }

    #loadDiag_info::after {
        content: '加载中';
        animation: loadingText 1.5s steps(3) infinite;
    }

    @keyframes loadingText {
        0% {
            content: '加载中.';
        }

        33% {
            content: '加载中..';
        }

        66% {
            content: '加载中...';
        }

        100% {
            content: '加载中.';
        }
    }

    @keyframes jump7456 {
        15% {
            border-bottom-right-radius: 3px;
        }

        25% {
            transform: translateY(9px) rotate(22.5deg);
        }

        50% {
            transform: translateY(18px) scale(1, .9) rotate(45deg);
            border-bottom-right-radius: 40px;
        }

        75% {
            transform: translateY(9px) rotate(67.5deg);
        }

        100% {
            transform: translateY(0) rotate(90deg);
        }
    }

    @keyframes shadow324 {

        0%,
        100% {
            transform: scale(1, 1);
        }

        50% {
            transform: scale(1.2, 1);
        }
    }

    @keyframes fadeOut {
        0% {
            opacity: 1;
            transform: scale(1);
        }

        100% {
            opacity: 0;
            transform: scale(0.5);
        }
    }

