/* Ganti 'Inter' jika Anda ingin font lain atau menggunakan default browser */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
    overflow-x: hidden;
    padding: 20px;
    box-sizing: border-box;
}

.launcher-container {
    text-align: center;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 95%;
    width: 1200px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-logo {
    max-width: 100px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

h1 {
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.25rem !important; /* Ukuran font sedikit disesuaikan */
    font-weight: 700 !important;
    line-height: 1.3;
}

.launcher-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
}

.launcher-links a {
    display: block;
    padding: 12px 22px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 130px;
    text-align: center;
    position: relative;
    animation-name: subtleJump;
    animation-duration: 1.8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    transform-origin: bottom;
}

.launcher-links a:hover {
    background-color: #0056b3;
    animation-play-state: paused;
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.25);
}

@keyframes subtleJump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.launcher-links a:nth-child(1) { animation-delay: 0s; }
.launcher-links a:nth-child(2) { animation-delay: 0.08s; }
.launcher-links a:nth-child(3) { animation-delay: 0.16s; }
.launcher-links a:nth-child(4) { animation-delay: 0.24s; }
.launcher-links a:nth-child(5) { animation-delay: 0.32s; }
.launcher-links a:nth-child(6) { animation-delay: 0.4s; }
.launcher-links a:nth-child(7) { animation-delay: 0.48s; }
.launcher-links a:nth-child(8) { animation-delay: 0.56s; }
.launcher-links a:nth-child(9) { animation-delay: 0.64s; }
.launcher-links a:nth-child(10) { animation-delay: 0.72s; }
.launcher-links a:nth-child(11) { animation-delay: 0.8s; }
.launcher-links a:nth-child(12) { animation-delay: 0.88s; }
.launcher-links a:nth-child(13) { animation-delay: 0.96s; }
.launcher-links a:nth-child(14) { animation-delay: 1.04s; }
.launcher-links a:nth-child(15) { animation-delay: 1.12s; }
.launcher-links a:nth-child(16) { animation-delay: 1.2s; }
.launcher-links a:nth-child(17) { animation-delay: 1.28s; }


.info-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 95%;
    width: 700px;
    margin-top: 25px;
    text-align: left;
}

.info-container h2 {
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 1.75rem;
}

.current-time {
    font-size: 1.25em;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 12px;
    text-align: center;
}

.calendar-hijri {
    font-size: 1.1em;
    color: #4b5563;
    margin-bottom: 25px;
    text-align: center;
}

.info-details {
    display: flex;
    flex-direction: row;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.prayer-times, .islamic-holidays {
    flex: 1;
    min-width: 280px;
}

.prayer-times h3, .islamic-holidays h3 {
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.prayer-times table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.prayer-times th, .prayer-times td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: center;
    font-size: 0.95em;
}

.prayer-times th {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 600;
}

.prayer-times tr:nth-child(even) td {
    background-color: #f9fafb;
}

.islamic-holidays ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    padding: 15px;
    border-radius: 8px;
}

.islamic-holidays li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
    color: #4b5563;
    font-size: 0.95em;
}
.islamic-holidays li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

@media (max-width: 1300px) {
    .launcher-container, .info-container {
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    .launcher-links a {
        padding: 10px 18px;
        font-size: 0.95rem;
        min-width: unset;
        flex-grow: 1;
    }

    .launcher-links {
        gap: 10px;
    }

    .prayer-times th, .prayer-times td {
        padding: 10px;
        font-size: 0.9em;
    }

    h1 {
        font-size: 1.8rem !important;
        margin-bottom: 20px;
    }

    .info-container h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .site-logo {
        max-width: 80px;
        margin-bottom: 15px;
    }
    .current-time {
        font-size: 1.15em;
    }
    .islamic-holidays h3, .prayer-times h3 {
        font-size: 1.15em;
    }

    .info-details {
        flex-direction: column;
        gap: 20px;
    }

    .islamic-holidays ul {
        max-height: 200px;
    }
    .islamic-holidays li {
        font-size: 0.9em;
    }
}

/* Gaya untuk Modal Chat */
.chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chat-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.chat-modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 550px;
    height: 85%;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-modal-header {
    background-color: #007bff;
    color: white;
    padding: 18px 22px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.chat-close-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.9em;
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.2s ease;
    line-height: 1;
}

.chat-close-button:hover {
    color: #e0e0e0;
}

#chat-area {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}
.message-bubble p:not(:last-child) {
    margin-bottom: 0.5em;
}
.message-bubble img.embedded-image { /* Spesifik untuk gambar dalam pesan */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    object-fit: contain;
}


.user-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
    flex-direction: row-reverse;
}

.wak-kaji-message {
    background-color: #e9ecef;
    color: #343a40;
    margin-right: auto;
    border-bottom-left-radius: 6px;
}
.wak-kaji-message .loader {
    margin: 5px auto;
}


.chat-icon-img {
    width: 30px;
    height: 30px;
    border-radius: 50%; /* Tambahkan ini untuk membuat lingkaran */
    object-fit: cover;
    flex-shrink: 0;
}
.wak-kaji-icon-img {
    margin-right: 10px;
}
.user-icon-img {
    margin-left: 10px;
    border-radius: 50%; /* Pastikan ini ada untuk ikon pengguna */
}

.chat-input-area {
    padding: 15px;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-input {
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#user-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#send-button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#send-button:hover {
    background-color: #0056b3;
}
#send-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
#send-button .loader {
    width: 20px; height: 20px;
    border-left-color: #fff;
}


.loader {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.arabic-text {
    font-weight: bold;
    font-size: 1.1em;
    direction: rtl;
    text-align: right;
    /* font-family: 'Amiri', 'Scheherazade', serif; */
}

#floating-chat-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 999;
}

#floating-chat-button:hover {
    background-color: #218838;
    transform: translateY(-2px) scale(1.05);
}
#floating-chat-button svg {
    fill: white;
    width: 28px;
    height: 28px;
}
