/* ========== Базовые сбросы и шрифты ========== */

html {
    /* Тянем на всю высоту устройства */
    height: -webkit-fill-available;
    margin: 0;
    padding: 0;
}
body, h1, p {
    margin: 0;
    padding: 0;
    font-family: 'Press Start 2P', cursive;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    
    /* Убираем background-attachment fixed для Safari */
    background-color: #008080;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent),
        url('images/fon1.png');
    
    background-size: 10px 10px, 10px 10px, cover;
    background-position: center center;
    background-repeat: repeat, repeat, no-repeat;
    
    /* Убираем fixed для Safari */
    background-attachment: scroll, scroll, scroll;
    
    padding: env(safe-area-inset-top) 15px env(safe-area-inset-bottom) 15px;
    box-sizing: border-box;
    
    font-family: 'Press Start 2P', cursive;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Для десктопа оставляем fixed */
@media (min-width: 769px) {
    body {
        background-attachment: fixed, fixed, fixed;
    }
}

a, button {
    cursor: url('https://cur.cursors-4u.net/games/gam-4/gam386.cur'), pointer;
}

/* ========== Ретро-эффект сканирования ========== */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}

/* ========== Основные контейнеры ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ========== Окна (общий стиль) ========== */
.window-main,
.footer,
.cta-section {
    background-color: white;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
    border-style: outset;
    border: 15px solid #6280A9;
    border-top: 40px solid #6280A9;
    margin: 40px 0;
}

.window-main.tabs-window {
    border-top: 10px solid #6280A9;
}

/* ========== ПОЛНЫЙ ФИКС ОКНА ИНФА.TXT ========== */
.info-map-block {
    display: flex;
    flex-direction: column;
    /* 1. Устанавливаем ширину 1200px */
    width: 1200px !important; 
    
    /* 2. Убираем или увеличиваем max-width, чтобы он не ограничивал блок */
    max-width: 100%; /* Позволит блоку быть 1200px, но сжиматься на маленьких экранах */
    /* ИЛИ: max-width: 1200px; */
    
    margin: 20px auto;
    height: auto !important;
    min-height: 200px;
    box-sizing: border-box !important;
}


/* Контейнер с текстом */
.info-text-container {
    padding: 25px;
    background: #fff;
    flex: 1;
    box-sizing: border-box;
    overflow-y: visible; /* Чтобы текст не обрезался */
}

/* Сетка ивентов */
.events-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    font-size: 14px;
    font-style: none;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */


/* Фикс для совсем маленьких экранов */
@media screen and (max-width: 480px) {
    .info-map-block {
        border-width: 5px !important;
        border-top-width: 30px !important;
    }
    
    .events-grid {
        font-size: 12px;
    }
}

/* ========== Логотип ========== */
.logo-window {
    position: relative;
    margin-bottom: 20px;
    margin-top: 5px;
    padding: 0;
    background-color: white;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
    border-style: outset;
    border: 15px solid #6280A9;
    border-top: 40px solid #6280A9;
}

.logo-content {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    width: 100%;
    line-height: 0;
}

.logo-content img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
}

.logo-window .logo-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    box-sizing: border-box;
}

/* ========== Заголовки окон ========== */
.window-title {
    position: absolute;
    top: -25px;
    left: -8px;
    padding: 0 10px;
    color: white;
    font-size: 18px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

/* ========== КНОПКИ УПРАВЛЕНИЯ ОКНОМ ========== */
.window-main,
.logo-window,
.tabs-window {
    position: relative;
}

.window-controls {
    position: absolute;
    top: -25px;
    right: 1px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.btn-pixel {
    width: 14px;
    height: 14px;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-pixel:hover {
    transform: scale(1.1);
}

.minimize::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: -35px;
    width: 20px;
    height: 4px;
    background-color: white;
}

.minimize::before {
    content: '';
    position: absolute;
    top: -11px;
    bottom: -9px;
    left: -38px;
    right: 24px;
    background-color: transparent;
    cursor: pointer;
    z-index: 1;
}

.maximize::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -21px;
    width: 12px;
    height: 12px;
    border: 4px solid white;
}

.close::before,
.close::after {
    content: "";
    position: absolute;
    top: 4px;
    left: -7px;
    width: 24px;
    height: 4px;
    background-color: white;
}

.close::before {
    transform: rotate(45deg);
}

.close::after {
    transform: rotate(-45deg);
}

/* ========== Блок с картой и инфо ========== */
.info-map-block {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    height: 400px;
}

.info-text {
    flex: 1;
    padding: 40px;
    min-width: 300px;
    color: black;
}

.info-text h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.info-text-container h2 {
    font-size: 16x;
}

.info-stats {
    font-size: 12px;
}

p {
    font-size: 12px;
    line-height: 1.6;
}

.map-container {
    flex: 1;
    min-width: 300px;
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

/* ========== Вкладки ========== */
.tabs-header {
    display: flex;
    flex-wrap: wrap;
    background: #6280A9;
    gap: 8px;
}

.tab-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 10px 15px;
    border: none;
    background: #496791;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: inset -2px -2px 0px rgba(0,0,0,0.3);
}

.tab-button.active {
    background-color: white;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    color: #6280A9;
    box-shadow: 4px -4px 0px rgba(0,0,0,0.1);
}

.tab-display {
    padding: 10px;
    background-color: white;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tab-pane {
    display: none;
    width: 100%;
    text-align: center;
}

.tab-pane.active {
    display: block;
}

.tab-pane img {
    max-width: 100%;
    height: auto;
    border: 5px solid #6280A9;
    display: block;
    margin: 0 auto;
}

/* ========== Кнопки YES/NO ========== */
.cta-section {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 27px;
}

.buttons-group {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 500px;
}

.huge-button {
    flex: 1;
    max-width: 45%;
    text-decoration: none;
    display: inline-block;
    font-family: 'Press Start 2P', cursive;
    font-size: 30px;
    color: white;
    padding: 27px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    min-width: max-content;
    box-shadow: 0px 8px 0px #496791;
    position: relative;
    top: 0;
    transition: all 0.1s;
}

.btn-yes {
    background-color: #6280A9;
}

.btn-no {
    background-color: #a96262;
    box-shadow: 0px 8px 0px #7a4343;
}

.huge-button:hover {
    top: -2px;
}

.btn-yes:hover {
    background-color: #85a2cc;
    box-shadow: 0px 10px 0px #496791;
}

.btn-no:hover {
    background-color: #bf7373;
    box-shadow: 0px 10px 0px #7a4343;
}

.huge-button:active {
    top: 6px !important;
    box-shadow: 0px 2px 0px #333 !important;
}

/* ========== Футер ========== */
.footer {
    position: relative;
    padding: 27px;
    margin-bottom: 5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 100px;
    align-items: center;
}

.footer-links p {
    font-size: 24px;
    font-family: 'Press Start 2P', cursive;
    color: #6280A9;
    margin: 0;
}

.footer-links a {
    color: #496791;
    text-decoration: underline;
    word-break: break-all;
}

.footer-address p {
    font-size: 16px;
    font-family: 'Press Start 2P', cursive;
    color: #496791;
    text-align: center;
}

.pixel-line {
    height: 4px;
    background-color: #6280A9;
    margin: 10px 0;
    width: 100%;
    opacity: 0.3;
}

/* ========== Боковая панель ========== */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0; /* Растягиваем до самого низа */
    width: 80px;
    height: 100dvh; /* Динамическая высота для мобилок */
    min-height: -webkit-fill-available; /* Хак специально для Safari */
    z-index: 10001;
    transform: none !important;
    will-change: auto !important;
    pointer-events: none;
}

/* Сам сайдбар */
.taskbar-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0; /* Растягиваем до самого низа */
    width: 80px;
    height: 100dvh; /* Динамическая высота */
    min-height: -webkit-fill-available; /* Хак для Safari */
    
    /* Ниже оставляешь все свои текущие стили без изменений: */
    background-color: #ffffff;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    background-repeat: repeat;
    border-right: 10px solid #6280A9;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

/* Добавляем дополнительный слой для гарантии белого фона */
.taskbar-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    z-index: -1;
    pointer-events: none;
}

/* Для мобильных устройств */
@media screen and (max-width: 768px) {
    .taskbar-left {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background-color: #ffffff;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    }
    
    .taskbar-left.active {
        transform: translateX(0);
    }
    
    /* Форсируем фон при активном состоянии */
    .taskbar-left.active::after {
        background-color: #ffffff;
    }
}

.custom-logo {
    width: 70px;
    height: 70px;
    object-fit: cover;
    image-rendering: auto;
}

.icon-link {
    transition: transform 0.3s ease;
}

.icon-link:hover {
    transform: scale(1.1);
}

.icon-link img {
    width: 70px;
    height: 70px;
    padding-bottom: 20px;
}

.minimized-icon-item {
    display: none;
    width: 60px;
    height: 60px;
    padding-bottom: 20px;
    justify-content: center;
    align-items: center;
}

.minimized-icon-item.visible {
    display: flex;
    animation: iconPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.minimized-icon-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.minimized-icon-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    display: block;
}

.mobile-arrow-btn {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: #6280A9;
    width: 30px;
    height: 60px;
    border: 2px solid white;
    border-left: none;
    z-index: 10002;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.arrow-icon {
    color: white;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s;
}

.taskbar-left.active ~ .mobile-arrow-btn .arrow-icon {
    transform: rotate(180deg);
}

/* ========== Стили форм регистрации (общие) ========== */
.rega-title {
    position: absolute;
    top: -38px;
    left: 1px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 18px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.8);
}

.form-group label {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #496791;
    margin-bottom: 2px;
    margin-top: 14px;
    display: block;
}

.rega-input {
    width: 100%;
    border: 3px solid #6280A9;
    padding: 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    background-color: white;
    box-sizing: border-box;
    outline: none;
    border-radius: 0;
}

.rega-btn {
    display: inline-block;
    width: 100%;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 30px;
    color: white;
    padding: 25px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    background-color: #6280A9;
    box-shadow: 0px 8px 0px #496791;
    position: relative;
    top: 0;
    transition: all 0.1s;
    border-radius: 0;
}

.rega-btn:hover {
    top: -2px;
    background-color: #85a2cc;
    box-shadow: 0px 10px 0px #496791;
}

.rega-btn:active {
    top: 6px !important;
    background-color: #496791 !important;
    box-shadow: 0px 2px 0px #333 !important;
}

/* ========== Проводник ========== */
.explorer-content {
    border: 2px inset #ffffff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    box-sizing: border-box;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    align-content: start;
    flex-grow: 1;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
    padding: 5px;
}



.folder-item img {
    width: 100px;
    height: 100px;
    margin-bottom: 5px;
}

.folder-item span {
    font-size: 12px;
    color: #000;
}

.folder-grid.gogo {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    outline: none;
}

.folder-grid.gogo .folder-item {
    cursor: default !important;
    transform: none !important;
    outline: none !important;
    border: none !important;
}

.folder-grid.gogo .folder-item:hover,
.folder-grid.gogo .folder-item:hover div,
.folder-grid.gogo .folder-item:hover img {
    transform: none !important;
    filter: none !important;
    outline: none !important;
}

.folder-grid.gogo .folder-item div,
.folder-grid.gogo .photo-wrapper {
    height: 250px !important;
    
    transition: none !important;
    transform: none !important;
}

.back-btn {
    background-color: #6280A9;
    color: white;
    font-family: 'Press Start 2P';
    font-size: 16px;
    margin-bottom: 15px;
    padding: 5px;
    cursor: pointer;
    box-shadow: 0px 4px 0px #496791;
}

.back-btn:active {
    top: 4px !important;
    box-shadow: 0px 2px 0px #333 !important;
}

.back-btn:hover {
    background-color: #85a2cc;
}

.folder-view {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.image-wrapper img {
    max-width: 100%;
    border: 2px solid #000;
}

.image-label {
    display: block;
    margin-top: 10px;
    font-size: 8px;
    color: #555;
}

/* ========== Блокнот ========== */
.notepad-window {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    width: 100%;
}

.notepad-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 40px;
}

#notepad-content {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    line-height: 1.8;
    resize: none;
    background: #fff;
    color: #000;
    box-sizing: border-box;
}

/* ========== BSOD ========== */
.bsod {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0000aa;
    color: #ffffff;
    font-family: 'Press Start 2P', cursive;
    padding: 50px;
    z-index: 99999;
    cursor: none;
    overflow-y: auto;
}

.bsod-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.6;
}

.bsod-content p {
    margin-bottom: 20px;
}

/* ========== ПОПАП ОШИБКИ ========== */
.error-popup {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 40% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 3000;
    width: 320px;
    box-shadow: 2px 2px 0px #000;
}

.error-popup .window-main {
    margin: 0;
    background-color: white;
}

.error-body {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 4px;
}

.error-icon {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.error-text-container {
    display: flex;
    flex-direction: column;
}

.error-message {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    margin: 0;
}

.error-ok-btn {
    background-color: #6280A9;
    color: white;
    font-family: 'Press Start 2P';
    font-size: 16px;
    margin-bottom: 10px;
    margin-top: 15px;
    padding: 5px;
    cursor: pointer;
    box-shadow: 0px 4px 0px #496791;
    border: none;
    text-align: center;
}

.error-ok-btn:active {
    top: 4px;
    position: relative;
    box-shadow: 0px 2px 0px #333;
}

/* Фикс центрирования итогового окна после регистрации */
#success-window {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 30000 !important;
    max-width: calc(100vw - 20px);
}

/* ========== Утилиты ========== */
.calc-btn {
    height: 60px;
    font-size: 16px !important;
    background-color: #6280A9 !important;
    color: white !important;
    border: 3px outset white !important;
    cursor: pointer;
}

.calc-btn:active {
    border-style: inset !important;
}

.tuda {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #496791;
    margin-bottom: 2px;
    margin-top: 14px;
    display: block;
}

.payment-card {
    border: 3px solid #6280A9;
    border-style: inset;
    background: linear-gradient(135deg, #f6fbff 0%, #e4eef8 100%);
    padding: 14px;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #b9cde4;
}

.payment-row:last-of-type {
    margin-bottom: 8px;
}

.payment-bank {
    color: #32537f;
    font-size: 12px;
}

.payment-number {
    color: #1b2e48;
    font-size: 12px;
    text-align: right;
}

.payment-owner {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px dashed #8ca9cb;
    color: #32537f;
    font-size: 11px;
}

.feedback-window {
    position: relative;
    padding: 24px;
}

.feedback-content h2 {
    font-size: 20px;
    color: #6280A9;
    margin: 0 0 15px;
}

.feedback-content p {
    color: #35557f;
    margin-bottom: 14px;
}

.feedback-textarea {
    min-height: 140px;
    resize: vertical;
}

.feedback-actions {
    margin-top: 14px;
}

.feedback-btn {
    font-size: 18px;
    padding: 16px;
}

.feedback-status {
    margin-top: 12px;
    font-size: 10px;
    color: #496791;
}

.minimizing-to-sidebar {
    pointer-events: none;
    transform: scale(0.1) translateX(-500px);
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

/* ========== Анимации ========== */
@keyframes iconPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(100px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== ФИКСАЦИЯ ФОНА ========== */
html, body {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    position: relative;
}

body {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
    position: relative;
}

body > * {
    position: relative;
    z-index: 1;
}

.folder-view {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10050;
    background-color: white;
    border: 15px solid #6280A9;
    border-top: 40px solid #6280A9;
    padding: 20px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
}

body.folder-view-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10049;
    pointer-events: none;
}

body.folder-view-open {
    overflow: hidden !important;
    position: fixed !important; 
    width: 100% !important; 
    height: 100% !important;
}

.folder-view-close {
    position: absolute;
    top: -35px;
    right: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: #6280A9;
    border: 2px solid white;
}

.folder-view-close::before,
.folder-view-close::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 5px;
    width: 18px;
    height: 3px;
    background-color: white;
}

.folder-view-close::before {
    transform: rotate(45deg);
}

.folder-view-close::after {
    transform: rotate(-45deg);
}

.container,
.window-main,
.footer,
.cta-section,
.logo-window {
    transform: none !important;
    backface-visibility: hidden;
}

* {
    backface-visibility: hidden;
}

/* ========== ОКНО РЕГИСТРАЦИИ ========== */
#registration-container {
    display: none;
    width: 100%;
}

#registration-container.show {
    display: flex;
    justify-content: center;
}

#registration-container .registration-window {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 27px;
    box-sizing: border-box;
    background-color: white;
    background-image: linear-gradient(0deg, transparent 24%, rgba(98, 128, 169, .1) 25%, rgba(98, 128, 169, .1) 26%, transparent 27%, transparent 74%, rgba(98, 128, 169, .1) 75%, rgba(98, 128, 169, .1) 76%, transparent 77%, transparent);
    background-size: 10px 10px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
    border-style: outset;
    border: 15px solid #6280A9;
    border-top: 40px solid #6280A9;
}

#registration-container .rega-title {
    position: absolute;
    top: -38px;
    left: 1px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 18px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

#registration-container .window-controls {
    position: absolute;
    top: -25px;
    right: 1px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.taskbar-left.active ~ .mobile-arrow-btn {
    display: none;
}


/* ==================== PIXEL-PERFECT WINDOWS 98 PRELOAD ==================== */
.win98-preload-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 9999999;
    /* Убираем все, что вызывает баги */
    transform: none !important;
    will-change: auto !important;
}

.win98-preload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000; /* Чистый черный вместо #000 */
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: #000000;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-sizing: border-box;
}

/* Форсируем черный фон через дополнительный псевдоэлемент */
.win98-preload::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: -1;
}
.win98-content {
    text-align: center;
    color: white;
    font-family: 'Press Start 2P', cursive;
    user-select: none;
    width: min(90vw, 900px);
}

.win98-logo-wrap {
    padding: 10px 0 20px;
}

.win98-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 55px;
}

.win-flag {
    width: 92px;
    height: 72px;
    border: 5px solid #fff;
    position: relative;
    background: #000080;
    box-shadow: 3px 3px 0 #000;
}

.flag-top {
    position: absolute;
    top: 0; left: 0; right: 0; height: 36px;
    background: linear-gradient(#e30613, #c80000);
}

.flag-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 36px;
    background: #fff;
}

.window-panes {
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    background: #000080;
}

.pane {
    background: #fff;
    box-shadow: inset 2px 2px 0 #000080;
}

.win-text {
    font-size: 44px;
    line-height: 1;
    text-align: left;
    text-shadow: 4px 4px 0 #000;
}

.win98-subtitle {
    margin-top: -25px;
    font-size: 12px;
    color: #b7b7b7;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.win98-divider {
    width: 100%;
    height: 2px;
    background: #6f6f6f;
    margin: 0 auto 35px;
}

.microsoft {
    font-size: 29px;
    letter-spacing: 3px;
}

.windows {
    font-size: 54px;
    font-weight: bold;
}

.version {
    font-size: 39px;
    vertical-align: super;
    margin-left: 6px;
}

.reg {
    font-size: 22px;
    vertical-align: super;
    margin-left: 2px;
}

.win98-progress-container {
    width: min(560px, 92%);
    height: 32px;
    margin: 0 auto 32px;
}

.win98-progress-track {
    width: 100%;
    height: 100%;
    border: 3px solid #c0c0c0;
    border-top-color: #808080;
    border-left-color: #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
    background: #c0c0c0;
    box-sizing: border-box;
    padding: 2px;
    overflow: hidden;
}

.win98-progress-bar {
    height: 100%;
    width: 100%;
    background: transparent;
    position: relative;
}

.win98-progress-chunks {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 180px;
    display: flex;
    gap: 4px;
    transform: translateX(-220px);
}

.win98-progress-chunk {
    width: 18px;
    height: 100%;
    background: #0016b8;
    box-shadow: inset 0 0 0 1px #3f58ff;
}

.win98-progress-chunks.done .win98-progress-chunk {
    background: #0b2adb;
    box-shadow: inset 0 0 0 1px #85a1ff;
}

.win98-status {
    font-size: 13px;
    min-height: 26px;
    text-shadow: 2px 2px 0 #111;
    letter-spacing: 0.7px;
    color: #d9d9d9;
}

.win98-hint {
    margin-top: 16px;
    font-size: 10px;
    color: #8f8f8f;
    letter-spacing: 0.5px;
}

/* ========== АДАПТАЦИЯ ========== */

/* Планшеты */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .buttons-group {
        min-width: auto;
        gap: 30px;
    }
    
    .huge-button {
        font-size: 24px;
        padding: 20px;
        max-width: 48%;
    }
    
    .footer-links {
        gap: 50px;
    }
    
    .footer-links p {
        font-size: 18px;
    }
}

/* Мобильные (до 768px) */
@media (max-width: 768px) {
    body {
        padding: 0 10px 10px 10px !important;
        background-attachment: scroll;
    }
    
    .taskbar-left {
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
        width: 70px;
    }
    
    .taskbar-left.active {
        transform: translateX(0);
    }
    
    .mobile-arrow-btn {
        display: flex;
        width: 28px;
        height: 50px;
    }
    
    .arrow-icon {
        font-size: 16px;
    }
    
    .icon-link img,
    .minimized-icon-item {
        width: 45px;
        height: 45px;
    }
    
    .custom-logo {
        width: 50px;
        height: 50px;
    }
    
    .window-main,
    .footer,
    .cta-section,
    .logo-window,
    #registration-container .registration-window {
        border-width: 8px;
        border-top-width: 35px;
        margin: 20px 0;
    }
    
    .window-title {
        font-size: 12px;
        top: -23px;
        left: -5px;
    }
    
    .window-controls {
        top: -22px;
        right: 0px;
        gap: 5px;
        transform: scale(0.9);
    }
    
    .info-map-block {
        flex-direction: column;
        height: auto;
        width: 280px;
    }
    
    .map-container {
        min-width: 100%;
        height: 250px;
    }
    
    .info-text {
        padding: 20px;
    }
    
    .info-text h2 {
        font-size: 14px;
    }
    
    p {
        font-size: 10px;
    }
    
    .tabs-header {
        gap: 4px;
    }
    
    .tab-button {
        font-size: 8px;
        padding: 8px 10px;
    }
    
    .tab-display {
        min-height: 200px;
        padding: 8px;
    }
    
    .buttons-group {
        flex-direction: row;
        min-width: auto;
        gap: 15px;
        width: 100%;
    }
    
    .huge-button {
        max-width: 48%;
        width: auto;
        flex: 1;
        font-size: 16px;
        padding: 15px 10px;
        white-space: nowrap;
    }
    
    .cta-section {
        padding: 20px;
    }
    
    .footer {
        padding: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-links p {
        font-size: 18px !important;
        text-align: center;
    }
    
    .footer-address p {
        font-size: 14px !important;
    }
    
    #registration-container {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    #registration-container .registration-window {
        max-width: 100%;
        margin: 20px 0;
        padding: 20px;
    }
    
    #registration-container .rega-title {
        font-size: 12px;
        top: -28px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .rega-input {
        font-size: 12px;
        padding: 10px;
    }
    
    .rega-btn {
        font-size: 20px;
        padding: 15px;
    }
    
    .explorer-content {
        min-height: 300px;
        padding: 10px;
    }
    
    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .folder-item img {
        width: 60px;
        height: 60px;
    }
    
    .folder-item span {
        font-size: 8px;
    }
    
    .folder-grid.gogo {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 10px;
    }
    
    .folder-grid.gogo .folder-item div,
    .folder-grid.gogo .photo-wrapper {
        height: 150px !important;
    }

    .payment-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-number {
        text-align: left;
        word-break: break-word;
    }

    .feedback-content h2 {
        font-size: 15px;
    }

    .feedback-btn {
        font-size: 14px;
        padding: 12px;
    }
    
    .back-btn {
        font-size: 12px;
        padding: 8px;
    }
    
    .notepad-body {
        padding: 20px;
    }
    
    #notepad-content {
        font-size: 10px;
    }
    
    .bsod {
        padding: 20px;
    }
    
    .bsod-content p {
        font-size: 10px;
    }
    
    .error-popup {
        width: 280px;
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 40% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 3000;
    box-shadow: 2px 2px 0px #000;
}
    
    .error-message {
        font-size: 10px;
    }
    
    .error-ok-btn {
        font-size: 12px;
        padding: 8px;
    }
    
    .error-icon {
        width: 32px;
        height: 32px;
    }
    
    .folder-view {
        width: 95%;
        padding: 15px;
        border-width: 8px;
        border-top-width: 35px;
    }

    .win98-logo {
        gap: 16px;
        margin-bottom: 36px;
    }

    .win-flag {
        width: 72px;
        height: 58px;
        border-width: 4px;
    }

    .win-text {
        font-size: 26px;
    }

    .microsoft {
        font-size: 15px;
    }

    .windows {
        font-size: 32px;
    }

    .version {
        font-size: 25px;
    }

    .win98-subtitle {
        margin-top: -12px;
        font-size: 9px;
    }

    .win98-status {
        font-size: 10px;
        min-height: 20px;
    }
}

/* Телефоны (до 480px) */
@media (max-width: 480px) {
    body {
        padding: 0 5px 10px 5px !important;
    }
    
    .window-main,
    .footer,
    .cta-section,
    .logo-window,
    #registration-container .registration-window {
        border-width: 5px;
        border-top-width: 30px;
        margin: 15px 0;
    }
    
    .window-title {
        font-size: 9px;
        top: -21px;
        left: -3px;
    }
    
    .window-controls {
        top: -20px;
        transform: scale(0.7);
        right: -3px;
    }

    .tuda {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #496791;
    margin-bottom: 2px;
    margin-top: 14px;
    display: block;
}
    
    .maximize {
        display: none;
    }
    
    .map-container {
        height: 200px;
    }
    
    .info-text {
        padding: 15px;
    }

    .info-text-container h2 {
        font-size: 14x;
    }
    
    .info-text h2 {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    p {
        font-size: 8px;
    }
    
    .tab-button {
        font-size: 7px;
        padding: 6px 8px;
    }
    
    .buttons-group {
        gap: 10px;
    }
    
    .huge-button {
        font-size: 12px;
        padding: 12px 8px;
    }
    
    .footer-links p {
        font-size: 16px !important;
    }
    
    .footer-address p {
        font-size: 12px !important;
    }
    
    .pixel-line {
        margin: 5px 0;
    }
    
    #registration-container .registration-window {
        margin: 15px 0;
        padding: 15px;
    }
    
    #registration-container .rega-title {
        font-size: 9px;
        top: -24px;
    }
    
    .form-group label {
        font-size: 9px;
        margin-top: 10px;
    }
    
    .rega-input {
        font-size: 10px;
        padding: 8px;
    }
    
    .rega-btn {
        font-size: 16px;
        padding: 12px;
    }
    
    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .folder-item img {
        width: 50px;
        height: 50px;
    }
    
    .folder-item span {
        font-size: 7px;
    }
    
    .folder-grid.gogo {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .folder-grid.gogo .folder-item div,
    .folder-grid.gogo .photo-wrapper {
        height: 180px !important;
    }

    .payment-card {
        padding: 10px;
    }

    .payment-bank,
    .payment-number {
        font-size: 10px;
    }

    .payment-owner {
        font-size: 9px;
    }

    .feedback-content h2 {
        font-size: 12px;
    }

    .feedback-textarea {
        min-height: 110px;
    }

    .feedback-btn {
        font-size: 11px;
        padding: 10px;
    }
    
    .notepad-body {
        padding: 15px;
    }
    
    .bsod {
        padding: 15px;
    }
    
    .bsod-content p {
        font-size: 8px;
        line-height: 1.4;
    }
    
    .error-popup {
        width: 250px;
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 45% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 3000;
    width: 240px;
    box-shadow: 2px 2px 0px #000;

    }
    
    .error-body {
        padding: 15px;
        gap: 10px;
    }
    
    .error-message {
        font-size: 9px;
    }
    
    .error-ok-btn {
        font-size: 10px;
        margin-top: 10px;
    }
    
    .error-icon {
        width: 28px;
        height: 28px;
    }

    .win98-logo {
        gap: 12px;
        margin-bottom: 28px;
    }

    .win-flag {
        width: 56px;
        height: 44px;
        border-width: 3px;
    }

    .window-panes {
        top: 5px;
        left: 5px;
        right: 5px;
        bottom: 5px;
        gap: 2px;
    }

    .win-text {
        font-size: 20px;
    }

    .microsoft {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .windows {
        font-size: 23px;
    }

    .version {
        font-size: 17px;
    }

    .reg {
        font-size: 12px;
    }

    .win98-progress-container {
        height: 28px;
        margin-bottom: 20px;
    }

    .win98-status {
        font-size: 8px;
        line-height: 1.45;
        min-height: 28px;
    }

    .win98-hint {
        margin-top: 8px;
        font-size: 7px;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .window-title {
        font-size: 8px;
        top: -19px;
    }
    
    .tab-button {
        font-size: 6px;
        padding: 5px 6px;
    }
    
    .huge-button {
        font-size: 10px;
        padding: 10px 6px;
    }
    
    .footer-links p {
        font-size: 14px !important;
    }
    
    .footer-address p {
        font-size: 10px !important;
    }
    
    .rega-btn {
        font-size: 14px;
        padding: 10px;
    }
    
    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
}

/* Альбомная ориентация на телефонах */
@media (max-width: 768px) and (orientation: landscape) {
    .info-map-block {
        flex-direction: row;
        height: 300px;
    }
    
    .map-container {
        height: 300px;
    }
    
    .buttons-group {
        flex-direction: row;
    }
    
    .huge-button {
        font-size: 14px;
        padding: 10px;
    }
    
    .footer-links {
        flex-direction: row;
        gap: 30px;
    }
    
    .footer-links p {
        font-size: 14px !important;
    }
}

@media (min-width: 769px) {
    body {
        padding-left: 80px;
    }
}

.minimized-icon-item {
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    cursor: pointer;
}

.minimized-icon-item img {
    width: 60px;    
    height: 60px;
    object-fit: contain;
    image-rendering: pixelated; 
    transition: transform 0.1s;
}

.minimized-icon-item:hover img {
    transform: scale(1.01);
    filter: brightness(1.2);
}

@media screen and (max-width: 768px) {
   
    #sidebar {
        width: 60px !important; 
        padding: 10px 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }


    .minimized-icon-item {
        width: 50px !important; 
        height: 50px !important;
    }

    .minimized-icon-item img {
        width: 45px !important;
        height: 45px !important;
    }


    #sidebar .pixel-line {
        width: 80%; 

    }
    .start-btn img {
        width: 60px !important;
        height: 60px !important;
    }
}

.mobile-arrow-btn {
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Опционально: если хочешь, чтобы она еще и немного уезжала */
}

@media screen and (max-width: 768px) {
    #sidebar {
        /* ... твои старые стили ... */
        display: flex;
        flex-direction: column;
        max-height: 100vh; /* Ограничиваем высоту баром на весь экран */
        overflow: hidden;  /* Прячем лишнее, что выходит за границы самого бара */
    }

    #minimized-apps-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        
        /* ВКЛЮЧАЕМ СКРОЛЛ ТУТ */
        flex: 1;                /* Занимает всё свободное место */
        overflow-y: auto;       /* Включает вертикальную прокрутку */
        overflow-x: hidden;     /* Убираем горизонтальный скролл */
        width: 100%;
        padding: 10px 0;

        /* Скрываем стандартный некрасивый скроллбар, чтобы было эстетично */
        scrollbar-width: none;  /* Для Firefox */
        -ms-overflow-style: none; /* Для IE/Edge */
    }

    /* Скрываем скроллбар для Chrome/Safari */
    #minimized-apps-container::-webkit-scrollbar {
        display: none;
    }
}

body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

body.no-scroll,
body.no-scroll * {
    -webkit-overflow-scrolling: auto !important;
}

.win98-preload-wrapper  {
    touch-action: none;
}


@media screen and (max-width: 768px) {
    #sidebar {
        display: flex;
        flex-direction: column;
        max-height: 100dvh; 
        height: 100dvh;
        min-height: -webkit-fill-available;
        
        overflow: hidden; 
    }

    #minimized-apps-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        flex: 1;                
        overflow-y: auto;       
        overflow-x: hidden;     
        width: 100%;
        padding: 10px 0;
        scrollbar-width: none;  
        -ms-overflow-style: none; 
    }
}


/* Находим старый стиль и оборачиваем его */
@media (hover: hover) {
    .minimized-icon-item:hover {
        transform: scale(1.1); /* Твой текущий масштаб */
        filter: brightness(1.2);
    }
}

/* Для мобилок (где нет hover) принудительно отключаем трансформацию */
@media (hover: none) {
    .minimized-icon-item:hover {
        transform: none !important;
    }
}

@media (max-width: 480px) { 
    .form-group p {
        font-size: 9px; 
    }
}


/* Универсальный класс для анимации сворачивания */
.minimizing-to-sidebar {
    transform: scale(0.1) translateX(-1000px) !important;
    opacity: 0 !important;
    transition: transform 0.4s ease-in, opacity 0.3s ease !important;
    pointer-events: none;
}

/* Убедись, что у обычных окон есть transition для возвращения */
.window, .registration-window, .notepad-container, .window-vibe {
    transition: transform 0.4s ease-out, opacity 0.3s ease;
}

/* Базовое состояние для всех окон, чтобы они знали, как анимироваться */
.window, 
.window-main, 
.registration-window, 
.notepad-window, 
.info-map-block, 
#window-calc, 
.window-vibe {
    /* Плавный возврат: scale 1, прозрачность 1, смещение 0 */
    transition: transform 0.4s ease-out, opacity 0.3s ease !important;
    transform: scale(1) translateX(0);
    opacity: 1;
}

/* Состояние "в баре" (у тебя уже есть, просто убедись в translateX) */
.minimizing-to-sidebar {
    transform: scale(0.1) translateX(-1000px) !important;
    opacity: 0 !important;
    transition: transform 0.4s ease-in, opacity 0.3s ease !important;
    pointer-events: none;
}
