/* --- Global & General Resets --- */
body, h1, h2, h3, p, label, input, button, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Google Fonts (untuk Index.php dan Link_unduh.php) --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');


/* ====================================================================================================
   STYLES FOR INDEX.PHP (LOGIN PAGE)
   ==================================================================================================== */

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 450px; /* Lebar maksimum formulir */
    padding: 20px; /* Padding untuk mencegah konten menempel di tepi layar kecil */
}

/* Body khusus untuk halaman login (index.php) */
body.login-page {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(to right top, #6a11cb, #2575fc); /* Gradien latar belakang */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Memastikan halaman mengambil tinggi penuh viewport */
    overflow: hidden; /* Mencegah scroll saat ada efek */
}

.login-wrapper {
    background: rgba(255, 255, 255, 0.95); /* Latar belakang semi-transparan putih */
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Bayangan lebih kuat */
    padding: 40px;
    text-align: center;
    width: 100%;
    animation: fadeIn 1s ease-out; /* Animasi fade-in saat halaman dimuat */
    position: relative;
    z-index: 1; /* Pastikan konten di atas dekorasi */
    overflow: hidden; /* Untuk memastikan dekorasi tidak keluar */
}

/* Dekorasi visual (opsional, bisa dihapus jika tidak suka) */
.login-wrapper::before,
.login-wrapper::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(106, 17, 203, 0.1); /* Warna gradien ungu transparan */
    border-radius: 50%;
    filter: blur(40px); /* Efek blur */
    z-index: 0; /* Di bawah konten utama */
}

.login-wrapper::before {
    top: -50px;
    left: -50px;
}

.login-wrapper::after {
    bottom: -50px;
    right: -50px;
    background: rgba(37, 117, 252, 0.1); /* Warna gradien biru transparan */
}

.login-header {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    font-size: 1em;
    color: #666;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Jarak antar input group */
    position: relative;
    z-index: 1;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #555;
    font-weight: 600;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus {
    border-color: #2575fc; /* Warna border saat fokus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.2); /* Bayangan fokus */
}

.login-button {
    background: linear-gradient(to right, #6a11cb, #2575fc); /* Gradien pada tombol */
    color: #fff;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin-top: 20px; /* Jarak dari input terakhir */
}

.login-button:hover {
    transform: translateY(-3px); /* Efek naik saat hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    background: linear-gradient(to right, #2575fc, #6a11cb); /* Balik gradien saat hover */
}

.login-button:active {
    transform: translateY(0); /* Kembali ke posisi semula saat diklik */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.login-footer {
    margin-top: 30px;
    font-size: 0.85em;
    color: #999;
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====================================================================================================
   STYLES FOR LINK_UNDUH.PHP (DOWNLOAD PAGE)
   ==================================================================================================== */

/* Body khusus untuk halaman unduh */
body.unduh-page {
    font-family: 'Poppins', Arial, sans-serif; /* Menggunakan Google Font Poppins */
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f4f7f6; /* Warna latar belakang lembut */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Memastikan konten di tengah vertikal */
    padding: 20px;
}

.download-container { /* Mengganti nama kelas dari .container agar tidak bentrok dengan .container di login */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Bayangan yang lebih lembut */
    padding: 40px;
    width: 100%;
    max-width: 700px; /* Lebar maksimum untuk konten utama */
    box-sizing: border-box;
    position: relative;
    overflow: hidden; /* Untuk efek garis bawah */
}

/* Garis dekoratif di bagian atas download-container */
.download-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #4CAF50, #2196F3); /* Gradien warna */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Header Section */
.header-section {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 20px; /* Diperkecil */
    padding-bottom: 15px; /* Diperkecil */
    border-bottom: 1px solid #eee;
}

.header-section img {
    width: 70px; /* UKURAN LOGO DIPERKECIL */
    height: auto;
    margin-right: 15px; /* Jarak antara logo dan teks diperkecil */
    border-radius: 8px;
}

.header-text {
    flex-grow: 1;
    text-align: left;
}

.header-text strong {
    font-size: 1em; /* UKURAN FONT DIPERKECIL */
    color: #555;
}

.header-text .main-title {
    font-size: 1.5em; /* UKURAN FONT DIPERKECIL */
    color: #2c3e50;
    margin-top: 4px; /* Margin diperkecil */
    margin-bottom: 4px; /* Margin diperkecil */
}

.header-text .address {
    font-size: 0.8em; /* UKURAN FONT DIPERKECIL */
    color: #777;
}

.header-text .contact {
    font-size: 0.75em; /* UKURAN FONT DIPERKECIL */
    color: #888;
    margin-top: 4px; /* Margin diperkecil */
}

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

.content-section {
    margin-top: 30px;
}

.content-section h2 {
    text-align: center;
    font-size: 2em;
    color: #34495e;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.content-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #2196F3;
    border-radius: 5px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Kolom pertama untuk label, kedua untuk nilai */
    gap: 20px;
    margin-top: 20px;
}

.info-row {
    display: contents; /* Transparan di grid desktop */
}

.info-row .label {
    font-weight: 600;
    color: #555;
    text-align: left;
}

.info-row .value {
    color: #333;
}

.info-row .value a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.info-row .value a:hover {
    color: #0056b3;
    transform: translateY(-2px);
}

.notes-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px dashed #eee;
    font-size: 0.9em;
    color: #666;
}

.notes-section p {
    margin-bottom: 10px;
}

.notes-section a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.notes-section a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.error-message {
    text-align: center;
    color: #d9534f;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 8px;
    padding: 20px;
    margin-top: 50px;
    font-size: 1.2em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}


/* ====================================================================================================
   RESPONSIVE STYLES (untuk kedua halaman)
   ==================================================================================================== */

@media (max-width: 600px) {
    /* Styles for index.php (login page) */
    .login-wrapper {
        padding: 30px 20px;
    }
    .login-header h1 {
        font-size: 1.8em;
    }
    .login-button {
        padding: 12px 20px;
        font-size: 1em;
    }

    /* Styles for link_unduh.php (download page) */
    .header-section {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px; /* Diperkecil untuk mobile */
        padding-bottom: 10px; /* Diperkecil untuk mobile */
    }
    .header-section img {
        width: 60px; /* UKURAN LOGO DIPERKECIL LAGI UNTUK MOBILE */
        margin-right: 0;
        margin-bottom: 10px; /* Diperkecil untuk mobile */
    }
    .header-text {
        text-align: center;
    }
    .header-text strong {
        font-size: 0.9em; /* UKURAN FONT DIPERKECIL LAGI UNTUK MOBILE */
    }
    .header-text .main-title {
        font-size: 1.3em; /* UKURAN FONT DIPERKECIL LAGI UNTUK MOBILE */
        margin-top: 3px;
        margin-bottom: 3px;
    }
    .header-text .address {
        font-size: 0.75em; /* UKURAN FONT DIPERKECIL LAGI UNTUK MOBILE */
    }
    .header-text .contact {
        font-size: 0.7em; /* UKURAN FONT DIPERKECIL LAGI UNTUK MOBILE */
        margin-top: 3px;
    }


    .download-container {
        padding: 30px 20px;
    }

    .info-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .info-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
    }

    .info-row .label {
        flex: 0 0 80px;
        font-weight: 700;
        text-align: left;
    }

    .info-row .value {
        flex: 1 1 auto;
        text-align: left;
    }

    /* Untuk pesan error/peringatan (misal jika belum login) */
    .error-message {
        font-size: 1em;
        padding: 15px;
    }
}