<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog">
    <defaultcontrol always="true">103</defaultcontrol>
    
    <!-- Animace - sjede shora -->
    <animation effect="slide" start="0,-140" end="0,0" time="400" tween="cubic" easing="out">WindowOpen</animation>
    <animation effect="slide" start="0,0" end="0,-140" time="300" tween="cubic" easing="in">WindowClose</animation>
    
    <controls>
        <!-- ============================================================ -->
        <!-- MODERN: Fullwidth bar přilepený k horní hraně obrazovky      -->
        <!-- Netflix-style "Up Next" notification                          -->
        <!-- ============================================================ -->
        <control type="group">
            <left>0</left>
            <top>0</top>
            <width>1920</width>
            <height>120</height>
            <animation effect="fade" start="0" end="100" time="500" delay="200">WindowOpen</animation>
            <!-- Rozšíření na fullscreen při zobrazení hry -->
            <animation effect="conditional" start="120" end="1080" time="400" tween="cubic" easing="out" condition="String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)">Height</animation>
            
            <!-- Pozadí - tmavý gradient shora dolů -->
            <control type="image">
                <left>0</left>
                <top>0</top>
                <width>1920</width>
                <height>120</height>
                <texture colordiffuse="B0080810">special://home/addons/plugin.video.milionar/resources/media/white.png</texture>
                <!-- Rozšíření pozadí při zobrazení hry -->
                <animation effect="conditional" start="120" end="1080" time="400" tween="cubic" easing="out" condition="String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)">Height</animation>
            </control>
            
            <!-- Gradient fade na spodní hraně (přechod do obsahu) -->
            <control type="image">
                <left>0</left>
                <top>100</top>
                <width>1920</width>
                <height>40</height>
                <texture colordiffuse="B0080810">special://home/addons/plugin.video.milionar/resources/media/gradient_bottom.png</texture>
                <!-- Skrýt gradient při fullscreen hře -->
                <visible>!String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)</visible>
            </control>
            
            <!-- Tenká linka na spodní hraně -->
            <control type="image">
                <left>60</left>
                <top>115</top>
                <width>1800</width>
                <height>1</height>
                <texture colordiffuse="0DFFFFFF">special://home/addons/plugin.video.milionar/resources/media/white.png</texture>
                <visible>!String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)</visible>
            </control>
            
            <!-- ======================================== -->
            <!-- HLAVNÍ NOTIFIKAČNÍ ŘÁDEK (horizontální)  -->
            <!-- ======================================== -->
            <control type="group">
                <left>60</left>
                <top>15</top>
                <width>1800</width>
                <height>90</height>
                
                <!-- Náhled epizody - 16:9 formát -->
                <control type="image">
                    <left>0</left>
                    <top>5</top>
                    <width>130</width>
                    <height>73</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 -->
                <control type="image">
                    <left>0</left>
                    <top>5</top>
                    <width>130</width>
                    <height>73</height>
                    <texture diffuse="special://home/addons/plugin.video.milionar/resources/media/still_mask_rounded.png" colordiffuse="33FFFFFF">special://home/addons/plugin.video.milionar/resources/media/white.png</texture>
                    <visible>String.IsEmpty(Window.Property(WCS.Autoplay.NextEpisode.Thumb))</visible>
                </control>
                
                <!-- Metadata sekce -->
                <control type="group">
                    <left>150</left>
                    <top>0</top>
                    <width>700</width>
                    <height>90</height>
                    
                    <!-- "Další epizoda:" -->
                    <control type="label">
                        <left>0</left>
                        <top>2</top>
                        <width>700</width>
                        <height>20</height>
                        <font>font10</font>
                        <textcolor>FF888888</textcolor>
                        <label>Další epizoda:</label>
                        <align>left</align>
                    </control>
                    
                    <!-- Název seriálu -->
                    <control type="label">
                        <left>0</left>
                        <top>22</top>
                        <width>500</width>
                        <height>28</height>
                        <font>font13</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.SeriesTitle)]</label>
                        <align>left</align>
                        <scroll>true</scroll>
                        <scrollsuffix>  •  </scrollsuffix>
                        <scrollspeed>30</scrollspeed>
                    </control>
                    
                    <!-- Season/Episode + Rating + Year (inline) -->
                    <control type="label" id="211">
                        <left>0</left>
                        <top>52</top>
                        <width>auto</width>
                        <height>22</height>
                        <font>font13</font>
                        <textcolor>FF6C5CE7</textcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.SeasonEpisode)]</label>
                        <align>left</align>
                    </control>
                    
                    <control type="label" id="212">
                        <left>92</left>
                        <top>52</top>
                        <width>auto</width>
                        <height>22</height>
                        <font>font10</font>
                        <textcolor>FFFFFF00</textcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.RatingOnly)]</label>
                        <align>left</align>
                        <visible>!String.IsEmpty(Window.Property(WCS.Autoplay.NextEpisode.RatingOnly))</visible>
                    </control>
                    
                    <control type="label" id="213">
                        <left>190</left>
                        <top>52</top>
                        <width>auto</width>
                        <height>22</height>
                        <font>font10</font>
                        <textcolor>FF87CEEB</textcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.YearOnly)]</label>
                        <align>left</align>
                        <visible>!String.IsEmpty(Window.Property(WCS.Autoplay.NextEpisode.YearOnly))</visible>
                    </control>
                    
                    <!-- Název epizody -->
                    <control type="label">
                        <left>260</left>
                        <top>52</top>
                        <width>440</width>
                        <height>22</height>
                        <font>font13</font>
                        <textcolor>FFAAAAAA</textcolor>
                        <label>$INFO[Window.Property(WCS.Autoplay.NextEpisode.Title)]</label>
                        <align>left</align>
                        <scroll>true</scroll>
                        <scrollsuffix>  •  </scrollsuffix>
                        <scrollspeed>30</scrollspeed>
                    </control>
                </control>
                
                <!-- Progress bar (vertikálně vycentrovaný) -->
                <control type="progress" id="105">
                    <left>870</left>
                    <top>36</top>
                    <width>300</width>
                    <height>6</height>
                    <texturebg colordiffuse="25808080">special://home/addons/plugin.video.milionar/resources/media/white.png</texturebg>
                    <lefttexture>-</lefttexture>
                    <midtexture colordiffuse="FF6C5CE7">special://home/addons/plugin.video.milionar/resources/media/white.png</midtexture>
                    <righttexture>-</righttexture>
                    <info>Window.Property(WCS.Autoplay.Progress)</info>
                </control>
            <!-- Akční tlačítka (pill-shaped list) -->
            <control type="list" id="103">
                <left>23</left>
                <top>165</top>
                <width>435</width>
                <height>50</height>
                <orientation>horizontal</orientation>
                <ondown>501</ondown>
                <onup>noop</onup>
                <itemlayout height="45" width="145">
                    <control type="image">
                        <left>5</left>
                        <top>0</top>
                        <width>135</width>
                        <height>45</height>
                        <texture 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>135</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="145">
                    <!-- 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>135</width>
                            <height>45</height>
                            <texture 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>135</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>135</width>
                            <height>45</height>
                            <texture 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>135</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>
            </control>
            
            <!-- ============================================================ -->
            <!-- HERNÍ SEKCE - Fullscreen rozbalení                           -->
            <!-- ============================================================ -->
            <control type="group">
                <left>0</left>
                <top>125</top>
                <width>1920</width>
                <height>955</height>
                <visible>String.IsEqual(Window.Property(WCS.Autoplay.ShowGame),true)</visible>
                <animation effect="fade" start="0" end="100" time="300" delay="200">Visible</animation>
                <animation effect="fade" start="100" end="0" time="200">Hidden</animation>
                
                <!-- Herní text oblast - vycentrovaná, široká -->
                <control type="textbox" id="200">
                    <left>200</left>
                    <top>30</top>
                    <width>1520</width>
                    <height>730</height>
                    <font>font13</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 -->
                <control type="scrollbar" id="201">
                    <left>1740</left>
                    <top>30</top>
                    <width>15</width>
                    <height>730</height>
                    <orientation>vertical</orientation>
                    <showonepage>false</showonepage>
                    <onleft>301</onleft>
                    <onup>103</onup>
                    <ondown>301</ondown>
                </control>
                
                <!-- Herní tlačítka - 2x2 grid, vycentrovaný -->
                <control type="group">
                    <left>200</left>
                    <top>780</top>
                    <width>1520</width>
                    <height>150</height>
                    
                    <!-- Řádek 1 -->
                    <control type="button" id="301">
                        <left>0</left>
                        <top>0</top>
                        <width>740</width>
                        <height>45</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="FF6C5CE7">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>303</ondown>
                        <onleft>301</onleft>
                        <onright>302</onright>
                    </control>
                    
                    <control type="button" id="302">
                        <left>780</left>
                        <top>0</top>
                        <width>740</width>
                        <height>45</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="FF00D4AA">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>304</ondown>
                        <onleft>301</onleft>
                        <onright>201</onright>
                    </control>
                    
                    <!-- Řádek 2 -->
                    <control type="button" id="303">
                        <left>0</left>
                        <top>55</top>
                        <width>740</width>
                        <height>45</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="FFFF9F40">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>303</onleft>
                        <onright>304</onright>
                    </control>
                    
                    <control type="button" id="304">
                        <left>780</left>
                        <top>55</top>
                        <width>740</width>
                        <height>45</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="FFEF5350">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>
                </control>
            </control>
            
        </control>
    </controls>
</window>