<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
    <Style src="project://database/Assets/UI/TeamSelectOverview/CharacterSheet.uss?fileID=7433441132597879392&amp;guid=9179bb22dbbe63c478d4569187312ce1&amp;type=3#CharacterSheet" />
    <Style src="project://database/Assets/UI/AttributeManagementStyles.uss?fileID=7433441132597879392&amp;guid=b20b74b267f9fe84ea92e3fc37ce5c9b&amp;type=3#AttributeManagementStyles" />
    <ui:VisualElement name="CharacterSheet" class="character-sheet-container" style="border-right-width: 2px; border-right-color: rgba(0, 0, 0, 0.67); border-bottom-color: rgba(0, 0, 0, 0.67); border-bottom-width: 2px; border-left-color: rgba(0, 0, 0, 0.67); border-left-width: 2px; border-top-color: rgba(0, 0, 0, 0.67); border-top-width: 2px;">
        <ui:Label text="Character Sheet" class="title-label MainHeading" />
        <ui:VisualElement name="CharacterName" style="flex-grow: 1; flex-direction: row; align-items: center; min-height: 32px; margin-bottom: 8px;">
            <ui:TextField label="Character name" placeholder-text="Name" name="CharacterNameField" class="stat-input" style="border-bottom-left-radius: 0; border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; flex-grow: 1; min-width: 250px; height: 32px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0.1); font-size: 14px;" />
            <ui:Button text="⚁" name="RandomizeNameButton" tooltip="Generate random name" style="margin-left: 5px; width: 32px; height: 32px; flex-shrink: 0; font-size: 14px;" />
        </ui:VisualElement>
        <ui:VisualElement name="CharacterGender" style="flex-grow: 1; flex-direction: row; align-items: center; margin-bottom: 10px;">
            <ui:Label text="Gender" class="stat-label" style="width: 80px; color: rgb(220, 220, 220);" />
            <ui:DropdownField name="GenderDropdown" choices="Male,Female" index="0" class="stat-input" style="flex-grow: 1; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0.1);" />
        </ui:VisualElement>
        
        <!-- Attribute Management Section - moved outside of EditableStats -->
        <ui:VisualElement name="AttributeManagementSection" style="margin: 10px 0px; padding: 8px; border-width: 1px; border-color: rgb(128, 128, 128); border-radius: 5px; flex-shrink: 0; background-color: rgba(40, 40, 60, 0.7);">
            <ui:Label text="Attribute Management" display-tooltip-when-elided="true" name="AttributeManagementTitle" style="font-size: 14px; -unity-font-style: bold; margin-bottom: 5px; color: rgb(220, 220, 220);" />
            <ui:VisualElement name="StatusRow" style="flex-direction: row; justify-content: space-between; margin-bottom: 8px;">
                <ui:Label text="Mode: Point Buy" display-tooltip-when-elided="true" name="CreationModeLabel" style="font-size: 12px; color: rgb(255, 200, 100);" />
                <ui:Label text="Available Points: 22" display-tooltip-when-elided="true" name="AvailablePointsLabel" style="font-size: 12px; color: rgb(100, 255, 100);" />
            </ui:VisualElement>
            <ui:VisualElement name="ButtonsRow" style="flex-direction: row; justify-content: space-between; margin-bottom: 5px;">
                <ui:Button text="Random Point Buy" display-tooltip-when-elided="true" name="RandomizeAttributesButton" tooltip="Randomly distribute 22 points using point-buy rules (stats can range 4-18). Can be edited afterwards!" style="flex-grow: 1; margin-right: 5px; background-color: rgb(200, 100, 100); height: 25px;" />
                <ui:Button text="Reset to Point Buy" display-tooltip-when-elided="true" name="ResetToPointBuyButton" tooltip="Reset all stats to 10 and use 22-point buy system" style="flex-grow: 1; margin-left: 5px; background-color: rgb(100, 150, 200); height: 25px;" />
            </ui:VisualElement>
            <ui:Label text="Point Costs: 4=-4pts, 5=-2pts, 6=-1pts, 7=-1pts, 8=0pts, 9=1pt, 10=2pts, 11=3pts, 12=4pts, 13=5pts, 14=7pts, 15=9pts, 16=12pts, 17=16pts, 18=21pts" display-tooltip-when-elided="true" name="PointCostReference" style="font-size: 9px; color: rgb(200, 200, 200); margin-top: 3px; white-space: normal;" />
        </ui:VisualElement>
        
        <ui:VisualElement name="EditableStats" class="stats-section" style="flex-grow: 0;">
            <ui:Label text="Attributes" class="section-header CharacterSheetHeading" />
            <ui:VisualElement name="StrengthRow" class="stat-row">
                <ui:Label text="Strength" class="stat-label" />
                <ui:IntegerField name="StrengthValue" value="10" enabled="true" class="stat-input editable" style="color: rgb(27, 27, 27);" />
            </ui:VisualElement>
            <ui:VisualElement name="DexterityRow" class="stat-row">
                <ui:Label text="Dexterity" class="stat-label" />
                <ui:IntegerField name="DexterityValue" value="10" class="stat-input editable" />
            </ui:VisualElement>
            <ui:VisualElement name="ConstitutionRow" class="stat-row">
                <ui:Label text="Constitution" class="stat-label" />
                <ui:IntegerField name="ConstitutionValue" value="10" class="stat-input editable" />
            </ui:VisualElement>
            <ui:VisualElement name="WisdomRow" class="stat-row">
                <ui:Label text="Wisdom" class="stat-label" />
                <ui:IntegerField name="WisdomValue" value="10" class="stat-input editable" />
            </ui:VisualElement>
            <ui:VisualElement name="PerceptionRow" class="stat-row">
                <ui:Label text="Perception" class="stat-label" />
                <ui:IntegerField name="PerceptionValue" value="10" class="stat-input editable" />
            </ui:VisualElement>
        </ui:VisualElement>
        <ui:VisualElement name="DerivedStats" class="stats-section" style="border-bottom-right-radius: 0;">
            <ui:Label text="Combat Stats" name="Label" class="section-header CharacterSheetHeading" />
            <ui:VisualElement name="InitRow" class="stat-row">
                <ui:Label text="Initiative" class="stat-label" />
                <ui:IntegerField name="InitValue" value="0" readonly="true" class="stat-input readonly" />
            </ui:VisualElement>
            <ui:VisualElement name="DamageRow" class="stat-row">
                <ui:Label text="Damage Bonus" class="stat-label" />
                <ui:IntegerField name="DamageValue" value="0" readonly="true" class="stat-input readonly" />
            </ui:VisualElement>
            <ui:VisualElement name="SpellCastingRow" class="stat-row">
                <ui:Label text="Spell AC" class="stat-label" />
                <ui:IntegerField name="SpellCastingValue" value="0" readonly="true" class="stat-input readonly" />
            </ui:VisualElement>
            <ui:VisualElement name="MovementSpeedRow" class="stat-row">
                <ui:Label text="Movement Speed" class="stat-label" />
                <ui:IntegerField name="MovementSpeedValue" value="30" readonly="true" class="stat-input readonly" />
            </ui:VisualElement>
            <ui:VisualElement name="HPRow" class="stat-row">
                <ui:Label text="Hit Points" class="stat-label" />
                <ui:IntegerField name="HPValue" value="10" readonly="true" class="stat-input readonly" />
            </ui:VisualElement>
            <ui:VisualElement name="ACRow" class="stat-row">
                <ui:Label text="Armour class" class="stat-label" />
                <ui:IntegerField name="ACValue" value="2" readonly="true" max-length="20" class="stat-input readonly" />
            </ui:VisualElement>
        </ui:VisualElement>
    </ui:VisualElement>
</ui:UXML>
