﻿body {
    margin: 0;
    overflow: hidden;
    font-family: 'Prompt', sans-serif;
    background-color: #121c26;
    color: #fff;
    display: flex;
    height: 100vh;
}

#canvas-container {
    flex-grow: 1;
    height: 100vh;
    position: relative;
}

#ui-panel {
    width: 400px;
    min-width: 350px;
    background-color: #385166;
    background: linear-gradient(180deg, #173b4e 0%, #465a6a 100%);
    padding: 30px 25px;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    z-index: 10;
}

.header-section { margin-bottom: 25px; }
.header-section h2 { color: #52c2ff; margin: 0; font-size: 24px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.header-section .icon { font-size: 28px; }
.subtitle { color: #86a3b8; font-size: 12px; margin: 5px 0 0 0; }

label { display: block; margin-top: 15px; font-size: 13px; color: #86a3b8; font-weight: 500; }
.mt-20 { margin-top: 25px; }

select, input[type="number"] {
    width: 100%; padding: 12px; margin-top: 8px; box-sizing: border-box;
    background: #253344; color: white; border: 1px solid #3c4f60;
    border-radius: 8px; font-family: 'Prompt', sans-serif; font-size: 14px;
    outline: none; cursor: pointer; transition: 0.3s;
}
input[type="number"]:focus, select:focus { border-color: #52c2ff; }

.slider-header { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px;}
.slider-header label { margin-top: 0; }
.badge { background: rgba(82, 194, 255, 0.2); color: #52c2ff; padding: 4px 12px; border-radius: 15px; font-size: 12px; font-weight: 500; border: 1px solid rgba(82, 194, 255, 0.3);}

input[type="range"] { 
    -webkit-appearance: none; width: 100%; background: transparent; margin-top: 15px; 
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%; height: 6px; background: #5c6c7b; border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 18px; width: 18px;
    border-radius: 50%; background: #00aeff;
    box-shadow: 0 0 10px rgba(0, 174, 255, 0.8);
    margin-top: -6px; cursor: pointer; border: 2px solid white;
}

.panel-buttons {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px;
}
.panel-buttons button {
    padding: 15px 10px; background: #344051; color: #86a3b8;
    border: none; border-radius: 10px; cursor: pointer;
    font-family: 'Prompt', sans-serif; font-size: 12px; line-height: 1.4;
    transition: all 0.3s ease;
}
.panel-buttons button b { font-size: 15px; color: #c4d6e5; font-weight: 500; display: block; margin-bottom: 2px;}
.panel-buttons button:hover { background: #3c4f63; }
.panel-buttons button.active {
    background: #0078d4; color: white; border: 1px solid #52c2ff;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.4);
}
.panel-buttons button.active b { color: white; }

.result-box {
    margin-top: 30px; padding: 20px; background: #1e2532;
    border-radius: 12px; border: 1px solid #2a3445;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}
.result-text { display: flex; justify-content: space-between; align-items: center; }
.result-labels .sys-eff { color: #a3b8cc; font-size: 10px; font-weight: 600; letter-spacing: 1px; }
.result-labels .sys-sub { color: #6d8599; font-size: 12px; margin-top: 3px;}
.result-box h1 { color: #ffcc00; margin: 0; font-size: 36px; font-weight: 600; text-shadow: 0 2px 10px rgba(255, 204, 0, 0.3); }

.efficiency-bar-container { width: 100%; height: 6px; background: #2a3445; border-radius: 3px; margin-top: 15px; overflow: hidden; }
.efficiency-bar {
    height: 100%; width: 43.4%; border-radius: 3px;
    background: linear-gradient(to right, #ff4d4d 0%, #ffcc00 50%, #4dff4d 100%);
    transition: width 0.3s ease;
}

.extra-stats {
    margin-top: 20px; padding-top: 15px; border-top: 1px dashed #3c4f60;
    font-size: 13px; color: #86a3b8;
}
.stat-row { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center;}
.stat-row b { color: #fff; font-size: 15px; }
.text-green { color: #4dff4d; }
.text-green b { color: #4dff4d; font-size: 16px; text-shadow: 0 0 8px rgba(77, 255, 77, 0.3);}

@media (max-width: 768px) {
    body { flex-direction: column; }
    #canvas-container { height: 40vh; flex-grow: 0; }
    #ui-panel { width: 100%; height: 60vh; }
}
/* สไตล์สำหรับส่วนสนับสนุน (Donation Card) */
.donation-card {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03); /* โปร่งแสงนิดๆ ให้เข้ากับพื้นหลังเดิม */
    border-radius: 16px;
    border: 1px dashed rgba(82, 194, 255, 0.3); /* เส้นประสีฟ้าอ่อน */
    margin-bottom: 20px;
}

.donation-text {
    font-size: 14px;
    color: #a3b8cc;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.qr-wrapper {
    display: inline-block;
    background: white; /* พื้นหลังขาวช่วยให้แสกนง่ายขึ้น */
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.qr-img {
    width: 130px; /* ขนาดกำลังพอดี */
    height: 130px;
    display: block;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.qr-img:hover {
    transform: scale(1.08); /* เพิ่มลูกเล่นเมื่อเมาส์ชี้ */
}