* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0f59b3 0%, #0a3aa2 100%);
    min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.active {
    opacity: 1;
    pointer-events: all;
}

.loading-screen:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Countdown Overlay */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.countdown-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.countdown-header h1 {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.time-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    min-width: 80px;
}

.time-box span:first-child {
    display: block;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}



.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.logo p {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}


.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.info-text {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* Hasil Page */
.hasil-container {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-btn {
    align-self: flex-start;
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: white;
    transform: translateX(-5px);
}

.hasil-card {
    background: white;
    border-radius: 5px;
    padding: 20px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.header h2 {
    text-align: center;
    color: #333;
    margin-bottom: 0px;
}

.school-info {
    text-align: center;
    margin-bottom: 40px;
}

.school-info h2 {
    color: #2117ac;
    font-size: 1.8em;
}

.siswa-info h3 {
    color: #333;
    margin-bottom: 0px;
    text-align: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.status-container {
    margin: 40px 0;
    text-align: center;
}

.status {
    padding: 10px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.status.lulus {
       background: linear-gradient(135deg, #120a81, #0867e3);
    color: white;
}

.status.tidak-lulus {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
}

.status-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.status h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
}




.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.print-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,167,69,0.4);
}

@media print {
    .back-btn, .print-btn { display: none !important; }
    .hasil-card { box-shadow: none; margin: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .countdown-timer {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-box {
        min-width: auto;
    }
    
    .info-row {
        flex-direction: column;
        gap: 0px;
    }
}
/* ANIMASI MASUK */
.login-box, .countdown-container {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideUp 1s ease forwards;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* DELAY BIAR LEBIH HIDUP */
.login-box {
    animation-delay: 0.5s;
}

.countdown-container {
    animation-delay: 0.3s;
}

/* ANIMASI JUDUL */


/* SPINNER HALUS (FIX KOTAK HITAM) */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid #00c3ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    background: transparent; /* penting biar gak kotak hitam */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* BACKGROUND LOADING */
.loading-screen {
    background: #0f172a; /* biar elegan, bukan hitam polos */
    color: white;
}
.login-btn {
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: scale(1.05);
    background: #00c3ff;
    color: white;
    box-shadow: 0 0 15px rgba(0,195,255,0.6);
}
/* CARD MASUK */
.hasil-card {
    opacity: 0;
    transform: scale(0.9);
    animation: zoomIn 0.8s ease forwards;
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* STATUS LULUS POP UP */
.status.lulus {
    animation: popUp 0.7s ease;
}

@keyframes popUp {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.status.lulus h2 {
    animation: glowText 1.5s ease-in-out infinite alternate;
    color: #ffffff;
}

@keyframes glowText {
    from {
        text-shadow: 0 0 10px #00ffcc;
    }
    to {
        text-shadow: 0 0 20px #00ffcc, 0 0 40px #00ffcc;
    }
}
.status-icon {
    font-size: 50px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.status.tidak-lulus {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.status.tidak-lulus h2 {
    color: #ffffff;
}
/* LOADING FULL SCREEN */
.loading-hasil {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

/* BOX */
.loading-box {
    text-align: center;
    animation: fadeIn 1s ease;
}

/* PROGRESS BAR */
.progress-bar {
    width: 250px;
    height: 8px;
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00c3ff, #00ffcc);
    animation: loadingBar 3s ease forwards;
}

/* ANIMASI BAR */
@keyframes loadingBar {
    to {
        width: 100%;
    }
}