﻿:root {
    --bg-panel: #f5f5f5;
    --bg-item: white;
    --text-color: #222;
    --border-color: #ccc;
    --left-bg: #eaeaea;
}

body.dark-mode {
    --bg-panel: #1e1e1e;
    --bg-item: #2c2c2c;
    --text-color: #ddd;
    --border-color: #555;
    --left-bg: black;
    background: black;
}
    body.dark-mode .item-stage-1 {
        background-color: #3a3a3a;
        border-color: #555;
        color: #eee;
    }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    height: 100vh;
    font-family: sans-serif;
    color: var(--text-color);
}

#divFusionPanel {
    width: 70%;
    background: var(--left-bg);
    position: relative;
    overflow: hidden;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#divYuanLingPanel {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start; /* 控制多行整体靠上对齐 */
    align-items: flex-start; /* 控制每个 item 的对齐方向 */
    gap: 6px 10px; /* 行间距 行:6px，列:10px */
    width: 30%;
    background: var(--bg-panel);
    padding: 20px;
    overflow-y: auto;
    z-index: 2;
    transition: background 0.3s;
}


.item {
    display: flex; /* ❗取消 inline-flex，避免行内基线干扰 */
    align-items: center;
    gap: 8px;
    background: var(--bg-item);
    padding: 4px 12px 4px 8px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 16px;
    line-height: 1.2;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1;
    transition: background 0.3s, border-color 0.3s;
}

.item-stage-1 {
    color: #333333;
}
.item-stage-2 {
    color: #00cccc;
}
.item-stage-3 {
    color: #0066cc;
}
.item-stage-4 {
    color: #009900;
}
.item-stage-5 {
    color: #993399;
}
.item-stage-6 {
    color: #ff9933;
}
.item-stage-7 {
    color: #cc3333;
}

.item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
}

.dropped {
    position: absolute;
    cursor: move;
    transition: none !important;
    z-index: 2;
}

.flash {
    animation: flash 0.3s ease-in-out;
    box-shadow: 0 0 20px 8px yellow;
    border-color: gold;
}

@keyframes flash {
    from {
        box-shadow: 0 0 0px 0px yellow;
    }

    to {
        box-shadow: 0 0 20px 8px yellow;
    }
}

#butToggleControl {
    position: fixed;
    bottom: 20px;
    right: 378px;
    z-index: 9999;
    background: #336699;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.9;
}
    #butToggleControl:hover {
        opacity: 1;
        background: #006699;
    }

#butClearCanvas {
    position: fixed;
    bottom: 20px;
    right: 287px;
    z-index: 9999;
    background: crimson;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.9;
}

    #butClearCanvas:hover {
        opacity: 1;
        background: #cc3366;
    }

#butYuanLingCodex {
    position: fixed;
    bottom: 20px;
    right: 200px;
    z-index: 9999;
    background: #669900;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.9;
}

    #butYuanLingCodex:hover {
        opacity: 1;
        background: #336600;
    }

    #butYuanLingCodex a {
        text-decoration: none;
        color: inherit;
    }

#getRecipe {
    position: fixed;
    bottom: 20px;
    right: 110px;
    z-index: 9999;
    background: #333399;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.9;
}

    #getRecipe:hover {
        opacity: 1;
        background: #333366;
    }

    #getRecipe a {
        text-decoration: none;
        color: inherit;
    }

#butThemeToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: #333;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: background 0.3s;
}

    #butThemeToggle:hover {
        opacity: 1;
        background: #555;
    }

.toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgb(63, 63, 63, 0.90);
    color: #fff;
    padding: 10px 10px;
    border-radius: 10px;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(255, 255, 200, 0.3);
    backdrop-filter: blur(4px);
}
    .toast.show {
        opacity: 1;
    }

.user {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #333;
    opacity: 0.8;
    color: #fff;
    padding: 3px 15px 5px 10px;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(255, 255, 200, 0.3);
    backdrop-filter: blur(4px);
    text-align: left;
    display: block;
    user-select: none;
}
    .user table {
        padding-top:5px;
    }
    .user a {
        text-decoration: none;
        color: inherit;
    }
    .user:hover {
        opacity: 1;
        background: #222;
    }
    .user img {
        width: 25px;
        height: 25px;
        margin-right: 3px;
        margin-top: 3px;
    }
#tdLoginId, #tdEnergy {
    padding-bottom:5px;
}