.floating-survey {
    position: fixed;
    bottom: 60px;
    right: -25px;
    cursor: pointer;
    z-index: 9999;
    display: none;
    /* Disembunyikan dulu */
    align-items: center;
    flex-direction: column;
}

/* Style Karakter */
.character-trigger img {
    width: 200px;
    /* Sesuaikan ukuran */
    height: auto;
    transition: transform 0.3s ease;
}

.character-trigger:hover img {
    transform: scale(1.1) rotate(-5deg);
}

/* Balon Percakapan Komik */
.comic-bubble {
    position: relative;
    background: #ffffff;
    border: 3px solid #000;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: bold;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 15px;
    box-shadow: 5px 5px 0px #000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Segitiga Balon Komik */
.comic-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    margin-left: -10px;
    border-width: 15px 10px 0;
    border-style: solid;
    border-color: #000 transparent transparent;
}

/* Efek Hover */
.floating-survey:hover .comic-bubble {
    opacity: 1;
    transform: translateY(0);
}




/* 1. OVERLAY BACKGROUND (Lebih Gelap & Blur) */
.modal_survey {
    display: none;
    position: fixed;
    z-index: 99999 !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    /* Lebih gelap agar fokus */
    backdrop-filter: blur(8px) !important;
    /* Blur lebih kuat */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 2. WINDOW MAC OS (MODAL CONTENT) - DIPERLEBAR & DIPERTINGGI */
.modal-content_survey {
    background-color: #fdfdfd !important;
    margin: auto;
    border: none !important;

    /* UKURAN BARU YANG LEBIH LEBAR */
    width: 95% !important;
    max-width: 900px !important;
    /* Diperlebar dari 600px ke 900px */
    height: 90vh !important;
    /* Mengambil 90% tinggi layar */

    border-radius: 12px !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3) !important;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden !important;
}

/* 3. HEADER MAC OS */
.macos-header {
    background: linear-gradient(to bottom, #ececec 0%, #dfdfdf 100%) !important;
    height: 44px !important;
    /* Sedikit lebih tinggi */
    display: flex;
    align-items: center;
    padding: 0 20px !important;
    border-bottom: 1px solid #c7c7c7 !important;
    flex-shrink: 0;
    position: relative;
}

.modal-title-bar {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-family: -apple-system, system-ui, sans-serif !important;
    font-size: 15px !important;
    color: #333 !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    pointer-events: none;
}

.traffic-lights {
    display: flex;
    gap: 8px;
}

.traffic-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dot-red {
    background-color: #ff5f56;
    cursor: pointer;
}

.dot-yellow {
    background-color: #ffbd2e;
}

.dot-green {
    background-color: #27c93f;
}

/* 4. BODY CONTAINER (SCROLLABLE) */
.modal-body-container {
    flex-grow: 1;
    width: 100%;
    background-color: #fff;
    overflow-y: auto !important;
    /* Scroll vertikal aktif */
    padding: 0 !important;
}

/* IFRAME FULL SIZE */
#resultIframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 600px !important;
    /* Tinggi minimal iframe */
    border: none !important;
    display: block;
}

/* ============================================================
5. CSS INJECTION UNTUK FORM (Agar Tampilan Form Cantik)
Pastikan CSS ini terbaca oleh elemen form
============================================================ */

#form-survey {
    padding: 40px 60px !important;
    /* Padding kanan-kiri lebih lega */
    max-width: 800px !important;
    /* Membatasi lebar konten agar tidak terlalu melebar */
    margin: 0 auto !important;
    /* Posisi tengah */
    display: flex !important;
    flex-direction: column !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* --- RE-ORDERING (Urutan Tampilan) --- */
#form-survey .survey-info {
    order: 1 !important;
}

#form-survey .rating-container {
    order: 2 !important;
    margin-bottom: 30px !important;
}

#form-survey>div:nth-of-type(3) {
    order: 3 !important;
    margin-bottom: 30px !important;
}

/* Textarea */
#form-survey .form-actions {
    order: 4 !important;
}

/* Tombol & Captcha */

/* --- TYPOGRAPHY --- */
.survey-title {
    font-size: 28px !important;
    color: #111 !important;
    margin-bottom: 10px !important;
    text-align: center !important;
}

.survey-description {
    font-size: 16px !important;
    color: #666 !important;
    margin-bottom: 40px !important;
    text-align: center !important;
}

/* --- INPUT FIELDS --- */
.respondent-input,
.question-block textarea {
    width: 100% !important;
    padding: 15px !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    background-color: #fcfcfc !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
}

.respondent-input:focus,
.question-block textarea:focus {
    border-color: #007bff !important;
    background-color: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1) !important;
}

/* --- RATING SECTION --- */
.rating-container {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    padding: 30px !important;
    border-radius: 12px !important;
    text-align: center !important;
}

.star {
    font-size: 40px !important;
    margin: 0 5px !important;
    color: #ffc107 !important;
    transition: 0.2s !important;
}

.star:hover {
    transform: scale(1.2) !important;
}

/* --- FORM ACTIONS (CAPTCHA & TOMBOL) --- */
.form-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
}

/* --- CAPTCHA STYLING (PERBAIKAN) --- */
#g-recaptcha {
    display: flex !important;
    justify-content: center !important;
    margin: 20px auto !important;
    /* Jarak atas bawah */
    transform: scale(1.1) !important;
    /* Memperbesar Captcha sedikit agar jelas */
    transform-origin: center top !important;
}

#reset-captcha {
    margin-bottom: 20px !important;
    color: #888 !important;
    font-size: 14px !important;
    background: none !important;
    border: none !important;
    text-decoration: underline !important;
    cursor: pointer !important;
}

/* --- TOMBOL SUBMIT (PERBAIKAN) --- */
input[type="submit"] {
    width: 100% !important;
    max-width: 400px !important;
    /* Agar tidak terlalu lebar di layar besar */
    padding: 18px !important;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    /* Gradient Biru Modern */
    color: white !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 50px !important;
    /* Tombol Pill Shape */
    cursor: pointer !important;
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.3) !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
}

input[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 25px rgba(0, 123, 255, 0.4) !important;
    background: linear-gradient(135deg, #0069d9 0%, #004494 100%) !important;
}

input[type="submit"]:active:not(:disabled) {
    transform: translateY(1px) !important;
}

input[type="submit"]:disabled {
    background: #ccc !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

/* ANIMASI */
.modal_survey.show {
    display: flex !important;
    opacity: 1;
}

.modal_survey.show .modal-content_survey {
    transform: scale(1);
}

/* RESPONSIVE UTAMA UNTUK HP */
@media (max-width: 768px) {
    #form-survey {
        padding: 20px !important;
    }

    .modal-content_survey {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
    }

    .macos-header {
        border-radius: 0 !important;
    }

    .survey-title {
        font-size: 22px !important;
    }

    input[type="submit"] {
        max-width: 100% !important;
        border-radius: 12px !important;
    }
}