<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog">
    <defaultcontrol always="true">103</defaultcontrol>
    
    <!-- Animace -->
    <animation effect="slide" start="-480,0" end="0,0" time="400" tween="cubic" easing="out">WindowOpen</animation>
    <animation effect="slide" start="0,0" end="-480,0" time="400" tween="cubic" easing="out">WindowClose</animation>
    
    <controls>
        <!-- Countdown dialog v levém horním rohu -->
        <control type="group">
            <left>50</left>
            <top>50</top>
            <width>560</width>
            <height>230</height>
            <animation effect="fade" start="0" end="100" time="500" delay="200">WindowOpen</animation>
            <!-- Rozšíření okna při zobrazení hry -->
            <animation effect="conditional" start="230" end="986" time="300" condition="String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)">Height</animation>
            
            <!-- Tmavá zaoblená spodní vrstva -->
            <control type="image">
                <left>0</left>
                <top>0</top>
                <width>560</width>
                <height>230</height>
                <texture border="55" colordiffuse="A0000000">special://home/addons/plugin.video.milionar/resources/media/dialog_rounded_large.png</texture>
                <!-- Rozšíření pozadí při zobrazení hry -->
                <animation effect="conditional" start="230" end="986" time="300" condition="String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)">Height</animation>
            </control>
            
            <!-- Okraj panelu - zaoblený -->
            <control type="image">
                <left>0</left>
                <top>0</top>
                <width>560</width>
                <height>230</height>
                <texture border="55" colordiffuse="10FFFFFF">special://home/addons/plugin.video.milionar/resources/media/dialog_rounded_large.png</texture>
                <!-- Rozšíření okraje při zobrazení hry -->
                <animation effect="conditional" start="230" end="986" time="300" condition="String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)">Height</animation>
            </control>
            
            <!-- Náhled epizody - 16:9 formát -->
            <control type="image">
                <left>20</left>
                <top>20</top>
                <width>170</width>
                <height>96</height>
                <texture diffuse="special://home/addons/plugin.video.milionar/resources/media/still_mask_rounded.png">$INFO[Window.Property(WCS.Autoplay.NextEpisode.Thumb)]</texture>
                <aspectratio>scale</aspectratio>
            </control>
            
            <!-- Fallback obrázek pokud není dostupný -->
            <control type="image">
                <left>20</left>
                <top>20</top>
                <width>170</width>
                <height>96</height>
                <texture diffuse="special://home/addons/plugin.video.milionar/resources/media/still_mask_rounded.png" colordiffuse="10FFFFFF">special://home/addons/plugin.video.milionar/resources/media/white.png</texture>
                <visible>String.IsEmpty(Window.Property(WCS.Autoplay.NextEpisode.Thumb))</visible>
            </control>
            
            <!-- Text vedle náhledu -->
            <control type="group">
                <left>205</left>
                <top>25</top>
                <width>335</width>
                <height>105</height>
                
                <!-- "Další epizoda" -->
                <control type="label">
                    <left>0</left>
                    <top>0</top>
                    <width>335</width>
                    <height>20</height>
                    <font>font10</font>
                    <textcolor>FF999999</textcolor>
                    <label>Další epizoda:</label>
                    <align>left</align>
                    <aligny>center</aligny>
                </control>
                
                <!-- Název seriálu -->
                <control type="label">
                    <left>0</left>
                    <top>30</top>
                    <width>335</width>
                    <height>28</height>
                    <font>font13</font>
                    <textcolor>FFFFFFFF</textcolor>
                    <label>$INFO[Window.Property(WCS.Autoplay.SeriesTitle)]</label>
                    <align>left</align>
                    <aligny>center</aligny>
                    <scroll>true</scroll>
                    <scrollsuffix>  •  </scrollsuffix>
                    <scrollspeed>30</scrollspeed>
                </control>
                
                <!-- Číslo sezóny/epizody -->
                <control type="label" id="211">
                    <left>0</left>
                    <top>65</top>
                    <width>auto</width>
                    <height>25</height>
                    <font>font13</font>
                    <textcolor>FFFF6B6B</textcolor>
                    <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.SeasonEpisode)]</label>
                    <align>left</align>
                    <aligny>center</aligny>
                </control>
                
                <!-- Rok (modrá barva) -->
                <control type="label" id="212">
                    <left>115</left>
                    <top>65</top>
                    <width>auto</width>
                    <height>25</height>
                    <font>font13</font>
                    <textcolor>FF87CEEB</textcolor>
                    <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.YearOnly)]</label>
                    <align>left</align>
                    <aligny>center</aligny>
                    <visible>!String.IsEmpty(Window.Property(WCS.Autoplay.NextEpisode.YearOnly))</visible>
                </control>
                
                <!-- Rating (žlutá barva) -->
                <control type="label" id="213">
                    <left>200</left>
                    <top>65</top>
                    <width>auto</width>
                    <height>25</height>
                    <font>font13</font>
                    <textcolor>FFFFFF00</textcolor>
                    <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.RatingOnly)]</label>
                    <align>left</align>
                    <aligny>center</aligny>
                    <visible>!String.IsEmpty(Window.Property(WCS.Autoplay.NextEpisode.RatingOnly))</visible>
                </control>
            </control>
            
            <!-- Celý název epizody pod náhledem -->
            <control type="label">
                <left>20</left>
                <top>125</top>
                <width>520</width>
                <height>30</height>
                <font>font13</font>
                <textcolor>FFFFFFFF</textcolor>
                <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.Title)]</label>
                <align>left</align>
                <aligny>center</aligny>
                <scroll>true</scroll>
                <scrollsuffix>  •  </scrollsuffix>
                <scrollspeed>30</scrollspeed>
            </control>
            <!-- Akční tlačítka (pill-shaped list) -->
            <control type="list" id="103">
                <left>25</left>
                <top>165</top>
                <width>510</width>
                <height>50</height>
                <orientation>horizontal</orientation>
                <ondown>501</ondown>
                <onup>noop</onup>
                <itemlayout height="45" width="170">
                    <control type="image">
                        <left>5</left>
                        <top>0</top>
                        <width>160</width>
                        <height>45</height>
                        <texture border="20" colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texture>
                    </control>
                    <control type="label">
                        <left>5</left>
                        <top>0</top>
                        <width>160</width>
                        <height>45</height>
                        <align>center</align>
                        <aligny>center</aligny>
                        <label>$INFO[ListItem.Label]</label>
                        <textcolor>AAFFFFFF</textcolor>
                        <font>font13</font>
                    </control>
                </itemlayout>
                <focusedlayout height="45" width="170">
                    <!-- Unfocused state (list has focus but item not selected) -->
                    <control type="group">
                        <visible>!Control.HasFocus(103)</visible>
                        <control type="image">
                            <left>5</left>
                            <top>0</top>
                            <width>160</width>
                            <height>45</height>
                            <texture border="20" colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texture>
                        </control>
                        <control type="label">
                            <left>5</left>
                            <top>0</top>
                            <width>160</width>
                            <height>45</height>
                            <align>center</align>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Label]</label>
                            <textcolor>AAFFFFFF</textcolor>
                            <font>font13</font>
                        </control>
                    </control>
                    <!-- Focused state: Brighter -->
                    <control type="group">
                        <visible>Control.HasFocus(103)</visible>
                        <control type="image">
                            <left>5</left>
                            <top>0</top>
                            <width>160</width>
                            <height>45</height>
                            <texture border="20" colordiffuse="60FFFFFF">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texture>
                        </control>
                        <control type="label">
                            <left>5</left>
                            <top>0</top>
                            <width>160</width>
                            <height>45</height>
                            <align>center</align>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Label]</label>
                            <textcolor>FFFFFFFF</textcolor>
                            <font>font13</font>
                        </control>
                    </control>
                </focusedlayout>
            </control>
            
            <!-- Progress bar pod tlačítky -->
            <control type="progress" id="105">
                <left>20</left>
                <top>215</top>
                <width>520</width>
                <height>8</height>
                <texturebg border="4" colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/progress_pill.png</texturebg>
                <lefttexture>-</lefttexture>
                <midtexture border="4" colordiffuse="FFFF6B6B">special://home/addons/plugin.video.milionar/resources/media/progress_pill.png</midtexture>
                <righttexture>-</righttexture>
                <info>Window.Property(WCS.Autoplay.Progress)</info>
            </control>
            
            <!-- Herní sekce s dynamickou výškou -->
            <control type="group">
                <left>0</left>
                <top>235</top>
                <width>560</width>
                <height>751</height>
                <visible>String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)</visible>
                <animation effect="slide" start="0,-20" end="0,0" time="300" tween="cubic" easing="out">Visible</animation>
                <animation effect="slide" start="0,0" end="0,-20" time="300" tween="cubic" easing="out">Hidden</animation>
                
                <!-- Pozadí pro herní sekci - zaoblené -->
                <control type="image">
                    <left>0</left>
                    <top>0</top>
                    <width>560</width>
                    <height>751</height>
                    <texture border="55" colordiffuse="A0000000">special://home/addons/plugin.video.milionar/resources/media/dialog_rounded_large.png</texture>
                </control>
                <control type="image">
                    <left>0</left>
                    <top>0</top>
                    <width>560</width>
                    <height>751</height>
                    <texture border="55" colordiffuse="10FFFFFF">special://home/addons/plugin.video.milionar/resources/media/dialog_rounded_large.png</texture>
                </control>
                

                
                <!-- Herní text oblast -->
                <control type="textbox" id="200">
                    <left>20</left>
                    <top>15</top>
                    <width>500</width>
                    <height>591</height>
                    <font>font10</font>
                    <textcolor>FFFFFFFF</textcolor>
                    <label>$INFO[Window.Property(WCS.Autoplay.Game.Text)]</label>
                    <align>left</align>
                    <aligny>top</aligny>
                    <pagecontrol>201</pagecontrol>
                    <onup>103</onup>
                    <ondown>301</ondown>
                </control>
                <!-- Scrollbar pro textbox -->
                <control type="scrollbar" id="201">
                    <left>525</left>
                    <top>15</top>
                    <width>15</width>
                    <height>591</height>
                    <orientation>vertical</orientation>
                    <showonepage>false</showonepage>
                    <onleft>301</onleft>
                    <onup>103</onup>
                    <ondown>301</ondown>
                </control>
                
                <!-- Herní tlačítka vertikálně -->
                <control type="group">
                    <left>20</left>
                    <top>606</top>
                    <width>520</width>
                    <height>140</height>
                    
                    <!-- První herní tlačítko -->
                    <control type="button" id="301">
                        <left>0</left>
                        <top>0</top>
                        <width>520</width>
                        <height>30</height>
                        <font>font13</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <focusedcolor>FFFFFFFF</focusedcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.Game.Button1)]</label>
                        <align>center</align>
                        <aligny>center</aligny>
                        <texturefocus border="20" colordiffuse="FF0078D7">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturefocus>
                        <texturenofocus colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturenofocus>
                        <onup>200</onup>
                        <ondown>302</ondown>
                        <onleft>301</onleft>
                        <onright>201</onright>
                    </control>
                    
                    <!-- Druhé herní tlačítko -->
                    <control type="button" id="302">
                        <left>0</left>
                        <top>35</top>
                        <width>520</width>
                        <height>30</height>
                        <font>font13</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <focusedcolor>FFFFFFFF</focusedcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.Game.Button2)]</label>
                        <align>center</align>
                        <aligny>center</aligny>
                        <texturefocus border="20" colordiffuse="FF4CAF50">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturefocus>
                        <texturenofocus colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturenofocus>
                        <onup>301</onup>
                        <ondown>303</ondown>
                        <onleft>302</onleft>
                        <onright>201</onright>
                    </control>
                    
                    <!-- Třetí herní tlačítko -->
                    <control type="button" id="303">
                        <left>0</left>
                        <top>70</top>
                        <width>520</width>
                        <height>30</height>
                        <font>font13</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <focusedcolor>FFFFFFFF</focusedcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.Game.Button3)]</label>
                        <align>center</align>
                        <aligny>center</aligny>
                        <texturefocus border="20" colordiffuse="FFFF9800">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturefocus>
                        <texturenofocus colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturenofocus>
                        <onup>302</onup>
                        <ondown>304</ondown>
                        <onleft>303</onleft>
                        <onright>201</onright>
                    </control>
                    
                    <!-- Čtvrté herní tlačítko -->
                    <control type="button" id="304">
                        <left>0</left>
                        <top>105</top>
                        <width>520</width>
                        <height>30</height>
                        <font>font13</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <focusedcolor>FFFFFFFF</focusedcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.Game.Button4)]</label>
                        <align>center</align>
                        <aligny>center</aligny>
                        <texturefocus border="20" colordiffuse="FFF44336">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturefocus>
                        <texturenofocus colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/btn_action_pill.png</texturenofocus>
                        <onup>303</onup>
                        <ondown>304</ondown>
                        <onleft>304</onleft>
                        <onright>201</onright>
                    </control>
                </control>
            </control>
            
        </control>
    </controls>
</window> 