body {
  font-family: "Noto Sans Thai Looped", sans-serif;
  font-weight: 400;
  font-style: normal;
  background-image: url("../icon/bg.jpg");
   min-height: 75rem;
  padding-bottom: 6.5rem;
-webkit-user-select: none; /* สำหรับ Safari, Chrome */
-moz-user-select: none;    /* สำหรับ Firefox */
-ms-user-select: none;     /* สำหรับ Internet Explorer/Edge */
user-select: none;         /* มาตรฐานทั่วไป */
}

[data-bs-theme="blue"] {
  --bs-body-color:  #ffffff;
  --bs-body-color-rgb: #{to-rgb($white)};
  --bs-body-bg:  #4a31a5;
  --bs-body-bg-rgb: #4a31a5;
  --bs-tertiary-bg: #4a31a5;

}


/* ป้องกันการ "ลาก" รูปภาพ */
img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* ทำให้คลิกรูปภาพไม่ได้ */
}
.carousel-item>img {
    border: #ffffff;
    border-radius: 1%;
}

 .img-manga{
    width: 100%;
    height: auto;
            
}
   .img-screen{
    max-width: 80%;
    height: auto;
}

/* style.css */
.emoji-picker-container {
    /* d-none will be toggled */
}

#emojiPickerContainer:not(.d-none) {
    display: block !important; /* Ensure container is block when shown */
}
.img-slide{
    width: 800px;
    height: 400px;
}
.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem; /* Or use Bootstrap 'gap-1' on this div */
    max-height: 180px; /* Adjust height to make space for pagination */
    overflow-y: auto;
    margin-bottom: 0.5rem; /* Space before pagination controls */
}

.emoji-char {
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.emoji-char:hover {
    background-color: #e9ecef;
}

.emoji-pagination button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* style.css */
/* ... (สไตล์เดิมสำหรับ emoji picker) ... */

#myTextarea {
    /* font-size จะถูกควบคุมโดย JavaScript */
    transition: font-size 0.2s ease-in-out; /* ทำให้การเปลี่ยนขนาดดูนุ่มนวล */
}

#currentFontSizeDisplay {
    cursor: default; /* ไม่ให้ดูเหมือนคลิกได้ */
    /* min-width: 50px; /* กำหนดใน inline style แล้ว */
}

.btn .fa-solid, .btn .bi { /* Target Font Awesome or Bootstrap Icons within a .btn */
    margin-left: 0.5rem; /* Adds space to the left of the icon */
}

.aspect-ratio-box {
  width: 100%; /* Or any desired width */
  aspect-ratio: 0.6/ 1; /* Example: 16:9 aspect ratio (width / height) */
  /* aspect-ratio: 1 / 1; /* For a square */
  /* aspect-ratio: 4 / 3; */
  overflow: hidden; /* To contain the image if it's larger */
}

.aspect-ratio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Or 'contain', 'scale-down', etc. depending on desired fit */
}

.card-header {
  min-height: 4.5rem; /* ปรับค่านี้ให้พอดีกับความสูงประมาณ 2 บรรทัดของฟอนต์คุณ */
  /* ถ้าต้องการให้ข้อความอยู่ตรงกลางแนวตั้งเมื่อ header สูงขึ้น */
  display: flex;
  align-items: center;
  justify-content: center; /* Horizontally centers the flex items */
  text-align: center;  
}

.chapter-select-dropdown .dropdown-menu {
    width: 100%;
}

.pagination-dropdown .dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
}

.center-aligned-dropdown .dropdown-menu {
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.btn-icon-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* ทำให้ปุ่มเป็นสี่เหลี่ยมจัตุรัส (ปรับขนาดได้) */
    width: 38px; 
    height: 38px;
    padding: 0;
}


        .id-card-modal .modal-content {
            border-radius: 1rem; /* ทำให้ขอบมนสวยงาม */
            border: none;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        }

        .id-card-header {
            background: linear-gradient(135deg, #6f42c1, #4e37a3);
            color: white;
            padding: 2.5rem 1.5rem;
            border-top-left-radius: 1rem;
            border-top-right-radius: 1rem;
            text-align: center;
            position: relative;
        }
        
        .profile-pic {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid white;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            margin-top: -75px; /* ดึงรูปขึ้นไปคร่อมส่วน Header */
            background-color: white;
        }

        .profile-name {
            font-size: 1.25rem;
            font-weight: 700;
        }

        .profile-rank {
            background-color: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        .info-list .list-group-item {
            border: none;
            background-color: transparent;
            padding-left: 0;
            padding-right: 0;
            display: flex;
            align-items: center;
        }

        .info-list .icon {
            color: #6f42c1;
            width: 30px;
            text-align: center;
        }

/* --- CSS ใหม่สำหรับ Edit Profile Modal (แก้ไขการซ้อนทับ) --- */

.edit-profile-modal .modal-content {
    /* (หัวใจหลัก) ทำให้ modal-content เป็นตัวตัดส่วนที่ล้น */
    overflow: visible; /* ปกติจะเป็น hidden, เราต้องเปิดเพื่อให้รูปโผล่ออกมาได้ */
    position: relative; /* สำคัญ: เพื่อให้ wrapper อ้างอิงได้ */
    border-radius: 0.5rem; /* ทำให้ขอบมน */
}

.edit-profile-modal .modal-header {
    border-bottom: none; /* เอาเส้นคั่นออกเพื่อให้ดูสะอาด */
}

/* เราจะไม่แตะต้อง modal-body อีกแล้ว */
.edit-profile-modal .modal-body {
    padding-top: 1rem;
}

.edit-profile-modal .profile-pic-wrapper {
    /* ย้าย wrapper ไปอยู่บนสุดของ modal-content */
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%); /* จัดกลางและดึงขึ้นไปครึ่งหนึ่ง */

    /* ขนาดรูป */
    width: 100px;
    height: 100px;
    
    /* (สำคัญ) ทำให้มันอยู่บนสุดเสมอ */
    z-index: 10;
}

.edit-profile-modal .profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    background-color: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.edit-profile-modal .upload-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 11; /* ให้อยู่บนรูปอีกที */
}

.edit-profile-modal .upload-button:hover {
    background-color: #0b5ed7;
}

.edit-profile-modal .modal-body-content {
    /* สร้าง div ใหม่ขึ้นมาครอบเนื้อหา เพื่อเว้นที่ให้รูป */
    margin-top: 60px; /* ระยะห่างจากขอบบน (เท่ากับครึ่งหนึ่งของความสูงรูป) */
}

        .password-toggle-btn {
            cursor: pointer;
        }
