/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-gold: #FFD700;
    --accent-orange: #FFA500;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --gradient-main: linear-gradient(135deg, #1e3a5f 0%, #0a0e1a 50%, #1a1040 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700, #FFA500);
    --gradient-blue: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #10b981, #059669);
    --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    --shadow-gold: 0 0 30px rgba(255, 215, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== PARTICLES ===== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    padding: 40px 20px 30px;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

.school-emblem {
    margin-bottom: 20px;
}

.emblem-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto;
    animation: pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.emblem-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.header-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    margin-bottom: 8px;
}

.header-year {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 4px;
}

.header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.deco-line {
    width: 80px;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.deco-diamond {
    width: 10px;
    height: 10px;
    background: var(--accent-gold);
    transform: rotate(45deg);
    box-shadow: var(--shadow-gold);
}

/* ===== COUNTDOWN ===== */
.countdown-section {
    text-align: center;
    padding: 30px 0;
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

.countdown-label {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.countdown-card {
    width: 110px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255, 215, 0, 0.1), transparent 30%);
    animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
    100% { transform: rotate(360deg); }
}

.countdown-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-secondary);
    border-radius: calc(var(--radius) - 2px);
    z-index: 0;
}

.countdown-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.countdown-number {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    text-shadow: none;
}

.countdown-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.countdown-separator {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    animation: blink 1s ease-in-out infinite;
    margin-bottom: 30px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.countdown-info {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.countdown-info strong {
    color: var(--accent-gold);
}

.info-icon {
    font-size: 1.2rem;
}

/* ===== SEARCH ===== */
.search-section {
    padding: 20px 0;
    animation: fadeInUp 0.8s ease-out;
}

.search-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
}

.search-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 12px;
    max-width: 550px;
    margin: 0 auto;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.search-btn {
    padding: 16px 32px;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--radius-sm);
    color: #0a0e1a;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

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

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(10, 14, 26, 0.3);
    border-top-color: #0a0e1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESULTS ===== */
.result-section {
    padding: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

.result-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-card.lulus {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.15);
}

.result-card.tidak-lulus {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.1);
}

.result-card.error {
    border-color: rgba(234, 179, 8, 0.3);
}

.result-status-badge {
    display: inline-block;
    padding: 10px 35px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.result-status-badge.lulus {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

.result-status-badge.tidak-lulus {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 4px 40px rgba(16, 185, 129, 0.7); }
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.result-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 450px;
    margin: 0 auto 25px;
    text-align: left;
}

.detail-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.7;
}

/* ===== DOWNLOAD SKL BUTTON ===== */
.download-skl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 14px 35px;
    background: var(--gradient-blue);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.download-skl-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

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

.download-skl-btn .btn-icon {
    font-size: 1.2rem;
}

/* ===== ERROR RESULT ===== */
.error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.error-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #eab308;
    margin-bottom: 10px;
}

.error-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 40px 20px 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-address {
    margin-top: 5px;
    font-size: 0.75rem;
}

/* ===== CONFETTI CANVAS ===== */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }

    .header-subtitle {
        font-size: 0.75rem;
        letter-spacing: 4px;
    }

    .countdown-card {
        width: 75px;
        height: 85px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-separator {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .countdown-container {
        gap: 6px;
    }

    .input-group {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .search-card {
        padding: 25px 20px;
    }

    .result-card {
        padding: 25px 20px;
    }
}

@media (max-width: 400px) {
    .header-title {
        font-size: 1.3rem;
    }

    .countdown-card {
        width: 65px;
        height: 75px;
    }

    .countdown-number {
        font-size: 1.7rem;
    }

    .countdown-separator {
        font-size: 1.4rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-text {
    background: linear-gradient(90deg, var(--accent-gold) 0%, #fff 50%, var(--accent-gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}
