@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Dosis', sans-serif;
    font-weight: 700;
}

/* Ganti bagian body dengan ini */
body {
    background: linear-gradient(-45deg, #0f4c23 0%, #1e9044 40%, #228b22 80%, #d4b522 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Mengubah susunan menjadi dari atas ke bawah */
    color: #fff;
    overflow-x: hidden; /* Mencegah layar bergeser ke kanan-kiri di HP */
    position: relative;
}

/* Tambahkan class pembungkus ini */
.main-wrapper {
    flex: 1; /* Akan mengisi ruang kosong, mendorong footer ke bawah */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px; /* Memberi jarak aman (margin) di HP */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Ganti .glass-card dengan ini */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 20px; /* Sedikit dikurangi agar pas di HP */
    width: 100%;
    max-width: 400px; /* Kunci rahasianya: akan mengecil di HP, tapi maksimal 400px di Laptop */
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Ganti .logo-container svg dengan kode di bawah ini */
.logo-container img.logo-img {
    width: 80px; /* Ukuran logo */
    height: auto;
    margin-bottom: 10px;
    border-radius: 20px; /* Membuat sudut gambar sedikit membulat */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Memberikan bayangan agar menyatu dengan efek glass */
    transition: transform 0.3s ease;
}

.logo-container img.logo-img:hover {
    transform: scale(1.05); /* Efek membesar sedikit saat disentuh (hover) */
}

h2 { margin-bottom: 20px; font-size: 24px; letter-spacing: 1px; }

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label { display: block; margin-bottom: 5px; font-size: 14px; }

input, select, button {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-family: 'Dosis', sans-serif;
    font-weight: 700;
}

input, select {
    background: rgba(255, 255, 255, 0.8);
    color: #0f4c23;
}

.dropdown-group {
    display: flex;
    gap: 10px;
}

button {
    background: #0f4c23;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    border: 1px solid rgba(255,255,255,0.4);
}

button:hover {
    background: #1e9044;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Envelope Animation */
#result-section { display: none; }

.envelope-wrapper {
    position: relative;
    width: 200px;
    height: 130px;
    background: #d9e5d6;
    margin: 30px auto;
    border-radius: 0 0 10px 10px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
}

.envelope-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    border-top: 65px solid #c3d4be;
    border-right: 100px solid transparent;
    border-left: 100px solid transparent;
    transform-origin: top;
    transition: all 0.5s ease;
    z-index: 3;
}

.envelope-wrapper.open::before {
    transform: rotateX(180deg);
    z-index: 1;
}

.letter {
    position: absolute;
    bottom: 0; left: 10%;
    width: 80%; height: 110px;
    background: white;
    color: #0f4c23;
    border-radius: 5px;
    z-index: 2;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.envelope-wrapper.open .letter {
    transform: translateY(-80px);
    height: 180px;
    z-index: 4;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.status { font-size: 24px; margin-top: 10px; }
.lulus { color: #1e9044; }
.tidak-lulus { color: #d9534f; }

/* --- ANIMASI GELEMBUNG KACA MELAYANG --- */
.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Agar berada di belakang form */
    overflow: hidden;
}

.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    bottom: -160px;
    animation: floatUp 25s infinite linear;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.bg-bubbles li:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-duration: 15s; }
.bg-bubbles li:nth-child(2) { left: 20%; width: 20px; height: 20px; animation-duration: 22s; animation-delay: 2s; }
.bg-bubbles li:nth-child(3) { left: 25%; width: 50px; height: 50px; animation-duration: 20s; animation-delay: 4s; }
.bg-bubbles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-duration: 18s; animation-delay: 0s; background-color: rgba(255, 255, 255, 0.25); }
.bg-bubbles li:nth-child(5) { left: 70%; width: 90px; height: 90px; animation-duration: 25s; animation-delay: 1s; }
.bg-bubbles li:nth-child(6) { left: 80%; width: 120px; height: 120px; animation-duration: 16s; animation-delay: 3s; background-color: rgba(255, 255, 255, 0.2); }
.bg-bubbles li:nth-child(7) { left: 32%; width: 150px; height: 150px; animation-duration: 28s; animation-delay: 7s; }
.bg-bubbles li:nth-child(8) { left: 55%; width: 25px; height: 25px; animation-duration: 15s; animation-delay: 15s; }
.bg-bubbles li:nth-child(9) { left: 90%; width: 45px; height: 45px; animation-duration: 12s; animation-delay: 2s; }

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-1000px) scale(1.5); opacity: 0; }
}

/* --- ANIMASI LOADING SCREEN --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f4c23; /* Warna latar solid saat memuat */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Berada paling depan */
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 100px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ganti bagian footer dengan ini */
footer {
    text-align: center;
    color: #ffffff;
    font-size: 12px; /* Ukuran font dikecilkan sedikit agar rapi di HP */
    z-index: 100;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    background: transparent; /* Pastikan tembus pandang */
}

footer p {
    margin: 3px 0;
    font-weight: 500;
}

footer strong {
    font-weight: 700;
}