:root {
    --primary-color: #E63946;
    --dark-color: #1D3557;
    --light-color: #F1FAEE;
    --secondary-color: #457B9D;
    --text-color: #333;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Warna Status */
    --status-rendah: #E63946;
    --status-cukup: #fca311;
    --status-bagus: #2a9d8f;
    --status-luar-biasa: #457B9D;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-color);
    display: flex;
    flex-direction: column; /* Mengubah arah flex agar footer bisa di bawah */
    justify-content: flex-start; /* Mulai dari atas */
    align-items: center; /* Pusatkan container & footer */
    min-height: 100vh;
    padding: 30px 20px;
    box-sizing: border-box;
}

.analyzer-container {
    background-color: #fff;
    max-width: 650px;
    width: 100%;
    padding: 30px 35px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-top: 5px solid var(--primary-color);
    position: relative; 
    margin-bottom: 30px; /* Jarak ke footer */
}

/* GAYA LOGO */
.site-logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
    max-height: 60px;
    width: auto;
}

h1 {
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 10px;
}

.sub-header {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 5px;
}

.form-group.full-width {
    grid-column: 1 / -1;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    font-weight: 500;
}

.btn-calculate {
    background-color: var(--primary-color);
    color: #fff;
    padding: 14px 24px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    width: 100%;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    margin-top: 20px;
}

.btn-calculate:hover:not(:disabled) { /* Efek hover hanya jika tidak disabled */
    background-color: #d62839;
}

.btn-calculate:disabled { /* Style saat tombol nonaktif */
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Area Hasil --- */
#result-area {
    margin-top: 30px;
    padding: 25px;
    border-radius: 8px;
    background-color: var(--dark-color);
    color: #fff;
    display: none; 
}

#result-area h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 15px;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-item {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.result-item h3 {
    color: #fff;
    opacity: 0.8;
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.result-item p.metric {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.result-item p.metric small {
    font-size: 1.2rem;
    opacity: 0.9;
}

.result-item.full-width {
    grid-column: 1 / -1;
    background-color: var(--dark-color);
    border: 2px solid var(--primary-color);
}

.status-box {
    font-size: 0.85rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    color: #fff;
}
.status-rendah { background-color: var(--status-rendah); }
.status-cukup { background-color: var(--status-cukup); }
.status-bagus { background-color: var(--status-bagus); }
.status-luar-biasa { background-color: var(--status-luar-biasa); }

p.advice {
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.85;
    margin-top: 12px;
    margin-bottom: 0;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
}

/* --- GAYA GERBANG FOLLOW --- */
.lock-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; padding: 20px; box-sizing: border-box;
}
.lock-box { background: #fff; padding: 30px 35px; border-radius: 8px; text-align: center; max-width: 450px; width: 100%; }
.lock-box h2 { color: var(--dark-color); margin-top: 0; margin-bottom: 10px; }
.lock-box p { color: #333; line-height: 1.6; margin-bottom: 25px; }
.lock-box .btn-calculate { width: 100%; }
.small-note { font-size: 0.85rem; color: #777; margin-top: 15px; margin-bottom: 0; }

/* --- GAYA INTERACTION BAR (Feedback & Bahasa) - DI DALAM CONTAINER --- */
.interaction-bar {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; /* Pusatkan item */
    align-items: center;
    gap: 15px 30px; /* Jarak vertikal & horizontal */
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.feedback-text {
    margin: 0;
    color: #555;
    text-align: center; 
}

.language-switcher {
    display: flex;
    align-items: center;
    color: #aaa; 
}

.lang-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: bold;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 0.9rem;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
}

.lang-btn:hover {
    background-color: var(--light-color);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- [BARU] GAYA FOOTER APLIKASI (DI LUAR CONTAINER) --- */
.app-footer {
    width: 100%; 
    max-width: 650px; /* Lebar sama dengan container utama */
    margin-top: 0; /* Otomatis di bawah container */
    padding: 25px 20px; /* Padding lebih besar */
    border-top: 1px solid #ddd; 
    text-align: center;
    font-size: 0.9rem; /* Sedikit lebih besar */
    color: #666; /* Sedikit lebih gelap */
    background-color: #fff; 
    border-radius: 0 0 8px 8px; 
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); 
    box-sizing: border-box;
}

.beta-notice {
    font-style: italic;
    margin-bottom: 15px; /* Jarak ke credit */
    margin-top: 0; 
}

.credit {
    margin-top: 0;
    margin-bottom: 20px; /* Jarak ke social links */
    line-height: 1.6; 
}

.credit a {
    color: var(--dark-color);
    font-weight: 600;
    text-decoration: none;
}
.credit a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex; 
    justify-content: center;
    align-items: center;
    gap: 20px; /* Jarak antar ikon lebih besar */
}

.social-links span {
    margin-right: 5px; 
    font-weight: 500;
    color: #555; 
}

.social-links a {
    color: var(--secondary-color);
    font-size: 1.7rem; /* Ikon lebih besar */
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease; 
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.15); /* Efek hover lebih jelas */
}
/* ====================================
   RESPONSIVE DESIGN (Untuk Layar Kecil)
   ==================================== */

/* Aturan ini berlaku jika lebar layar 600px atau kurang */
@media (max-width: 600px) {

    body {
        padding: 20px 15px; /* Kurangi padding samping di body */
    }

    .analyzer-container {
        padding: 25px 20px; /* Kurangi padding di container utama */
    }

    /* Ubah grid form menjadi 1 kolom */
    .form-grid {
        grid-template-columns: 1fr; /* Hanya 1 kolom */
        gap: 15px; /* Kurangi jarak antar field */
    }

    /* Ubah grid hasil menjadi 1 kolom */
    .result-grid {
        grid-template-columns: 1fr; /* Hanya 1 kolom */
        gap: 15px; /* Kurangi jarak antar hasil */
    }

    h1 {
        font-size: 1.8rem; /* Kecilkan judul utama sedikit */
    }

    .interaction-bar {
        flex-direction: column; /* Tumpuk feedback & bahasa ke bawah */
        gap: 10px; /* Jarak lebih kecil */
    }

    .social-links {
        gap: 15px; /* Jarak ikon sedikit lebih kecil */
    }

    .social-links a {
        font-size: 1.6rem; /* Kecilkan ikon sedikit */
    }
}