.showcase-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
}

.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 20px;
    border-bottom: 2px solid #6c5ce7;
    padding-bottom: 10px;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

/* ตัวหลัก (สถานะปกติ) */
.showcase-card img{
    display: inline-block;
    position: relative;
    
    /* 1. ใช้ Cubic Bezier เพื่อจังหวะที่นุ่มนวลกว่าปกติ */
    /* กราฟนี้จะค่อยๆ เริ่ม และนุ่มนวลมากตอนจบ */

    /* 2. บังคับให้เบราว์เซอร์ใช้ GPU ประมวลผล จะช่วยลดอาการกระตุก */
    backface-visibility: hidden;
    
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* เพิ่มความนุ่มนวลเวลาเด้ง */

}

.showcase-card:hover img {
    box-shadow: 
        0 20px 30px rgba(0, 0, 0, 0.5),          /* เงาเข้มด้านล่าง */
        0 0 15px rgba(255, 217, 0, 0.6),        /* แสงสีทองชั้นใน */
        0 0 30px rgba(255, 217, 0, 0.3);        /* แสงสีทองฟุ้งๆ ชั้นนอก */
        
    transform: translateY(-5px) scale(1.1);                /* ให้การ์ดขยับขึ้นเล็กน้อย */
    transition: all 0.1s ease-in-out;           /* ให้แสงค่อยๆ สว่างขึ้นอย่างนุ่มนวล */
    outline: 2px solid rgba(255, 217, 0, 0.8);  /* เพิ่มเส้นขอบบางๆ ให้ดูคม */
    outline-offset: -2px;                       /* ให้เส้นขอบอยู่ด้านในภาพนิดหน่อย */
    border-radius: 13px;                        /* ปรับให้เข้ากับทรงการ์ด */

.showcase-count-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: #000000;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.btn-close-showcase {
    background: #ff4757; color: white; border: none;
    padding: 10px 20px; border-radius: 5px; cursor: pointer;
}



/*แผนภููมิละเอียด*//*/*/
/* สไตล์สำหรับ Monitor */
.deck-stats-monitor {
    background: rgba(45, 52, 54, 0.9);
    border: 1px solid #6c5ce7;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    color: white;
    font-size: 14px;
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.stat-label { width: 80px; }
.stat-bar-bg {
    flex-grow: 1;
    background: #3d3d3d;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    transition: width 0.5s ease-out;
}

/* Dashboard Container */
.deck-monitor-panel {
    background: rgba(15, 15, 25, 0.9);
    border: 1px solid #6c5ce7;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: none; /* ปิดไว้ก่อน จะเปิดด้วยปุ่ม */
    animation: fadeInDown 0.4s ease-out;
}

.deck-monitor-panel.active { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; }

/* DP Bar Chart */
.bar-container { display: flex; align-items: flex-end; height: 100px; gap: 6px; margin-top: 15px; }
.bar-item {
    width: 22px;
    background: linear-gradient(to top, #6c5ce7, #a29bfe);
    border-radius: 4px 4px 0 0;
    position: relative;
}
.bar-item:hover { filter: brightness(1.3); }
.bar-label { font-size: 10px; color: #aaa; margin-top: 5px; text-align: center; width: 100%; }

/* Type Stats */
.type-stat-box { display: flex; align-items: center; margin-bottom: 8px; font-size: 14px; }
.type-dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


#showcaseBody {
    background-color: 160D2B !important; /* หรือสีที่คุณต้องการ */
    color: black;
    padding: 20px;
}


/* ซ่อนปุ่มควบคุมไว้เป็นค่าเริ่มต้น */
.showcase-controls {
    display: none; 
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    border-radius: 20px;
    padding: 2px 10px;
    gap: 15px;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* แสดงปุ่มเมื่อ Showcase อยู่ในโหมด Edit */
.showcase-overlay.edit-mode-active .showcase-controls {
    display: flex;
}

.showcase-ctrl-btn {
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s, color 0.2s;
}
.showcase-ctrl-btn:active { transform: scale(1.3); }
.showcase-ctrl-btn.minus:hover { color: #ff4757; }
.showcase-ctrl-btn.plus:hover { color: #2ecc71; }