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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --bg-gradient: linear-gradient(135deg, #0f172a, #1e1b4b, #312e81);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

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

.container {
    width: 100%;
    max-width: 600px;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

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

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #a5b4fc, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Countdown */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-val {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.time-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"], input[type="file"], input[type="datetime-local"] {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="file"]:focus, input[type="datetime-local"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
    background: rgba(0, 0, 0, 0.3);
}

/* Custom file input style */
input[type="file"]::file-selector-button {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    margin-right: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* Result Screen */
.result-box {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.4);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-nisn {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-lulus {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.status-gagal {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.alert {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    font-size: 0.9rem;
}

.alert.success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Admin Link */
.admin-link {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: white;
}

@media (max-width: 480px) {
    .time-val { font-size: 2.5rem; }
    .glass-card { padding: 2rem 1.5rem; }
    .countdown-container { gap: 1rem; }
}
