/* Auth Modal - Apple Style Premium Design - Optimized Sizes */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    /* Reduced from 440px */
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 30px 90px rgba(0, 0, 0, 0.6),
        0 10px 40px rgba(255, 107, 0, 0.1);
    overflow: hidden;
}

.auth-modal-overlay.show .auth-modal {
    transform: scale(1) translateY(0);
}

/* Gradient Background Effect */
.auth-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    /* Reduced from 200px */
    background: radial-gradient(circle at top, rgba(255, 107, 0, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Close Button - Apple Style */
.auth-modal-close {
    position: absolute;
    top: 16px;
    /* Reduced from 20px */
    right: 16px;
    width: 32px;
    /* Reduced from 36px */
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.6);
    z-index: 10;
}

.auth-modal-close:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
    transform: rotate(90deg);
}

.auth-modal-close svg {
    width: 16px;
    /* Reduced from 18px */
    height: 16px;
}

/* Modal Content */
.auth-modal-content {
    position: relative;
    z-index: 1;
    padding: 36px 32px 32px;
    /* Reduced from 48px 40px 40px */
}

/* Logo Section */
.auth-modal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-modal-logo-icon {
    width: 38px;
    /* Reduced from 44px */
    height: 38px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border-radius: 10px;
    /* Reduced from 12px */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 20px rgba(255, 107, 0, 0.3),
        0 0 0 1px rgba(255, 107, 0, 0.2);
}

.auth-modal-logo-icon svg {
    width: 20px;
    /* Reduced from 24px */
    height: 20px;
    color: white;
}

.auth-modal-logo-text {
    font-size: 28px;
    /* Slightly increased since no icon */
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #fff;
}


.auth-modal-logo-highlight {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
.auth-modal-header {
    text-align: center;
    margin-bottom: 28px;
    /* Reduced from 36px */
}

.auth-modal-title {
    font-size: 26px;
    /* Reduced from 32px */
    font-weight: 700;
    letter-spacing: -0.8px;
    color: #fff;
    margin: 0 0 8px 0;
    /* Reduced from 12px */
}

.auth-modal-subtitle {
    font-size: 14px;
    /* Reduced from 16px */
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* Reduced from 16px */
}

.auth-form-group {
    position: relative;
}

.auth-form-label {
    display: block;
    font-size: 12px;
    /* Reduced from 13px */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    /* Reduced from 8px */
    letter-spacing: -0.2px;
}

.auth-form-label .required {
    color: #ff6b00;
    margin-left: 2px;
}

.auth-form-input {
    width: 100%;
    padding: 10px 12px;
    /* Reduced from 12px 14px */
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    /* Reduced from 14px */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
}

.auth-form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #ff6a002a;
    box-shadow:
        0 0 0 3px rgba(255, 107, 0, 0.1),
        0 4px 12px rgba(255, 107, 0, 0.15);
    transform: translateY(-1px);
}

.auth-form-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    /* Reduced from 13px */
}

/* Password Wrapper */
.auth-password-wrapper {
    position: relative;
}

.auth-password-wrapper .auth-form-input {
    padding-right: 42px;
    /* Adjusted for smaller size */
}

.auth-password-toggle {
    position: absolute;
    right: 10px;
    /* Reduced from 14px */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 6px;
    /* Reduced from 8px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.auth-password-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ff6b00;
}

.auth-password-toggle svg {
    width: 18px;
    /* Reduced from 20px */
    height: 18px;
}

/* Checkbox */
.auth-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.auth-checkbox {
    width: 18px;
    /* Reduced from 20px */
    height: 18px;
    cursor: pointer;
    accent-color: #ff6b00;
}

.auth-checkbox-label {
    font-size: 13px;
    /* Reduced from 14px */
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

.auth-checkbox-label a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-checkbox-label a:hover {
    color: #ff8c00;
    text-decoration: underline;
}

/* Submit Button - Apple Style */
.auth-submit-btn {
    width: 69%;
    margin: auto;
    padding: 10px;
    /* Reduced from 16px */
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border: none;
    border-radius: 60px;
    /* Reduced from 12px */
    color: white;
    font-size: 14px;
    /* Reduced from 17px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
    /* Reduced from 8px */
    letter-spacing: -0.3px;
    box-shadow:
        0 4px 16px rgba(255, 107, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(255, 107, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Forgot Password Link */
.auth-forgot-password {
    text-align: center;
    margin-top: 16px;
    /* Reduced from 20px */
}

.auth-forgot-password a {
    color: #ff6b00;
    text-decoration: none;
    font-size: 13px;
    /* Reduced from 15px */
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-forgot-password a:hover {
    color: #ff8c00;
    text-decoration: underline;
}

/* Footer Text */
.auth-footer-text {
    text-align: center;
    margin-top: 22px;
    /* Reduced from 28px */
    padding-top: 22px;
    /* Reduced from 28px */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    /* Reduced from 15px */
    color: rgba(255, 255, 255, 0.6);
}

.auth-footer-text a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-footer-text a:hover {
    color: #ff8c00;
    text-decoration: underline;
}

/* Error/Success Messages - Apple Style */
.auth-message {
    padding: 12px 14px;
    /* Reduced from 14px 16px */
    border-radius: 10px;
    /* Reduced from 12px */
    margin-bottom: 16px;
    /* Reduced from 20px */
    font-size: 13px;
    /* Reduced from 14px */
    font-weight: 500;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.auth-error {
    background: rgba(255, 68, 68, 0.12);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff6666;
}

.auth-success {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
    color: #81c784;
}

.auth-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-modal {
        max-width: 95%;
        border-radius: 20px;
    }

    .auth-modal-content {
        padding: 32px 24px 28px;
    }

    .auth-modal-logo {
        margin-bottom: 20px;
    }

    .auth-modal-logo-text {
        font-size: 24px;
    }

    .auth-modal-header {
        margin-bottom: 24px;
    }

    .auth-modal-title {
        font-size: 24px;
    }

    .auth-modal-subtitle {
        font-size: 13px;
    }

    .auth-form {
        gap: 12px;
    }

    .auth-form-label {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .auth-form-input {
        padding: 9px 11px;
        font-size: 13px;
    }

    .auth-form-input::placeholder {
        font-size: 11px;
    }

    .auth-submit-btn {
        padding: 11px;
        font-size: 14px;
    }

    .auth-checkbox {
        width: 16px;
        height: 16px;
    }

    .auth-checkbox-label {
        font-size: 11px;
    }

    .auth-forgot-password a,
    .auth-footer-text {
        font-size: 12px;
    }
}

/* Overlay Animation */
@media (prefers-reduced-motion: no-preference) {
    .auth-modal-overlay {
        animation: fadeIn 0.4s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

/* Focus Visible for Accessibility */
.auth-form-input:focus-visible,
.auth-submit-btn:focus-visible,
.auth-checkbox:focus-visible {
    outline: 2px solid #ff6b00;
    outline-offset: 2px;
}