# Polished tutor selection screen
screen tutor_selection():
    modal True
    default hovered_tutor = None
    
    # Character bios dictionary
    $ tutor_bios = {
        "2b": "2B is a combat android from the YoRHa unit, known for her stoic demeanor and exceptional fighting skills. She is calm under pressure and highly efficient in battle.",
    }
    
    # Title at top
    frame:
        xalign 0.5
        yalign 0.05
        background "#000000dd"
        padding (40, 20)
        at fade_in_title
        
        text "Choose Your Tutor" size 50 color "#ffd700" bold True
    
    # Three buttons positioned above characters
   
    # Center button (2B)
    $ eve_bg = "#5a2a3dee" if hovered_tutor == "2b" else "#1a1a2edd"
    frame:
        xalign 0.5
        yalign 0.7
        background eve_bg
        padding (30, 20)
        at button_float_center
        
        button:
            action Return("2b")
            hovered SetScreenVariable("hovered_tutor", "2b")
            unhovered SetScreenVariable("hovered_tutor", None)
            
            vbox:
                spacing 10
                xalign 0.5
                xsize 400
                text "2B" size 50 color "#ff6b9d" bold True xalign 0.5
                text "Battle Android" size 22 color "#ffb6d0" xalign 0.5
    
    
    # Bio display at bottom with fancy animation
    if hovered_tutor:
        frame:
            xalign 0.5
            yalign 0.92
            background "#000000ee"
            padding (50, 30)
            xmaximum 1200
            at bio_slide_up
            
            hbox:
                spacing 20
                
                # Decorative icon based on tutor
                if hovered_tutor == "2b":
                    text "💙" size 40
                
                text tutor_bios[hovered_tutor]:
                    size 42
                    color "#ffffff"
                    text_align 0.5
                    line_spacing 5
                
                # Decorative icon on right
                if hovered_tutor == "2b":
                    text "💙" size 40


# Animations for the screen elements
transform fade_in_title:
    alpha 0.0 yoffset -30
    ease 0.6 alpha 1.0 yoffset 0

transform button_float_left:
    yoffset 0
    ease 2.0 yoffset 10
    ease 2.0 yoffset 0
    repeat

transform button_float_center:
    yoffset 0
    ease 2.3 yoffset 12
    ease 2.3 yoffset 0
    repeat

transform button_float_right:
    yoffset 0
    ease 1.8 yoffset 8
    ease 1.8 yoffset 0
    repeat

transform bio_slide_up:
    alpha 0.0 yoffset 50
    ease 0.3 alpha 1.0 yoffset 0
