/* ===================================
   Authentication Modal Styles
   =================================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: authModalFadeIn 0.4s ease forwards;
}

.auth-modal.closing {
    animation: authModalFadeOut 0.3s ease forwards;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    background: #ffffff;
    padding: 60px;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    animation: authSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-align: center;
}

.auth-modal-header {
    margin-bottom: 32px;
}

.auth-icon {
    font-size: 32px;
    margin-bottom: 20px;
    display: block;
}

.auth-title {
    font-size: 28px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 16px;
    color: #666;
    font-weight: 300;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    width: 100%;
}

#password-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fcfcfc;
    color: #1a1a1a;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

#password-input:focus {
    border-color: #0066cc;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.auth-error {
    color: #da1e28;
    font-size: 14px;
    font-weight: 400;
    margin-top: -8px;
    text-align: left;
}

.auth-submit {
    background: #000;
    color: #fff;
    padding: 16px 32px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-submit:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.auth-close {
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    padding: 10px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    width: fit-content;
    margin: 0 auto;
}

.auth-close:hover {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* Animations */
@keyframes authModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes authModalFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Mobile Adjustments */
@media (max-width: 580px) {
    .auth-modal-content {
        padding: 40px 24px;
        margin: 20px;
        max-width: none;
    }

    .auth-title {
        font-size: 24px;
    }
}

/* Hide content until authorized */
body.protected-content-hidden {
    overflow: hidden;
}

body.protected-content-hidden>*:not(.auth-modal) {
    display: none !important;
}

/* Reveal animation */
@keyframes contentReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-content {
    animation: contentReveal 0.8s ease forwards;
}