body { font-family: 'Google Sans', sans-serif; background-color: #F8F9FA; color: #1C1B1F; }
    .m3-card { background: #FFFFFF; border-radius: 28px; border: 1px solid #DEE1E6; transition: box-shadow 0.3s ease; }
    .m3-input { background: #F1F3F4; border-radius: 16px; border: 2px solid transparent; transition: all 0.2s; }
    .m3-input:focus { background: #FFFFFF; border-color: #1a73e8; outline: none; }
    .m3-btn-primary { background: #1a73e8; color: white; border-radius: 20px; font-weight: 500; transition: all 0.2s; }
    
    /* PERBAIKAN: Kontainer Hasil dengan Scroll Internal */
    .result-scroll-area {
        max-height: 700px; /* Batasi tinggi kotak hasil */
        overflow-y: auto;  /* Aktifkan scroll bar jika konten melebihi tinggi */
        padding: 2.5rem;
        background: #ffffff;
        border-radius: 12px;
    }

    /* Custom Scrollbar ala Material Design 3 */
    .result-display-area::-webkit-scrollbar { width: 8px; }
    .result-display-area::-webkit-scrollbar-track { background: #f1f3f4; border-radius: 10px; }
    .result-display-area::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 10px; }
    .result-display-area::-webkit-scrollbar-thumb:hover { background: #bdc1c6; }

    /* Container hasil yang mendukung teks hingga 4096 token */
    .result-window {
        max-height: 750px; /* Batasi tinggi kotak */
        overflow-y: auto;  /* Munculkan scroll bar internal */
        padding: 2.5rem;
        background: #ffffff;
        border-radius: 24px;
        border: 1px solid #DEE1E6;
        scroll-behavior: smooth;
    }

    /* Scrollbar halus ala Google */
    .result-window::-webkit-scrollbar { width: 8px; }
    .result-window::-webkit-scrollbar-track { background: #f1f3f4; border-radius: 10px; }
    .result-window::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 10px; }
    .result-window::-webkit-scrollbar-thumb:hover { background: #bdc1c6; }

    .bab-title { color: #1a73e8; font-weight: 700; display: block; margin-top: 2.5rem; border-bottom: 2px solid #f1f3f4; padding-bottom: 8px; font-size: 1.4rem; }
    
    /* Animasi Modal M3 */
    #m3ModalContainer { transition: all 0.3s ease; backdrop-filter: blur(4px); }
    .m3-modal-surface { transform: scale(0.9); opacity: 0; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
    #m3ModalContainer.flex .m3-modal-surface { transform: scale(1); opacity: 1; }
    @media print {
        /* Sembunyikan semua elemen default */
        body * { visibility: hidden; }
        
        /* Tampilkan hanya area hasil */
        #resultArea, #resultArea * { visibility: visible; }
        
        #resultArea {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            border: none !important;
        }

        /* Sembunyikan tombol UI (copy, print, input) */
        .print\:hidden, .sticky, button, .m3-card:first-of-type {
            display: none !important;
        }

        /* Tampilkan Header Khusus Print */
        .print-only-header {
            display: block !important;
            visibility: visible !important;
            border-bottom: 2px solid #333;
            margin-bottom: 20px;
            padding-bottom: 10px;
        }

        /* Hilangkan scrollbar dan batasan tinggi */
        .result-scroll-area {
            max-height: none !important;
            overflow: visible !important;
        }
        
        body { background: white !important; }
    }