:root {
    --primary-color: #0078d4;
    --background-color: #f4f4f9;
    --text-color: #333;
    --container-bg: #ffffff;
    --border-color: #ddd;
    --error-color: #d9534f;
    --success-color: #5cb85c;
    --loading-color: #555;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

header p {
    color: #666;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* --- BARU: Wrapper untuk API Key dan Toggle --- */
.api-key-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.api-key-wrapper input[type="password"],
.api-key-wrapper input[type="text"] {
    flex-grow: 1; /* Input mengambil sisa ruang */
}
.show-api-key {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap; /* Mencegah teks "Tampilkan" pindah baris */
    font-size: 0.9rem;
}


input[type="password"],
input[type="text"],
textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
}

textarea {
    resize: vertical;
}

textarea[readonly] {
    background-color: #f9f9f9;
    color: #666;
    cursor: not-allowed;
}


button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

button:hover:not(:disabled) {
    background-color: #005a9e;
}

button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}
/* BARU: Style untuk link mode manual */
.manual-entry-link {
    text-align: center;
    font-size: 0.9rem;
    margin-top: -5px;
    margin-bottom: 15px;
    color: #666;
}
.manual-entry-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.manual-entry-link a:hover {
    text-decoration: underline;
}

/* --- BARU: Style untuk pilihan mode thread --- */
.mode-selection {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mode-selection .mode-label {
    font-weight: 500;
    color: #555;
}
.mode-selection .radio-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mode-selection label {
    font-size: 0.95rem;
    cursor: pointer;
}


/* --- Indikator Proses Real-time --- */
.progress-container {
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
    color: var(--primary-color);
    min-height: 20px; /* Memberi ruang agar layout tidak loncat */
    transition: color 0.3s ease;
}


.results-container {
    margin-top: 20px;
    text-align: left;
}

.result-list {
    list-style-type: none; /* Menghilangkan bullet point default */
    padding-left: 0;
    margin: 0;
    max-height: 300px; /* Memberi batas tinggi agar tidak terlalu panjang */
    overflow-y: auto; /* Tambahkan scroll jika konten melebihi batas */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.result-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    word-break: break-all;
    border-radius: 6px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
}
.result-list li.success { 
    color: var(--success-color); 
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.result-list li.error { 
    color: var(--error-color); 
    background-color: #f2dede;
    border-color: #ebccd1;
}

.loading, .error, .info {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    text-align: center;
}

.loading { color: var(--loading-color); background-color: #f0f0f0; }
.error { color: #a94442; background-color: #f2dede; border: 1px solid var(--error-color); }
.info { color: #31708f; background-color: #d9edf7; border: 1px solid #bce8f1; }


#sitemap-section {
    margin-top: 10px;
}

#sitemap-section hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 30px 0;
}

.hidden {
    display: none;
}

footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}
