/* Password Gate - Dark Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 119, 230, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 10%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, -20px) scale(1.1); }
}

/* Container */
.password-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 480px;
    padding: 60px 50px;
    background: rgba(20, 20, 30, 0.9);
    border-radius: 24px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 119, 230, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: containerFadeIn 0.8s ease-out;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo Polri Container - No Circle, Just Logo */
.logo-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: logoFadeIn 1s ease-out;
}

.polri-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.25) contrast(1.2) saturate(1.15) drop-shadow(0 0 20px rgba(59, 130, 246, 0.6));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: brightness(1.2) contrast(1.15) saturate(1.1) drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
    }
    50% {
        filter: brightness(1.3) contrast(1.2) saturate(1.15) drop-shadow(0 0 20px rgba(59, 130, 246, 0.7));
    }
}

/* Lock Icon (Fallback if logo fails to load) */
.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #0077e6 0%, #9333ea 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px rgba(0, 119, 230, 0.3),
        0 0 40px rgba(147, 51, 234, 0.2);
    animation: lockPulse 3s ease-in-out infinite;
    position: relative;
}

.lock-icon::before {
    content: '🔒';
    font-size: 40px;
    animation: lockShake 0.5s ease-in-out;
}

@keyframes lockPulse {
    0%, 100% {
        box-shadow:
            0 10px 30px rgba(0, 119, 230, 0.3),
            0 0 40px rgba(147, 51, 234, 0.2);
    }
    50% {
        box-shadow:
            0 10px 40px rgba(0, 119, 230, 0.5),
            0 0 60px rgba(147, 51, 234, 0.4);
    }
}

@keyframes lockShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Title */
.password-title {
    text-align: center;
    margin-bottom: 25px;
}

.password-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #0077e6 0%, #9333ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.password-title p {
    font-size: 13px;
    color: #8b92a8;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Form */
.password-form {
    margin-top: 40px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #a8b2c8;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.password-input-wrapper {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 18px 55px 18px 20px;
    font-size: 16px;
    color: #ffffff;
    background: rgba(30, 30, 45, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.password-input:focus {
    border-color: #0077e6;
    background: rgba(30, 30, 45, 1);
    box-shadow:
        0 0 0 4px rgba(0, 119, 230, 0.1),
        0 8px 20px rgba(0, 119, 230, 0.2);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8b92a8;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.toggle-password:hover {
    color: #0077e6;
    background: rgba(0, 119, 230, 0.1);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #0077e6 0%, #9333ea 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(0, 119, 230, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 119, 230, 0.4);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.error-message {
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 14px;
    display: none;
    animation: errorShake 0.5s ease-in-out;
}

.error-message.show {
    display: block;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success Message */
.success-message {
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: #6ee7b7;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Footer Info */
.password-footer {
    margin-top: 30px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

.password-footer a {
    color: #0077e6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.password-footer a:hover {
    color: #9333ea;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.security-badge span {
    color: #6ee7b7;
    font-size: 13px;
    font-weight: 600;
}

.security-icon {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 600px) {
    .password-container {
        padding: 40px 30px;
        width: 95%;
    }

    .password-title h1 {
        font-size: 26px;
    }

    .lock-icon {
        width: 70px;
        height: 70px;
    }

    .lock-icon::before {
        font-size: 35px;
    }
}

/* Particle effects */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 119, 230, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 3s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}
