/* ตัวอย่าง CSS เบื้องต้น */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@100..900&display=swap');

@font-face {
    font-family: NCLRobowapix;
    src: url("./fonts/NCLRobowapix.otf") format("opentype");
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    /* พื้นหลังสีดำ */
    font-family: NCLRobowapix;
    color: #fff;
    /* ตัวอักษรสีขาว */
    display: flex;
    justify-content: center;
    align-items: center;
}

.cyberme-bg {
    background-position: center center;
    background-image: url('images/background.png');
    background-size: cover;
    height: 100vh;

    /* Animation เปลี่ยนความสว่าง 
    animation: brightnessAnimation 5s ease-in-out infinite;*/
}

@keyframes brightnessAnimation {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(0.7);
        /* ปรับให้มืดลง 30% */
    }
}

.container {
    text-align: center;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    color: #b6ff00;
    /* ตัวอักษรสีเขียวสะท้อนแสง */
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #999;
    /* สีเทาอ่อน */
}

.btn-group button {
    font-family: "Roboto Mono", monospace;
    background: transparent;
    border: 2px solid #b6ff00;
    color: #b6ff00;
    padding: 1rem 2rem;
    margin: 0 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-group button:hover {
    font-family: "Roboto Mono", monospace;
    background: #b6ff00;
    color: #000;
}

.frame-cyberme {
    background-size: cover;
}

.frame-padding {
    padding-top: 3%;
}

.logo img {
    width: 70%;
    height: auto;

    /* เพิ่มส่วนของ Animation */
    animation: floating 5s ease-in-out infinite;
}

.cyberme-mobile {
    display: none !important;
}

.cyberme-pc {
    display: block;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
        /* ปรับค่าตามต้องการว่าต้องการลอยขึ้นสูงเท่าไร */
    }
}

.logo-mobile {
    display: none;
}

.cyber-frame {
    background-image: url('images/frame.png');
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-position: center center;
    background-size: cover;
}

.signin-container {
    width: 80%;
    margin: 0 auto;
    justify-content: center;
}

.white-box {
    border: 1px solid #fff;
    padding: 1%;
}

.cyberme-feed {
    width: 70%;
}

.cyberme-text {
    color: #fff;
    font-family: "Roboto Mono", monospace;
}

.cyberme-align {
    justify-content: right;
    align-items: right;
}

.policy-space {
    margin-top: 3% !important;
    padding: 2%;
}

.white-box.policy-space {
    font-family: "Noto Sans Thai", sans-serif;
    max-height: 350px;
    /* กำหนดความสูงสูงสุด 350px */
    overflow-y: auto;
    /* แสดง scrollbar เฉพาะเมื่อเนื้อหาเกินความสูง */
    color: #fff;
    /* สีตัวอักษรของเนื้อหา */
    /* หรือถ้าต้องการให้ scrollbar ปรากฏตลอดเวลา ให้ใช้ overflow-y: scroll; */
}

.google-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 16px;
    color: #757575;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.google-btn:hover {
    background-color: #f5f5f5;
}

.google-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.google-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cyberme-back {
    width: 100%;
}

.cyberme-feed-small {
    width: 35%;
}

.avatar-space {
    margin-top: 2% !important;
    height: 60vh;
}

.avatar-space img {
    transition: transform 0.3s ease;
    border-radius: 0px;
}

.avatar-space img:hover {
    transform: scale(1.15);
}

.avatar-space img:hover {
    transform: scale(1.15);
    transform-origin: center center;
}

.camera-top {
    border: 1px #fff solid;
    padding: 2%;
}

.snapshot-container {
    width: 60% !important;
    text-align: center;
}

.entercanvas {
    margin: auto !important;
    width: 100% !important;
}

.img-fluid {
    max-width: 100% !important;
    height: auto;
}

.img-fluid-x {
    max-width: 70% !important;
    height: auto;
}

#previewImage {
    max-width: 30%;
    height: auto;
    margin-bottom: 20px;
}

#createAvatarBtn {
    background-color: #b6ff00 !important;
    font-family: "Noto Sans Thai", sans-serif !important;
    color: #000 !important;
}

.textBlack {
    color: #000 !important;
}

#uploadBtn {
    background-image: url('images/buttonCamera.png');
    padding: 0px;
    width: 40%;
    height: 50px;
    background-position: center;
    background-size: contain;
    color: #ffffff00 !important;
}

.cyberme-button-camera {
    background-color: #b6ff00;
    padding: 1%;
    color: #000;
    font-family: "Noto Sans Thai", sans-serif !important;
    border: 0px;
    width: 40%;
    border-radius: 0px;
}

.cyberme-button-upload {
    background-color: #b500ac !important;
    padding: 1%;
    color: #000;
    font-family: "Noto Sans Thai", sans-serif;
    border: 0px;
    width: 40%;
    border-radius: 0px;
}

.modal-title {
    font-family: "Noto Sans Thai", sans-serif !important;
}

#downloadBtn {
    background-color: #d4ff00 !important;
    padding: 3%;
    font-weight: bold;
    color: #000 !important;
    font-family: "Noto Sans Thai", sans-serif;
}

.closeBtnRedirect {
    background-color: #ffffff !important;
    padding: 3%;
    font-weight: bold;
    color: #333 !important;
    font-family: "Noto Sans Thai", sans-serif;
}

#uploadStatus {
    font-family: "Noto Sans Thai", sans-serif !important;
}

.spinner-border {
    padding: 5% !important;
    margin-left: 0% !important;
    margin-top: 15% !important;
}

.text-light {
    text-align: center !important;
    --bs-text-opacity: 1;
    color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
}


.avatar-container {
    display: grid;
    gap: 10px;
    padding: 10px;
}

/* สำหรับ WebKit browsers (Chrome, Safari, Edge) */
.scroll-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scroll-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* สำหรับ Firefox */
.scroll-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}


/* === Desktop: 3 แถว === */
@media (min-width: 1024px) {
    .avatar-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-auto-rows: 200px;
        /* กำหนดความสูงของแต่ละแถว */
    }
}

/* === Mobile: 3 Columns หลายแถว === */
@media (max-width: 1023px) {
    .avatar-container {
        grid-template-columns: repeat(3, 1fr);
        /* 3 คอลัมน์ */
        grid-auto-rows: auto;
        /* ปรับความสูงอัตโนมัติ */
    }
}

/* === ปรับขนาดภาพ === */
.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ทำให้ภาพเต็ม div */
    border-radius: 0px;
}

/* === ปรับแต่ง Scroll ของ Container === */
.scroll-wrapper {
    height: 80vh;
    /* ทำให้ Scroll ได้ */
    overflow-y: auto;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1050;
}

.adminText {
    color: #f5f5f5;
    font-size: 0.8rem;
}

/* Media Query สำหรับหน้าจอ Mobile */
@media (max-width: 600px) {
    .google-btn {
        width: 100%;
    }

    #createAvatarBtn {
        background-color: #b6ff00 !important;
        font-family: "Noto Sans Thai", sans-serif !important;
        color: #000 !important;
        width: 100%;
    }

    #previewImage {
        max-width: 90%;
        height: auto;
        margin-bottom: 20px;
    }

    #ads {
        display: none;
    }

    .snapshot-container {
        width: 100% !important;
        text-align: center;
    }

    #uploadBtn {
        background-image: url(images/buttonCamera.png);
        padding: 0px;
        width: 100%;
        height: 40px;
        background-position: center;
        background-size: contain;
    }

    .modal {
        padding-top: 30% !important;
        width: 100% !important;
    }

    .cyberme-button-camera {
        background-color: #d4ff00 !important;
        padding: 1%;
        color: #000 !important;
        font-family: "Noto Sans Thai", sans-serif;
        border: 0px;
        width: 100%;
        /* border-radius: 18px; */
        border-radius: 5px;
    }

    .cyberme-button-upload {
        margin-top: 20px !important;
        background-color: #b500ac !important;
        padding: 1%;
        color: #000 !important;
        font-family: "Noto Sans Thai", sans-serif !important;
        border: 0px;
        width: 100% !important;
        /* border-radius: 18px; */
        border-radius: 5px;
    }

    .signin-container {
        width: 90%;
        margin: 0 auto;
        justify-content: center;
    }


    .white-box {
        border: 1px solid #fff;
        padding: 3% !important;
    }

    .cyberme-feed {
        width: 100%;
    }

    .cyberme-mobile {
        display: block !important;
    }

    .cyberme-pc {
        display: none !important;
    }

    .cyberme-bg {
        background-image: url('images/home-mobile.png');
        background-size: cover;
        background-position: center center;
    }

    .logo {
        display: none;
    }

    .logo-mobile img {
        width: 85%;
        /* ปรับความกว้างให้เต็มหน้าจอ */
        /* ปรับเวลา animation หรือค่าอื่น ๆ ตามต้องการ */
        animation: floating 4s ease-in-out infinite;
    }

    .logo-mobile {
        display: block;
        margin-bottom: 3%;
    }

    .cyberme-feed-small {
        width: 100%;
        padding: 5%;
    }

    .avatar-space {
        margin-top: 5% !important;
    }

    .btn-group button {
        background: transparent;
        border: 2px solid #b6ff00;
        color: #b6ff00;
        padding: 1rem 2rem;
        margin: 0 1rem;
        cursor: pointer;
        font-size: 1rem;
        width: 90%;
        transition: all 0.3s ease;
        margin-bottom: 5%;
    }

    .spinner-border {
        margin-top: 60% !important;
        margin-left: 0% !important;
    }

    .text-light {
        text-align: center !important;
        --bs-text-opacity: 1;
        color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
    }
}