/* style.css */

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #555;
}

#login-container, #editor-container {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 20px;
}

input[type="email"], input[type="password"], textarea {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

.form-group {
    margin-bottom: 15px;
}

#status {
    margin-top: 15px;
    font-weight: bold;
    color: green;
}

/* Styles for the View Page */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prompt-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.prompt-card:hover {
    transform: translateY(-5px);
}

.prompt-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.prompt-text {
    padding: 15px;
    font-size: 14px;
    line-height: 1.5;
}

#loading-status {
    text-align: center;
    color: #666;
}
/* Modal (Pop-up) Styles */
.modal {
    display: none; /* Sembunyikan secara lalai */
    position: fixed; /* Kekal di tempat yang sama */
    z-index: 1; /* Letakkan di atas semua elemen lain */
    padding-top: 50px; /* Jarak dari atas */
    left: 0;
    top: 0;
    width: 100%; /* Lebar penuh */
    height: 100%; /* Tinggi penuh */
    overflow: auto; /* Membolehkan scroll jika diperlukan */
    background-color: rgb(0,0,0); /* Warna latar belakang hitam */
    background-color: rgba(0,0,0,0.9); /* Warna latar belakang hitam dengan sedikit ketelusan */
}

/* Kandungan Modal (Imej) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
}

/* Animasi untuk Modal */
@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}
.modal-content {
    animation-name: zoom;
    animation-duration: 0.6s;
}

/* Butang Tutup (X) */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}
.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Media Query untuk skrin kecil */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}
/* Copy button styles */
.copy-btn {
    display: block; /* Penting untuk margin: auto berfungsi */
    width: 80%; /* Contoh: menetapkan lebar yang lebih kecil */
    margin: 15px auto; /* <-- Bahagian ini meletakkan butang di tengah */
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #0056b3;
}
/* Styling for the click info text */
.click-info {
    display: block; /* Ensures the text is on its own line */
    text-align: center;
    font-size: 10px;
    color: #888;
    margin-top: 5px;
}
/* Gaya untuk Butang Filter Kategori */
.filter-buttons {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background-color: #e9e9e9;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-size: 14px;
}

.filter-btn:hover {
    background-color: #ddd;
}

.filter-btn.active {
    background-color: #007BFF;
    color: white;
    border-color: #007BFF;
}
/* Styling for the image name text */
.image-name {
    text-align: center;
    font-size: 10px;
    color: #999;
    word-wrap: break-word; /* Prevents long names from overflowing */
    margin: 5px 0;
}
/* Tambahan: pastikan grid container mempunyai ruang yang mencukupi */
.grid-container {
    margin-top: 30px;
}
/* Gaya untuk deskripsi header */
.description {
    text-align: center;
    color: #666;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* Gaya untuk footer yang fixed */
footer {
    text-align: center;
    padding: 5px;
    font-size: 12px;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
}
/* Gaya untuk butang "Scroll to Top" */
#scroll-to-top {
    display: block;
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: #007BFF;
    color: white;
    font-size: 24px;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}
/* Gaya untuk prompt premium yang 'terkunci' */
.prompt-card.premium-locked {
    position: relative;
    overflow: hidden;
}

.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
}

.premium-overlay span {
    font-size: 50px;
}

.premium-overlay p {
    font-size: 18px;
    margin-top: 10px;
    font-weight: bold;
    color: white;
    filter: none;
}

.copy-btn.disabled {
    background-color: #888;
    cursor: not-allowed;
    pointer-events: none;
}
/* Gaya untuk Header yang Lebih Kemas */
.header-text-container {
    text-align: center;
    padding: 0 15px; /* Padding mendatar untuk peranti kecil */
    margin-bottom: 20px;
}

.header-text-container h1 {
    font-size: 2.5rem; /* Saiz fon yang lebih besar dan responsif */
    margin: 5px 0; /* Jarak antara tajuk yang lebih baik */
    line-height: 1.1;
    color: #333;
}

.header-text-container .description {
    font-size: 1rem; /* Saiz fon yang lebih baik */
    line-height: 1.5;
    color: #555;
    margin-top: 15px;
}
/* Gaya untuk bahagian CTA */
.cta-section {
    text-align: center;
    margin: 10px 0; /* Jarak yang lebih seimbang */
}

.cta-section p {
    margin-bottom: 10px;
}

.cta-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px; /* Memberi jarak antara butang */
    transition: background-color 0.3s;
}

.cta-btn:hover {
    background-color: #0056b3;
}
/* Gaya untuk countdown timer dan butang langgan semula */
#subscription-countdown {
    font-size: 14px;
    font-weight: bold;
    color: #0056b3;
    margin-top: 5px;
}

#resubscribe-btn {
    margin-top: 10px;
}
/* Gaya untuk nombor prompt */
.prompt-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 5;
}