body {
    /* Ini adalah gaya dasar body, tanpa gambar latar belakang langsung */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e9ecef; /* Warna latar belakang dasar jika gambar tidak dimuat */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    line-height: 1.6;
    position: relative; /* Penting! Memungkinkan penempatan pseudo-element */
    z-index: 1; /* Penting! Memastikan konten body di atas pseudo-element */
    overflow-x: hidden; /* Mencegah scroll horizontal jika gambar terlalu besar */
}

/* Pseudo-element untuk gambar latar belakang */
body::before {
    content: ''; /* Wajib untuk pseudo-element */
    position: absolute; /* Posisikan relatif terhadap body */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/bg.jpeg'); /* Ganti dengan path gambar Anda */
    background-size: cover; /* Pastikan gambar menutupi seluruh area */
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Gambar tetap saat discroll */

    /* Ini yang membuat gambar menjadi bayangan */
    opacity: 0.2; /* Sesuaikan nilai ini (0.0 = transparan, 1.0 = penuh) */

    z-index: -1; /* PENTING! Letakkan di belakang konten body */
}

/* Pastikan container konten utama memiliki latar belakang solid */
.container {
    background-color: #ffffff; /* Ini akan menutupi pseudo-element di bawahnya */
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 550px;
    box-sizing: border-box;
    position: relative; /* Penting agar container berada di atas pseudo-element */
    z-index: 2; /* Lebih tinggi dari z-index body::before */
}

/* ... CSS lainnya ... */
.container {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 550px;
    box-sizing: border-box;
}

h1 {
    color: #0056b3;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 1.05em;
}

input[type="text"] {
    width: calc(100% - 22px); /* Mengatur lebar input agar pas */
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

button[type="submit"] {
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 600;
}

button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.result-section {
    margin-top: 30px;
    padding: 25px;
    border-radius: 10px;
    color: white; /* Default text color for status blocks */
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Status Colors */
.status-lulus {
    background-color: #800000; /* Merah Maroon */
}

.status-tidak-lulus {
    background-color: #dc3545; /* Merah */
}

.status-cadangan {
    background-color: #ffc107; /* Kuning/Oranye */
    color: #333; /* Warna teks gelap agar terbaca di background kuning */
}

.status-tidak-ditemukan {
    background-color: #6c757d; /* Abu-abu */
}

.result-section h2 {
    margin-top: 0;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.result-section p {
    margin: 8px 0;
}

.result-section strong {
    font-weight: bold;
}

.error-message {
    color: #dc3545;
    margin-top: 20px;
    font-weight: bold;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
}

.success-message {
    color: #28a745;
    margin-top: 20px;
    font-weight: bold;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
}

/* Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.8em;
    }
    button[type="submit"] {
        width: 100%;
        margin-top: 10px;
    }
    input[type="text"] {
        width: 100%;
        margin-right: 0;
    }
}

.logo-container {
    text-align: center; /* Untuk membuat logo berada di tengah container */
    margin-bottom: 20px; /* Memberikan jarak antara logo dan judul */
}

.logo-container img {
    max-width: 200px; /* Mengatur lebar maksimum logo */
    height: auto; /* Memastikan aspek rasio logo terjaga */
    display: block; /* Menghilangkan margin bawah default gambar inline */
    margin: 0 auto; /* Membuat logo berada di tengah (alternatif text-align: center) */
}

/* Anda bisa menambahkan media query jika ingin ukuran logo berbeda di perangkat mobile */
@media (max-width: 600px) {
    .logo-container img {
        max-width: 150px;
    }
    .logo-container {
        margin-bottom: 15px;
    }
}

/* Styling untuk Card Hasil */
.result-section {
    position: relative; /* Penting untuk posisi tombol close */
    margin-top: 30px;
    padding: 25px;
    border-radius: 10px;
    color: white; /* Default text color for status blocks */
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    /* Untuk animasi fade out */
    opacity: 1;
    transition: opacity 0.5s ease-out, transform 0.3s ease-out;
}

/* Styling Tombol Close */
.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white; /* Warna teks 'X' */
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    line-height: 1; /* Menghilangkan spasi ekstra di sekitar 'X' */
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sesuaikan warna tombol close agar terlihat di background kuning */
.status-cadangan .close-button {
    color: #333;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Sedikit efek hover transparan */
    color: white;
}

.status-cadangan .close-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Gaya untuk card yang tersembunyi */
.result-section.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transform: translateY(-20px); /* Efek slide up saat menghilang */
    transition: opacity 0.5s ease-out, height 0.5s ease-out, padding 0.5s ease-out, margin 0.5s ease-out, transform 0.5s ease-out;
}

/* --- Media Query untuk Layar Lebar Maksimum 1024px (Mencakup 1366px juga karena lebih kecil) --- */
@media (max-width: 1024px) { /* Atau 1200px jika ingin lebih besar lagi */
    .container {
        padding: 25px;
        max-width: 90%; /* Boleh tetap 90% atau coba 70% */
    }

    h1 {
        font-size: 2em; /* Sedikit lebih kecil dari default, tapi lebih besar dari 1.8em */
        margin-bottom: 20px;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .logo-container img {
        max-width: 150px; /* Ukuran yang mungkin pas untuk menengah */
    }

    label {
        font-size: 1em; /* Kembali ke ukuran default atau sedikit lebih kecil */
    }

    input[type="text"] {
        padding: 10px;
        font-size: 1em;
    }

    button[type="submit"] {
        padding: 10px 20px;
        font-size: 1.05em; /* Sedikit lebih kecil */
    }

    .result-section {
        padding: 20px;
        font-size: 1em;
    }

    .result-section h2.welcome-message {
        font-size: 1.8em;
    }

    .result-section p.sub-message {
        font-size: 1.1em;
    }

    .result-table th, .result-table td {
        padding: 8px;
        font-size: 0.95em;
    }

    .close-button {
         font-size: 1.4em;
         top: 8px;
         right: 8px;
    }
}

/* --- Media Query tambahan untuk layar sangat kecil (misal: smartphone) --- */
/* Pertahankan ini jika Anda ingin gaya yang LEBIH kecil untuk mobile */
@media (max-width: 480px) { /* Contoh untuk smartphone portrait */
    .container {
        padding: 15px;
        max-width: 95%;
    }
    h1 {
        font-size: 1.5em;
    }
    .logo-container img {
        max-width: 100px;
    }
    input[type="text"], button[type="submit"] {
        font-size: 0.9em;
        padding: 8px;
    }
    .result-section {
        font-size: 0.9em;
        padding: 15px;
    }
    .result-section h2.welcome-message {
        font-size: 1.4em;
    }
    .result-section p.sub-message {
        font-size: 1em;
    }
    .result-table th, .result-table td {
        font-size: 0.85em;
        padding: 6px;
    }
    .close-button {
        font-size: 1.2em;
    }
}
/* ... CSS lainnya yang sudah ada ... */