.modal-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: linear-gradient(180deg, #1e0b3e 0%, #0f051d 100%);
    border-radius: 2.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin: auto;
}

/* Header Styles */
.modal-header {
    padding: 2.5rem 1.5rem 1rem;
    text-align: center;
    position: relative;
    border: none; /* ลบ border default ของ bootstrap */
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #ffffff;
    opacity: 0.5;
    cursor: pointer;
    transition: 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.header-badge {
    display: inline-block;
    padding: 0.5rem 2rem;
    background: rgba(88, 28, 135, 0.4);
    border-radius: 9999px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 0.75rem;
}

.header-badge h1 {
    font-size: 1.15rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.05em;
}

.header-subtext {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 300;
}
/* Custom Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Contact Item */
.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.08);
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-box-contact {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); */
    transition: transform 0.3s;
}

.contact-item:hover .icon-box-contact {
    transform: rotate(6deg);
}

.icon-box-contact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: brightness(0) invert(1); */
}

.icon-box-contact.bg-app {
    background: #ffffff;
}

.icon-box-contact.bg-app img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.contact-promo-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.15rem 0.6rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #3a2a00;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-secondary) 100%
    );
    border-radius: 9999px;
    white-space: nowrap;
}

.text-main {
    color: #ffffff;
    font-weight: 500;
}

.text-sub {
    color: #64748b;
    font-size: 0.625rem;
}

/* Action Button */
.btn-click {
    padding: 0.375rem 1.25rem;
    background: linear-gradient(135deg, #bd63f1 0%, #7e38ca 100%);
    border-radius: 9999px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.contact-item:hover .btn-click {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Platform Specific Colors */
.item-line:hover {
    border-color: #06c755;
    box-shadow: 0 0 15px rgba(6, 199, 85, 0.2);
}

.item-telegram:hover {
    border-color: #0088cc;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.2);
}

.item-facebook:hover {
    border-color: #1877f2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.2);
}

.item-instagram:hover {
    border-color: #e4405f;
    box-shadow: 0 0 15px rgba(228, 64, 95, 0.2);
}

.item-youtube:hover {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.item-app:hover {
    border-color: #bd63f1;
    box-shadow: 0 0 15px rgba(189, 99, 241, 0.25);
}

/* Decorative Elements */
.glow {
    position: absolute;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

.glow-1 {
    top: -4rem;
    left: -4rem;
    background: rgba(79, 70, 229, 0.2);
}

.glow-2 {
    bottom: -4rem;
    right: -4rem;
    background: rgba(147, 51, 234, 0.15);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .modal-container {
        border-radius: 2rem;
    }

    .header-badge h1 {
        font-size: 1.1rem;
    }

    .contact-item {
        padding: 0.75rem;
    }
}

/* free bonus */
#box-freebonus-widget {
    position: fixed;
    bottom: 150px;
    right: 10px;
    width: 45px;
    height: 50px; /* เพิ่มความสูงให้ชัดเจน */
    box-sizing: border-box;
    z-index: 999;
    border-radius: 50%; /* ปรับเป็นวงกลมให้เข้ากับแสง */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* บังคับ iOS เรนเดอร์แบบ Hardware Acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    animation: floating 3s ease-in-out infinite;
}

#box-freebonus-widget::before {
    content: '';
    position: absolute;
    /* ประกาศตำแหน่งให้ชัดเจนสำหรับ iOS */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%; /* ขยายขนาดแสงให้กว้างกว่าตัวกล่อง */
    height: 150%;
    /* เพิ่ม -webkit- สำหรับ Safari */
    background: -webkit-radial-gradient(
        circle,
        rgba(255, 215, 0, 0.8) 0%,
        rgba(255, 215, 0, 0) 70%
    );
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.8) 0%,
        rgba(255, 215, 0, 0) 70%
    );
    border-radius: 50%;
    z-index: -1;
    /* แยก Animation ออกมาให้ชัดเจน */
    animation: pulse-gold-ios 2s ease-in-out infinite;
    /* ป้องกันแสงโดนตัดขอบ */
    pointer-events: none;
}
@keyframes pulse-gold-ios {
    0% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0.4;
    }
}
/* ปรับแต่งตัวรูปภาพกล่อง */
#box-freebonus-widget img {
    width: 100%;
    height: auto;
    /* เงาใต้กล่องให้ดูมีมิติ */
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

/* เอฟเฟกต์ตอนเอาเมาส์ไปชี้ หรือกด */
#box-freebonus-widget:hover {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.2);
}

/* Animation: แสงวาบเข้า-ออก */
@keyframes pulse-gold {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

/* Animation: ลอยขึ้น-ลง นุ่มๆ */
@keyframes floating {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive: ปรับขนาดบนมือถือเล็กน้อย */
@media (max-width: 576px) {
    #box-freebonus-widget {
        width: 50px;
        height: 50px;
        right: 15px;
    }
}
.modal-content {
    width: 100%;
    max-width: 450px;
    background: linear-gradient(180deg, #321360 0%, #1a0833 100%);
    border-radius: 24px;
    border: 1px solid #5d2b9d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    color: #ffffff;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}
details summary {
    list-style: none;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: 0.3s;
}

.badge-noti {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
}

details summary:hover {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes royalFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}
@keyframes goldPulse {
    0%,
    100% {
        filter: drop-shadow(0 0 4px #f59e0b)
            drop-shadow(0 0 8px rgba(245, 158, 11, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 10px #fbbf24)
            drop-shadow(0 0 20px rgba(251, 191, 36, 0.6))
            drop-shadow(0 0 30px rgba(245, 158, 11, 0.3));
    }
}
@keyframes crownBob {
    0%,
    100% {
        transform: translateY(0) rotate(-4deg);
    }
    50% {
        transform: translateY(-4px) rotate(4deg);
    }
}
.rfloat {
    animation: royalFloat 2.8s ease-in-out infinite;
}
.rglow {
    animation: goldPulse 2.8s ease-in-out infinite;
}
.crown {
    animation: crownBob 2.8s ease-in-out infinite;
}
