/* Pastikan ini ada di style.css */
/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f0f2f5; /* Light mode default background */
    color: #333; /* Light mode default text color */
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}
body.dark-mode .app-container {
    background-color: #2b2b2b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
body.dark-mode .header {
    background-color: #3a3a3a;
    border-bottom: 1px solid #444;
}
body.dark-mode .header h1 {
    color: #f0f0f0;
}
body.dark-mode .theme-toggle-button {
    background-color: #555;
    color: #fff;
}
body.dark-mode .doa-content {
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay for readability */
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
body.dark-mode .doa-judul {
    color: #e0e0e0;
}
body.dark-mode .doa-arab {
    color: #e6e6e6;
}
body.dark-mode .doa-latin {
    color: #c0c0c0;
}
body.dark-mode .doa-terjemahan {
    color: #a0a0a0;
}
body.dark-mode .nav-button {
    background-color: rgba(60, 60, 60, 0.8);
    color: #f0f0f0;
}
body.dark-mode .bottom-nav {
    background-color: #3a3a3a;
    border-top: 1px solid #444;
}
body.dark-mode .bottom-nav .nav-item {
    color: #aaa;
}
body.dark-mode .bottom-nav .nav-item.active {
    color: #66ccff; /* Blue highlight for dark mode active */
}

/* App Container */
.app-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    max-width: 600px; /* Lebar maksimum untuk tampilan mobile */
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative; /* Untuk positioning nav buttons */
    padding-bottom: 60px; /* Ruang untuk sticky nav */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #007bff; /* Primary blue for header */
    color: white;
    border-bottom: 1px solid #0056b3;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header h1 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

/* Theme Toggle Button */
.theme-toggle-button {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: white;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}
.theme-toggle-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
body.dark-mode .theme-toggle-button .icon {
    content: "🌙"; /* Moon icon for dark mode */
}


/* Doa Carousel */
.doa-carousel {
    position: relative;
    overflow: hidden; /* Hide overflow for sliding effect */
    flex-grow: 1; /* Make it take available space */
    /* display: flex; REMOVED from here */
    height: 100%;
    min-height: calc(100vh - 120px); /* Adjust based on header and footer height */
}

.doa-item {
    position: absolute; /* Tetap absolute untuk tumpukan */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white; /* Default text color for overlay */
    padding: 20px;

    /* Awalnya semua item tersembunyi dan di luar layar, siap untuk masuk */
    opacity: 0;
    transform: translateX(100%); /* Default, akan diubah oleh JS */
    pointer-events: none; /* Agar tidak bisa diklik saat tidak aktif */

    /* Transisi untuk properti yang akan dianimasikan */
    /* Kita akan mengatur transition ini secara dinamis di JS */
    transition: transform 0.5s ease-in-out, opacity 0.4s ease-out;

    z-index: 1; /* Default z-index */
}

.doa-item.active {
    opacity: 1;
    transform: translateX(0); /* Item aktif berada di tengah */
    pointer-events: auto; /* Bisa diklik saat aktif */
    z-index: 3; /* Item aktif selalu di paling depan */
}

/* Kelas untuk item yang keluar */
.doa-item.exit {
    /* Kelas ini akan diterapkan ke item yang keluar */
    /* Transform akan diatur oleh JS */
    opacity: 0;
    z-index: 2; /* Di atas item tidak aktif, di bawah item aktif */
    transition: transform 0.5s ease-in-out, opacity 0.4s ease-in;
}

.doa-content {
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for readability */
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    backdrop-filter: blur(5px); /* Optional: blur background behind content */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.doa-judul {
    font-size: 1.8em; /* Ukuran font besar */
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.doa-arab {
    font-family: 'Amiri Quran', 'Traditional Arabic', serif; /* Contoh font Arab */
    font-size: 2.2em;
    margin-bottom: 15px;
    line-height: 1.8;
    direction: rtl; /* Untuk teks Arab */
    text-align: center;
    color: #ffe0b3; /* Light yellow for arab text */
}


.doa-latin {
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.6;
    color: #e0e0e0;
}

.doa-terjemahan {
    font-size: 1em;
    line-height: 1.6;
    color: #c0c0c0;
}

.no-doa-message {
    text-align: center;
    padding: 50px 20px;
    font-size: 1.2em;
    color: #888;
}

/* Navigation Buttons (for carousel) */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.5em;
    cursor: pointer;
    border-radius: 5px;
    z-index: 50;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}
.nav-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
}
.prev-button {
    left: 10px;
}
.next-button {
    right: 10px;
}

/* Sticky Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f8f8; /* Light gray for light mode */
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1001; /* Higher than other elements */
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #777;
    font-size: 0.8em;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.bottom-nav .nav-item:hover {
    background-color: #e9e9e9;
}

.bottom-nav .nav-item.active {
    color: #007bff; /* Primary blue for active item */
    font-weight: bold;
}

.bottom-nav .nav-item .icon {
    font-size: 1.5em;
    margin-bottom: 3px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-container {
        border-radius: 0;
        box-shadow: none;
        margin: 0;
    }
    .header {
        border-radius: 0;
    }
    .bottom-nav {
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    }
    .doa-item {
        padding: 15px;
    }
    .doa-content {
        padding: 15px;
    }
    .doa-judul {
        font-size: 1.6em;
    }
    .doa-arab {
        font-size: 2em;
    }
    .nav-button {
        padding: 8px 12px;
        font-size: 1.2em;
    }
    .bottom-nav .nav-item {
        font-size: 0.75em;
    }
}



 .search-container {
        text-align: center;
        margin: 20px auto;
        max-width: 600px;
    }

    .search-container input[type="text"] {
        width: calc(100% - 100px); /* Sesuaikan lebar input */
        padding: 10px 15px;
        border: 1px solid #ccc;
        border-radius: 25px;
        font-size: 1em;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }

    .search-container input[type="text"]:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    }

    .search-container button {
        padding: 10px 20px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 25px;
        cursor: pointer;
        font-size: 1em;
        margin-left: 10px;
        transition: background-color 0.3s ease;
    }

    .search-container button:hover {
        background-color: #0056b3;
    }

    .no-doa-message {
        text-align: center;
        color: #666;
        margin-top: 50px;
        font-size: 1.2em;
    }

/* Tambahkan ini untuk menyembunyikan form secara default */
.search-form-container {
    display: none; /* Default tersembunyi */
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
}

/* Jika form harus terlihat secara default, hapus atau ubah display menjadi block/flex */
.search-form-container.active {
    display: block; /* Tampilkan ketika kelas 'active' ditambahkan */
}

.search-form-container form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Jarak antar elemen form */
}

.search-form-container input[type="text"] {
    flex-grow: 1; /* Input akan mengambil ruang yang tersedia */
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-form-container input[type="text"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.search-form-container button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.search-form-container button:hover {
    background-color: #0056b3;
}

/* Styling untuk tombol Clear */
.search-form-container button#clearSearch {
    background-color: #6c757d; /* Warna abu-abu */
}

.search-form-container button#clearSearch:hover {
    background-color: #5a6268;
}
