/* กรอบหลัก */
/* --- ส่วนของกรอบหลัก (Frame) --- */
.collection-frame {
    position: relative; 
    width: 95% !important; /* ปรับให้กว้างขึ้นเกือบเต็มจอเพื่อให้มีพื้นที่สำหรับ 3-4 รูป */
    max-width: 1200px;      /* จำกัดความกว้างสูงสุดสำหรับจอคอม */
    margin: 5% auto 80px auto !important; 
    padding: 30px 10px !important; 
    background: rgba(255, 192, 203, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(241, 12, 12, 0.5) !important;
    border-radius: 25px !important;
    overflow: visible !important; 
}

/* --- ส่วนของวงกลมไอค่อน --- */
.manga-item-circle {
    width: 90% !important;      /* ปล่อยให้ขนาดวิ่งตาม Slider */
    max-width: none !important; /* ปลดล็อคขนาดสูงสุดที่เคยกันไว้ 130px */
    height: auto !important;
    aspect-ratio: 1 / 1;        /* บังคับให้เป็นจัตุรัสเสมอ */
    border-radius: 50% !important; /* บังคับให้กลม */
    border: 4px solid #ffb6c1;
    background: #fff;
    margin: 0 auto;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.manga-item-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* รูปข้างในจะเต็มวงกลมพอดีไม่เบี้ยว */
}

/* --- การแสดงผลแบบ Responsive (มือถือ/แท็บเล็ต) --- */
@media (max-width: 768px) {
    .collection-frame {
        width: 98% !important; /* จอมือถือให้กว้างเกือบชิดขอบ */
        padding: 20px 5px !important;
    }
}

/* ปรับตำแหน่ง Dots ใหม่ */
.slick-dots {
    position: absolute !important;
    bottom: -80px !important;  /* ระยะห่างจากขอบล่างของกรอบชมพู */
    right: 20px !important;   /* ระยะห่างจากขอบขวา */
    left: auto !important;    /* ปลดล็อกค่าฝั่งซ้าย */
    width: auto !important;   /* ให้กว้างเท่ากับจำนวนขีด */
    display: flex !important;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 10;
}

/* จัดระยะวงกลมให้กระจายตัวเต็มกรอบ */
.collection-slider {
    width: 90%;
    margin: 0 auto !important;
}

.slick-track {
    display: flex !important;
    justify-content: space-around !important; 
    align-items: center;
}

.slick-dots li {
    margin: 0 5px;
}

/* 1. สีขีดปกติ (โหมดสว่าง) - ให้เป็นสีเทาเข้มหน่อยจะได้เห็นชัดบนพื้นขาว */
.slick-dots li button {
    width: 20px !important;
    height: 8px !important;
    background: rgba(0, 0, 0, 0.2) !important; /* สีเทาดำโปร่งแสง */
    border: none !important;
    border-radius: 4px !important;
    font-size: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 2. สีขีดปกติ (โหมดมืด) - เมื่อ body มี class .dark-theme ให้เปลี่ยนเป็นสีขาวสว่าง */
.dark-theme .slick-dots li button {
    background: rgba(255, 255, 255, 0.6) !important; /* สีขาวโปร่งแสง เห็นชัดบนพื้นดำ */
}

/* ขีดที่กำลังแสดงอยู่ (Active) */
.slick-dots li.slick-active button {
    width: 23px !important; /* ให้ยาวขึ้นเฉพาะตัวที่เลือก */
    height: 8px !important;
    background: #e43131 !important; /* สีชมพูเข้ม */
}

/* ลบวงกลมหลอกๆ ที่มักจะติดมากับ Slick Default */
.slick-dots li button:before {
    display: none !important; 
}
/* --- Sakura Loading Overlay --- */
#sakura-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px); /* ทำให้เว็ปด้านหลังเบลอ */
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.sakura-overlay-hidden {
    opacity: 0;
    pointer-events: none;
}

.sakura-overlay-visible {
    opacity: 1;
    pointer-events: auto;
}

.sakura-spinner-container {
    text-align: center;
}

.spinning-sakura {
    width: 80px;
    animation: spinSakura 2s linear infinite; /* หมุนวนลูป */
}

.loading-text {
    color: #ffffff;
    margin-top: 15px;
    font-family: 'Mali', cursive;
    font-size: 18px;
}

@keyframes spinSakura {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}