/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
   #wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("../wallpaperswide.com-windows-xp-original-wallpaper-1920x1080.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #3a6ea5;
    z-index: -1;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: transparent;
    overflow-x: hidden;
}

@font-face {
    font-family: "regular";
    src: url("../fonts/Rubik-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "regular", sans-serif;
}

.window {
    width: 100%;
    max-width: 900px;
}

.content {
    position: relative;
    display: flex;
    margin: 0 auto;
    background-color: transparent;
    width: min(900px, 95vw);
    min-height: 100vh;
    padding: 20px 20px 60px 20px; /* Отступ снизу под таскбар */
    box-sizing: border-box;
    justify-content: flex-start;
    align-items: center; 
    gap: 20px;
    flex-direction: column;
}

/* =========================================
   БЛОК С ИГРАМИ
   ========================================= */
.games {
    display: flex;                 
    align-items: center;           
    justify-content: center;      
    gap: 40px;                    
    padding: 40px;
    flex-wrap: wrap; /* Чтобы на телефонах элементы переносились */
}

/* Кассеты */
.VHSGames {
    display: grid;
    grid-template-columns: repeat(3, 125px);
    grid-auto-rows: 125px;
    align-content: center;
    gap: 8px;
}

.VHSGame {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.VHSGame:hover {
    filter: drop-shadow(0 0 4px white);
    transform: scale(1.15);
}

/* КОНТЕЙНЕР ТЕЛЕВИЗОРА (позиционирует гифку внутри себя) */
.tv-box {
    position: relative;
    width: 100%;
    max-width: 400px; /* Размер как в оригинале */
    flex-shrink: 0;
}

.GameTV {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
}

.GameplayGame {
    position: absolute;
    top: 42% !important; /* Поднимаем гифку вверх (было 50%) */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 77%; /* Чуть уменьшили, чтобы влезла в рамки экрана */
    height: auto;
}

.TVStatic {
    position: absolute;
    top: 42% !important; /* Поднимаем помехи вверх */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    width: 73%; 
    height: 54%; /* Подогнали под пропорции гифки */
}

/* =========================================
   НОВОСТИ И ССЫЛКИ
   ========================================= */
.newsAndLinks {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.NewsList {
    display: flex;
    flex-direction: column;
    gap: 5px;
    
    width: 100%;
    box-sizing: border-box;
    padding: 10px; /* Отступы от краев окна теперь тут */
}

.NewsTitle {
    display: flex;
    align-items: center; 
    justify-content: flex-start; 
    
    width: 100% !important; /* Жестко на всю ширину */
    box-sizing: border-box !important; /* Рамки и отступы внутри ширины */
    
    font-size: medium;
    padding: 8px 15px;
    height: 35px;
    
    color: black;
    text-decoration: none;
    
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background: linear-gradient(0deg, #808080 0%, #d8d8d8 100%);
}

.NewsTitle:hover {
    background: linear-gradient(0deg, #999999 0%, #e6e6e6 100%);
    cursor: pointer;
}

.NewsTitle:active {
    border-color: #808080 #dfdfdf #dfdfdf #808080;
    background: linear-gradient(180deg, #808080 0%, #d8d8d8 100%);
}

.LinkList {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 5px; 
    width: 100%;
    height: 140px;
    box-sizing: border-box;
    padding: 10px; 
    margin: 0px;
    justify-items: center; 
    align-items: center;
}

.LinkList a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.ButtonLinkInList {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; 
    filter: brightness(1);
    transform: scale(1);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.ButtonLinkInList:hover {
    filter: brightness(1.25);
    transform: scale(1.1);
}

/* =========================================
   ТАСКБАР
   ========================================= */
.taskbar {
    background: linear-gradient(to bottom, #245EDC 0%, #3f8cf3 9%, #245EDC 18%, #245EDC 92%, #1941A5 100%) center/cover no-repeat;
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 32px;
    border-radius: 5px 5px 0px 0px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    box-sizing: border-box;
    z-index: 1000;
}

.opened-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.open-tab {
    width: 150px !important;
    height: 24px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    /* ИСПРАВЛЕН ПУТЬ */
    background: url('/static/btn1.png') center center / cover no-repeat !important; 
    border-radius: 2px;
    font-family: calibri, monospace;
    font-size: 13px;
    color: #fff !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 8px !important;
    margin: 0 !important;
    cursor: pointer;
    line-height: 1 !important;
}

.open-tab:hover {
    /* ИСПРАВЛЕН ПУТЬ */
    background: url('/static/btn2.png') center center / cover no-repeat !important;
}

.open-tab.active {
    /* ИСПРАВЛЕН ПУТЬ */
    background: url('/static/btn3.png') center center / cover no-repeat !important;
}

.open-tab:hover {
    background: url(../static/btn2.png) center center / cover no-repeat !important;
}

.open-tab.active {
    background: url(../static/btn3.png) center center / cover no-repeat !important;
}

.open-tab img {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain !important;
    margin-right: 6px !important;
    display: block !important;
}

.open-tab span {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================
   МОБИЛЬНАЯ ВЕРСИЯ (< 850px)
   ========================================= */
@media screen and (max-width: 850px) {
    #wrapper {
        background-attachment: scroll;
    }

    .content {
        padding: 10px 10px 60px 10px;
    }

    .games {
        flex-direction: column; /* Кассеты и ТВ друг под другом */
        padding: 10px;
        gap: 20px;
    }

    .VHSGames {
        grid-template-columns: repeat(3, 90px); /* Уменьшаем кассеты */
        grid-auto-rows: 90px;
    }

    .tv-box {
        max-width: 320px; /* Уменьшаем телевизор */
        margin: 0 auto;
    }

    .newsAndLinks {
        flex-direction: column; /* Новости и ссылки друг под другом */
        gap: 10px;
    }

    .open-tab {
        width: 95px !important; /* Узкие кнопки таскбара */
        font-size: 11px !important;
        padding: 0 4px !important;
    }

    .open-tab img {
        width: 14px !important;
        height: 14px !important;
        margin-right: 4px !important;
    }
}