h2 {
    margin-bottom: 10px;
}


#main-wrap {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    height: 85vh; /* 與 log 高度一致 */
}

/* 左邊欄位 = log + controls */
#left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* controls 區域 */
#controls {
    padding: 10px;
    border: 1px solid #666;
    background: #222;
    border-radius: 5px;
}

    #controls input {
        width: 80px;
        color: #000;
        padding: 4px;
        margin-right: 5px;
    }

    #controls button {
        margin-right: 5px;
        padding: 5px 10px;
        background: #333;
        border: 1px solid #555;
        color: #eee;
        cursor: pointer;
        border-radius: 5px;
    }

        #controls button:hover {
            background: #444;
        }

/* 左邊 console log */
#log {
    flex: 1; /* 佔 50% */
    margin-top: 10px;
    height: 85vh;
    white-space: pre-line;
    color: #ffffff;
    overflow-y: auto;
    border: 1px solid #555;
    padding: 10px;
    background: #111;
    font-size: 14px;
    line-height: 1.4;
}

/* 右邊整欄 */
#right-panel {
    flex: 1; /* 50% */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 上方 sendone */
#sendone {
    margin-top: 10px;
    margin-bottom: 10px;
}

    #sendone input {
        width: 150px;
        color: #000000;
        text-align: left;
        padding: 4px;
        margin-right: 5px;
    }

    #sendone button {
        margin-right: 5px;
        padding: 5px 10px;
        background: #555;
        border: 1px solid #888;
        color: #eee;
        cursor: pointer;
        border-radius: 5px;
    }

    #sendone button:hover {
        background: #444;
    }


/* 右邊 sendarea */
/* sendarea 按鈕區（可滾動） */
#sendarea {
    flex: 1; /* 填滿剩餘高度 */
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #666;
    background: #222;
    border-radius: 5px;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 一行三個 */
    gap: 10px; /* 按鈕間距 */
    /* ★★★ 讓按鈕往上靠 ★★★ */
    align-items: start;
    align-content: start;
}

    #sendarea button {
        padding: 8px 10px;
        height: 60px;
        background: #808080;
        border: 1px solid #888;
        color: #eee;
        cursor: pointer;
        border-radius: 5px;
    }

        #sendarea button:hover {
            background: #444;
        }


#issuelog {
    flex: 1; /* 佔 50% */
    margin-top: 0px;
    height: 85vh;
    white-space: pre-line;
    color: #ffffff;
    overflow-y: auto;
    border: 1px solid #555;
    padding: 10px;
    background: #111;
    font-size: 14px;
    line-height: 1.4;
}


button.loadingx {
    pointer-events: none; /* 禁止點擊 */
    position: relative;
    opacity: 0.7;
}

    button.loadingx::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%; /* 改成置中 */
        width: 32px; /* 原本 16px → 變大 */
        height: 32px; /* 原本 16px → 變大 */
        border: 4px solid #00f; /* 粗一點更明顯 */
        border-top: 2px solid transparent;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        transform: translate(-50%, -50%); /* 完全置中 */
    }

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
