@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4361ee;
    --primary-hover: #3a56d4;
    --secondary: #7209b7;
    --accent: #4cc9f0;
    --success: #4caf50;
    --danger: #f72585;
    --warning: #ff9800;
    --info: #00bcd4;
    --dark: #212529;
    --light: #f8f9fa;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
}

.gap-3 {
    gap: 1rem;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
    overflow-x: hidden;
}

.bg-animate {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

.navbar {
    background: rgba(33, 37, 41, 0.8) !important;
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.btn-info {
    background: linear-gradient(to right, var(--accent), var(--info));
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    color: white;
}

.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
    border-color: var(--primary);
}

.table {
    border-radius: 15px;
    overflow: hidden;
}

.table thead th {
    background: var(--dark);
    color: white;
    border: none;
}

.alert {
    border-radius: 15px;
    border: none;
}

.lulus-card {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #1b5e20;
}

.tidak-lulus-card {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #b71c1c;
}

.footer {
    padding: 20px 0;
    text-align: center;
    color: #666;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

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

/* Mobile Optimization */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .glass-card {
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.35rem; }
    h4 { font-size: 1.2rem; }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
        padding: 15px !important;
    }
    
    .d-flex.flex-wrap.justify-content-center.gap-3 {
        width: 100%;
    }
    
    .table-responsive {
        border: none;
    }
    
    .countdown-item {
        min-width: 75px;
        padding: 12px;
        margin: 5px;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    #loadingOverlay h3 {
        font-size: 1.3rem;
        text-align: center;
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .glass-card {
        padding: 0.75rem !important;
    }
    
    .p-5 {
        padding: 1.25rem !important;
    }
    
    .display-4 {
        font-size: 2.2rem;
    }
    
    .table td, .table th {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .card-header h4 {
        font-size: 1.1rem;
    }
}

/* Loading Animations */
.loader-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    min-height: 50px;
    align-items: center;
    justify-content: center;
}

.loader-dot {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    animation: loader-dots 1.2s infinite ease-in-out;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.loader-dot:nth-child(1) { background-color: #ff5f57 !important; animation-delay: 0s; }
.loader-dot:nth-child(2) { background-color: #ffbd2e !important; animation-delay: 0.2s; }
.loader-dot:nth-child(3) { background-color: #28c840 !important; animation-delay: 0.4s; }
.loader-dot:nth-child(4) { background-color: #4361ee !important; animation-delay: 0.6s; }

@keyframes loader-dots {
    0%, 100% { transform: scale(1); opacity: 1; filter: brightness(1); }
    50% { transform: scale(1.6); opacity: 0.6; filter: brightness(1.2); }
}

.progress-container {
    width: 320px;
    height: 12px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 25px;
    border: 1px solid rgba(255,255,255,0.3);
}

.progress-bar-custom {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff5f57, #ffbd2e, #28c840, #4361ee, #ff5f57);
    background-size: 200% 100%;
    animation: progress-load 4s linear forwards, gradient-move 2s linear infinite;
}

@keyframes progress-load {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
