/* Admin Login Modal Styles */
/* Password Toggle Styles */
.password-toggle-container {
    display: flex;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
}

.password-toggle-container input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.password-toggle-label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.password-toggle-label:hover {
    color: #333;
}

.admin-login-btn {
    background: linear-gradient(135deg, 
        #4ade80 0%, 
        #10b981 25%, 
        #059669 50%, 
        #10b981 75%, 
        #4ade80 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 15px;
    animation: fadeInUp 0.6s ease-out 0.8s both;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.2),
                0 0 20px rgba(74, 222, 128, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.admin-login-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.6s;
}

.admin-login-btn:hover::before {
    left: 100%;
}

.admin-login-btn:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 222, 128, 0.5),
                inset 0 2px 4px rgba(255, 255, 255, 0.3),
                0 0 30px rgba(74, 222, 128, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-login-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
}

/* Admin Login Modal Styles */
.admin-login-modal {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.98) 0%, 
        rgba(30, 41, 59, 0.95) 100%);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4),
                inset 0 0 80px rgba(74, 222, 128, 0.05);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    transform: translateZ(0);
    backdrop-filter: blur(20px);
    border-left: 4px solid rgba(182, 194, 187, 0.6);
}

.admin-login-modal.show {
    right: 0;
    animation: slideInRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInRight {
    0% {
        right: -450px;
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        right: 0;
        opacity: 1;
        transform: translateX(0);
    }
}

/* Make the admin login modal fully responsive on mobile */
@media (max-width: 768px) {
    .admin-login-modal {
        width: 100%;
        right: -100%; /* keep off-canvas fully hidden */
        max-width: 100vw;
    }

    .admin-login-container {
        margin: 12px;
        padding: 20px;
    }

    .admin-login-form {
        max-width: 100%;
        width: 100%;
    }

    .captcha-container {
        flex-wrap: wrap;
    }

    .captcha-display {
        min-width: 0;
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .admin-login-modal {
        width: 100%;
        right: -100%;
    }

    .admin-login-container {
        padding: 30px 20px;
    }

    .admin-login-logo {
        width: clamp(110px, 32vw, 160px);
        height: clamp(110px, 32vw, 160px);
        margin-bottom: 15px;
    }

    .admin-login-header {
        padding: 20px;
        margin-bottom: 25px;
    }

    .admin-login-header h2 {
        font-size: 24px;
    }

    .close-admin-modal {
        top: 15px;
        left: 15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .admin-form-group input {
        padding: 14px 18px;
        font-size: 16px;
    }

    .admin-login-btn {
        padding: 14px 28px;
        font-size: 16px;
    }
}

.admin-login-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    backdrop-filter: blur(2px);
}

.admin-login-backdrop.show {
    opacity: 1;
    visibility: visible;
    animation: fadeInBackdrop 0.3s ease-in-out;
}

@keyframes fadeInBackdrop {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(2px);
    }
}

.admin-login-container {
    padding: 20px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    background: transparent;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.admin-login-container::before {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-top: 2px solid rgba(74, 222, 128, 0.3);
    border-right: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: 0 8px 0 0;
}

.admin-login-container::after {
    content: "";
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-bottom: 2px solid rgba(74, 222, 128, 0.3);
    border-left: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: 0 0 0 8px;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-login-logo {
    width: clamp(120px, 14vw, 180px);
    height: clamp(120px, 14vw, 180px);
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
    border-radius: 50%;
    object-fit: contain;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    padding: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(74, 222, 128, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(74, 222, 128, 0.3);
    transition: all 0.3s ease;
}

.admin-login-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(74, 222, 128, 0.4);
    border-color: rgba(74, 222, 128, 0.5);
}

.admin-login-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
    animation: slideInDown 0.5s ease-out 0.3s both;
    width: calc(100% + 90px);
    padding: 15px 30px;
    margin-left: -45px;
    margin-right: -45px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 100%);
    border-radius: 0;
    backdrop-filter: blur(25px);
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2),
                0 4px 15px rgba(0, 0, 0, 0.15);
}

@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-login-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Roboto', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
                 0 0 20px rgba(74, 222, 128, 0.3);
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(74, 222, 128, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-admin-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    padding: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: none;
    box-shadow: none;
    font-weight: bold;
    z-index: 1001;
}

.close-admin-modal:hover {
    background: transparent;
    transform: scale(1.15) translateX(-3px);
    box-shadow: none;
    border: none;
    opacity: 0.8;
}

.close-admin-modal:active {
    transform: scale(1.05) translateX(-3px);
    opacity: 0.6;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.admin-form-group {
    margin-bottom: 15px;
    animation: fadeInUp 0.5s ease-out both;
    position: relative;
}

.admin-form-group:nth-child(1) { animation-delay: 0.4s; }
.admin-form-group:nth-child(2) { animation-delay: 0.5s; }
.admin-form-group:nth-child(3) { animation-delay: 0.6s; }

.admin-form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.admin-form-group input {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
                inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-weight: 400;
}

.admin-form-group input:focus {
    outline: none;
    border-color: rgba(74, 222, 128, 0.8);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2),
                0 8px 25px rgba(0, 0, 0, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.admin-form-group input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.admin-error-message {
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.25) 0%, 
        rgba(220, 38, 38, 0.2) 100%);
    color: #fee2e2;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 2px solid rgba(220, 38, 38, 0.4);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* CAPTCHA Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.captcha-display {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 10px 16px;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 6px;
    color: white;
    border-radius: 14px;
    min-width: 160px;
    text-align: center;
    user-select: none;
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
                inset 0 2px 4px rgba(255, 255, 255, 0.1),
                0 0 15px rgba(74, 222, 128, 0.2);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.captcha-refresh {
    background: linear-gradient(135deg, 
        rgba(74, 222, 128, 0.4) 0%, 
        rgba(34, 197, 94, 0.3) 100%);
    color: white;
    border: 2px solid rgba(74, 222, 128, 0.6);
    padding: 10px 14px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.captcha-refresh:hover {
    background: linear-gradient(135deg, 
        rgba(74, 222, 128, 0.6) 0%, 
        rgba(34, 197, 94, 0.5) 100%);
    transform: scale(1.08) rotate(180deg);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border-color: rgba(74, 222, 128, 0.8);
}
