.modal-content {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    background-color: #f8f9fa;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.form-label {
    font-weight: 500;
    color: #555;
}

.form-select {
    border-radius: 8px;
    padding: 10px;
        border: 1px solid #000000;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Flex container for select and button */
.d-flex {
    align-items: start;
}

.form-select {
    flex: 1;
}

#connectTikTokBtn {
    white-space: nowrap;
    margin-bottom: 10px;
}

.waiting-text {
    display: none;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 8px;
    font-style: italic;
}

.connected .waiting-text {
    display: block;
}

.modal-footer {
    padding: 1.5rem;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.btn-primary {
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(13, 110, 253, 0.3);
}

/* --- PERUBAHAN 1: Menambahkan margin-top di Desktop --- */
#photoFrame {
    margin-top: 1rem; /* Menurunkan posisi foto profil */
}
/* --- AKHIR PERUBAHAN 1 --- */


/* Container styles */
.container {
    padding: 2rem;
}

/* Photo frame and overlay */
.photo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.photo-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.event-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 4px; /* reduced vertical/horizontal padding to make overlay shorter */
    background: rgba(255,255,255,0.95);
    color: var(--primary-dark);
    font-weight: 600;
    transition: opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    line-height: 1.1;
    font-size: 14px;
}
.event-overlay small { color: rgba(0,0,0,0.65); font-weight:500; }

/* Ensure inner elements use compact spacing */
.event-overlay > * { padding: 4px 6px; margin: 0; font-size: 14px; }

/* Khodam Container Styles */
.khodam-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
}

.khodam-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: yellow; /* DIUBAH: Menjadi warna kuning */
    margin-bottom: 1.5rem;
    /* DITAMBAHKAN: Stroke/garis tepi hitam */
    text-shadow: 
        -1px -1px 1px #000,  
         1px -1px 1px #000,
        -1px  1px 1px #000,
         1px  1px 1px #000,
         0 0 4px #000;
}

/* --- UKURAN FOTO KHODAM PC --- */
.khodam-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-items: center; 
}

.khodam-image {
    width: 100%;
    aspect-ratio: 1; 
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #eee; 
    transition: transform 0.3s ease;
    max-width: 150px; 
}

.khodam-image:hover {
    transform: scale(1.05);
}

.khodam-info {
    padding: 1rem;
    background: rgba(255,255,255,0.9);
        border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.khodam-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.khodam-description {
    color: #666;
    line-height: 1.5;
}

/* === AWAL TAMBAHAN: STYLING YOUTUBE === */
#youtubeLinkInput {
    /* Menggunakan style yang sama dengan .form-select */
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
}

#playYoutubeButton {
    /* Menggunakan style yang sama dengan #connectButton */
    white-space: nowrap;
    margin-bottom: 10px;
    
    /* Style tambahan dari .btn */
    padding: 10px 20px; /* Sedikit disesuaikan */
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#volumeSlider {
    width: 100%;
}
/* === AKHIR TAMBAHAN: STYLING YOUTUBE === */


/* ==============================================
=== PERUBAHAN RESPONSIF MOBILE (DI BAWAH INI) ===
==============================================
*/
@media (max-width: 576px) {
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }

    .container {
        padding: 0.5rem; 
    }
    
    #photoFrame {
        max-width: 240px !important; 
        margin-bottom: 0.5rem; 
        margin-top: 2.5rem; 
    }

    .event-overlay {
        font-size: 12px;
        line-height: 1.2;
    }
    .event-overlay > * {
        font-size: 12px;
        padding: 3px 5px;
    }

    .khodam-container {
        padding: 0.5rem; 
        margin-top: 0.5rem; 
    }
    
    .khodam-title {
        font-size: 1.15rem; 
        margin-bottom: 0.5rem; 
    }

    /* --- UKURAN FOTO KHODAM MOBILE --- */
    .khodam-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
        gap: 0.5rem; 
        margin-bottom: 0.5rem; 
    }
    
    .khodam-image {
       max-width: 150px; 
    }

    .khodam-info {
        padding: 0.5rem; 
        margin-top: 0.5rem; 
    }

    .khodam-name {
        font-size: 1.05rem; /* DIUBAH: Font diperbesar dari 0.9rem */
        line-height: 1.3;
        margin-bottom: 0;
        /* Warna dan stroke akan otomatis diwarisi dari style desktop */
    }
    
    /* Penyesuaian mobile untuk tombol youtube */
    #playYoutubeButton {
        padding: 10px 15px;
    }
}

/* Style untuk pilihan Khodam di Modal */
.khodam-type-selection {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.khodam-type-selection .form-check {
    margin-bottom: 8px;
}

.khodam-type-selection .form-check:last-child {
    margin-bottom: 0;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ==============================================
   === AWAL TAMBAHAN: STYLE BUBBLE FOTO PROFIL ===
   ============================================== */

#bubble-container {
    position: fixed; /* Tetap di layar */
    top: 0;
    left: 0;
    width: 100vw; /* Lebar penuh */
    height: 100dvh; /* Tinggi penuh */
    z-index: -1; /* PENTING: Posisikan di belakang semua konten lain */
    overflow: hidden; /* Sembunyikan bubble yang keluar layar */
    pointer-events: none; /* Agar tidak bisa di-klik dan tidak menghalangi modal */
}

.event-bubble {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Bentuk lingkaran */
    background-size: cover;
    background-position: center center;
    border: 3px solid #FFF; /* Border akan diubah warnanya oleh JS */
    
    /* Animasi:
      - Bergerak (transform) selama 30 detik
      - Mulai memudar (opacity) di detik ke-29, selesai di detik ke-30
    */
   transition: transform 5s linear, opacity 1s ease-out 29s;
    
    opacity: 1; /* Kondisi awal */
    will-change: transform, opacity; /* Optimalisasi performa animasi */
}

/* ==============================================
   === AKHIR TAMBAHAN: STYLE BUBBLE FOTO PROFIL ===
   ============================================== */

   /* ==============================================
   === AWAL TAMBAHAN: STYLE TOMBOL SETTINGS ===
   ============================================== */

#settingsContainer {
    /* Menambahkan transisi untuk animasi muncul/hilang */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#settingsContainer.hidden {
    opacity: 0;
    pointer-events: none;
    /* Pindahkan ke bawah saat tersembunyi */
    transform: translateY(100%) translateX(-50%); 
}

#settingsContainer.visible {
    opacity: 1;
    pointer-events: auto;
    /* Posisi normal saat terlihat */
    transform: translateY(0) translateX(-50%); 
}

.modal-header-buttons {
    display: flex;
    align-items: center;
    /* Jarak antara tombol fullscreen dan tombol close */
    gap: 12px; 
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    color: #000; /* Menyamakan warna dengan btn-close */
    line-height: 1; /* Memastikan icon vertikal center */
}

.btn-icon:hover {
    opacity: 1;
}

.btn-icon svg {
    /* Memastikan ukuran SVG konsisten */
    width: 16px;
    height: 16px;
}
/* ==============================================
   === AKHIR TAMBAHAN: STYLE TOMBOL SETTINGS ===
   ============================================== */