/* === ПОЛНЫЙ CSS ДЛЯ ПИВОВАРЕННОЙ ИГРЫ С 7 БИЗНЕС-УРОВНЯМИ === */

/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: auto;
    background-color: #f5f7fa;
    user-select: none;
    padding: 10px;
}

.screen {
    width: 100%;
    max-width: 900px;
    height: 95vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: absolute;
    padding: 12px 15px 5px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: auto;
    background: white;
}

.hidden { display: none !important; }

/* === ЭКРАНЫ === */
/* Стартовый экран */
#start-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 100;
    justify-content: flex-start;
    padding: 20px 15px;
}

.logo-container {
    margin: 10px auto 15px;
    width: 300px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.game-titles { margin-bottom: 15px; width: 100%; }

.game-title {
    font-size: 3.2rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: title-appear 1s ease-out;
}

.game-name {
    font-size: 2.5rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(to right, #ffd700, #ff8c00, #ff4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: name-appear 1.2s ease-out;
}

@keyframes title-appear {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes name-appear {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.welcome-text {
    font-size: 1.2rem;
    max-width: 80%;
    margin: 0 auto 25px;
    line-height: 1.5;
}

#start-btn {
    margin-top: 15px;
    padding: 16px 45px;
    font-size: 1.3rem;
    background-color: #4ade80;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}
#start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(74, 222, 128, 0.6);
}

/* Экран выбора уровня */
#level-select-screen {
    background: url('assets/images/level-select-bg.png') center/cover no-repeat !important;
    color: white;
    z-index: 90;
    justify-content: flex-start;
    padding-top: 15px;
    position: relative;
}

/* Добавляем затемнение для лучшей читаемости текста */
#level-select-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    border-radius: 15px;
}

.level-select-title { 
    font-size: 24px; 
    margin-bottom: 20px; 
    padding: 15px 25px;
    color: white !important; /* Меняем цвет текста на белый */
    background-color: rgba(255, 255, 255, 0.2); /* Полупрозрачный белый */
    border-radius: 12px;
    width: 80%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Тень для текста */
}

.level-cards {
    display: flex;
    flex-direction: column;  /* ← ДОБАВИТЬ */
    gap: 15px;
    margin: 15px 0;
    width: 100%;
    overflow-y: auto;
    max-height: 65%;
    padding: 5px;
    position: relative;
    z-index: 1;
}

.level-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 15px;
    width: 45%;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: auto;
    margin: 5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.level-card h2 { 
    color: #3b82f6; 
    margin-bottom: 8px; 
    font-size: 18px; 
}
.level-card p { 
    margin: 5px 0; 
    color: #4b5563; 
    font-size: 14px; 
}
.level-score { 
    margin-top: 8px; 
    font-size: 16px; 
    color: #10b981; 
    font-weight: bold; 
}

#back-to-menu {
    margin-top: 15px;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #3b82f6;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

#back-to-menu:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Игровой экран */
#game-screen {
    background-color: white;
    z-index: 80;
    justify-content: flex-start;
    padding: 8px 12px 5px;
    display: flex !important;
    flex-direction: column !important;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px !important;
    flex-wrap: wrap;
    flex: none !important;
    min-height: 30px !important;
}

.header-left, .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 45%;
    padding: 0 5px;
}

.level-name { 
    font-size: 14px !important; 
    font-weight: bold; 
    color: #3b82f6; 
    text-align: left; 
    margin-bottom: 0 !important; 
    line-height: 1.1 !important;
}
.timer { 
    font-size: 18px !important; 
    font-weight: bold; 
    color: #10b981; 
    margin-top: -2px !important;
}
.timer.low-time { color: #ef4444; animation: pulse 1s infinite; }

@keyframes pulse { 
    0%{transform:scale(1);} 
    50%{transform:scale(1.1);} 
    100%{transform:scale(1);} 
}

.feedback-message {
    height: 22px;
    font-weight: bold;
    margin: 2px 0;
    font-size: 15px;
    text-align: right;
    width: 100%;
    padding: 0 5px;
    animation: fadeInOut 3s ease forwards;
}
.feedback-message.correct { color: #10b981; }
.feedback-message.incorrect { color: #ef4444; }

/* Блок описания уровня */
.level-description {
    width: calc(100% - 10px);
    background-color: #e0f2fe;
    border-radius: 10px;
    padding: 8px !important;
    margin: 0 0 3px !important;
    font-size: 12px !important;
    text-align: left;
    max-height: 60px !important;
    min-height: 45px !important;
    overflow-y: auto;
    line-height: 1.2 !important;
    flex: none !important;
}
#level-desc-text { color: #0c4a6e; }

/* ОСНОВНОЙ ИГРОВОЙ КОНТЕЙНЕР - ИСПРАВЛЕН */
.game-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    flex: 1 !important;
    min-height: 0 !important;
    gap: 5px !important;
    margin: 0 0 0px !important;
    padding: 0 5px;
    overflow: hidden !important;
}

/* Блок слотов - ИСПРАВЛЕН */
.playground-container {
    flex: none !important;
    background-color: #f3f4f6;
    border-radius: 10px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
    height: auto !important;
}

.playground {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 8px;
    height: 100%;
    flex-wrap: nowrap !important;
}

/* Блок оборудования - ИСПРАВЛЕН */
.equipment-panel-container {
    flex: none !important;
    background-color: #f3f4f6;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    height: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #e5e7eb;
    -webkit-overflow-scrolling: touch;
}

.equipment-panel-container::-webkit-scrollbar {
    height: 6px;
}

.equipment-panel-container::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 3px;
}

.equipment-panel-container::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 3px;
}

.equipment-panel-container::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

.equipment-panel { 
    display: inline-flex; 
    gap: 12px;
    height: 100%; 
    align-items: center;
    padding: 5px;
    min-width: min-content;
    flex-shrink: 0;
    flex-wrap: nowrap !important;
}

/* СЛОТЫ И ОБОРУДОВАНИЕ - ИСПРАВЛЕНЫ РАЗМЕРЫ */
.slot {
    width: 140px !important; 
    height: 140px !important;
    background-color: #e5e7eb;
    border: 2px dashed #9ca3af;
    display: flex;
    justify-content: center; 
    align-items: center;
    border-radius: 10px;
    transition: all 0.3s;
    position: relative; 
    flex-shrink: 0 !important;
}
.slot-number {
    position: absolute; top: 5px; left: 5px;
    background-color: #3b82f6; color: white;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 12px; z-index: 5;
}
.slot.highlight-correct { animation: highlight-green 0.5s; }
.slot.highlight-incorrect { animation: highlight-red 0.5s; }
.slot.hint-highlight { animation: hint-pulse 2s infinite; }

@keyframes highlight-green { 
    0%{box-shadow:0 0 0 0 rgba(16,185,129,.7);} 
    70%{box-shadow:0 0 0 15px rgba(16,185,129,0);} 
    100%{box-shadow:0 0 0 0 rgba(16,185,129,0);} 
}
@keyframes highlight-red { 
    0%{box-shadow:0 0 0 0 rgba(239,68,68,.7);} 
    70%{box-shadow:0 0 0 15px rgba(239,68,68,0);} 
    100%{box-shadow:0 0 0 0 rgba(239,68,68,0);} 
}
@keyframes hint-pulse { 
    0%{box-shadow:0 0 0 0 rgba(245,158,11,.7);} 
    50%{box-shadow:0 0 0 15px rgba(245,158,11,.3);} 
    100%{box-shadow:0 0 0 0 rgba(245,158,11,0);} 
}

.equipment-btn {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 10px;
    border-radius: 10px; 
    cursor: pointer; 
    transition: all 0.2s;
    background-color: #e5e7eb; 
    width: 140px !important;
    height: 140px !important;
    flex-shrink: 0 !important;
}
.equipment { 
    width: 120px !important;
    height: 120px !important;
    pointer-events: none; 
    object-fit: contain; 
}
.equipment-placed { 
    width: 120px !important; 
    height: 120px !important; 
    object-fit: contain; 
    z-index: 2; 
}

/* НАСТРОЙКИ - ИСПРАВЛЕНЫ */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow-y: visible;
    height: auto;
    min-height: auto;
    align-items: stretch;
    width: 100%;
    flex: none !important;
}

.setting-item {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-height: 70px !important;
    width: 100%;
}

.setting-item label {
    display: block;
    margin-bottom: 8px !important;
    font-weight: bold;
    color: #1e293b;
    font-size: 14px !important;
    text-align: center;
    line-height: 1.1 !important;
}

.setting-controls { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    flex-direction: row;
}

.temp-slider {
    flex: 1;
    height: 14px !important;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 10px;
    outline: none;
}

.temp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; 
    height: 20px;
    border-radius: 50%;
    background: #3b82f6; 
    cursor: pointer;
}

.temp-slider::-moz-range-thumb {
    width: 18px; 
    height: 18px; 
    border-radius: 50%;
    background: #3b82f6; 
    cursor: pointer; 
    border: none;
}

.temp-value { 
    font-weight: bold; 
    min-width: 40px !important;
    text-align: center;
    font-size: 14px !important;
}

/* КНОПКИ УПРАВЛЕНИЯ - ПОЛНОСТЬЮ ИСПРАВЛЕНЫ */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 5px !important;
    margin-top: 5px !important;
    flex-wrap: wrap;
    flex: none !important;
    height: auto !important;
    min-height: 50px !important;
    max-height: none !important;
    order: 100 !important;
}

#hint-btn, #launch-btn {
    padding: 8px 12px !important; 
    border: none; 
    border-radius: 50px; 
    font-size: 12px !important;
    cursor: pointer; 
    transition: all 0.3s; 
    min-width: 120px !important; 
    flex: 1 !important; 
    max-width: 140px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    #hint-btn, #launch-btn {
        min-width: 110px !important;
        max-width: 130px !important;
        font-size: 11px !important;
        height: 34px !important;
        padding: 6px 10px !important;
    }
}

#hint-btn { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
    color: white; 
    box-shadow: 0 4px 15px rgba(245,158,11,.4); 
}
#hint-btn:disabled { background: #9ca3af; box-shadow: none; cursor: not-allowed; opacity: .6; }
#hint-btn:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(245,158,11,.6); }

#launch-btn { 
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); 
    color: white; 
    box-shadow: 0 4px 15px rgba(59,130,246,.4); 
    min-width: 160px !important; 
    font-size: 13.5px !important;
    letter-spacing: -0.2px !important;
}
#launch-btn:disabled { background: #9ca3af; box-shadow: none; cursor: not-allowed; }
#launch-btn:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(59,130,246,.6); }

/* Экран победы - исправления */
#win-screen {
    background: url('assets/images/win-background.png') center/cover no-repeat !important;
    color: white; 
    z-index: 100; 
    justify-content: flex-start !important; /* Меняем на flex-start */
    padding: 15px 10px !important; /* Уменьшаем padding */
    overflow-y: auto !important;
    height: 95vh !important;
    max-height: none !important;
}

.win-content {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 15px !important; /* Уменьшаем padding */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.win-text {
    animation: blink 1s infinite alternate; 
    margin-bottom: 10px !important; /* Уменьшаем отступ */
    font-size: 1.8rem !important; /* Уменьшаем размер шрифта */
    line-height: 1.2 !important;
    color: #1a202c !important;
    text-shadow: none !important;
}

#win-screen p {
    color: #2d3748 !important;
    font-weight: 500;
    text-shadow: none !important;
    margin: 8px 0 !important; /* Уменьшаем отступы */
    font-size: 14px !important; /* Уменьшаем размер шрифта */
    line-height: 1.3 !important;
}

/* Уменьшаем отступы для level-results */
.level-results {
    text-align: left; 
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px; 
    padding: 12px !important; /* Уменьшаем padding */
    margin: 10px 0 !important; /* Уменьшаем margin */
    width: 100%; 
    max-width: 500px;
}

.level-result { 
    margin-bottom: 12px !important; 
    padding-bottom: 12px !important; 
    border-bottom: 1px solid rgba(255,255,255,0.3); 
}
.level-result:last-child { 
    border-bottom: none; 
    margin-bottom: 0 !important; 
    padding-bottom: 0 !important; 
}
.level-result h3 { 
    font-size: 16px !important; /* Уменьшаем размер */
    margin-bottom: 8px !important; /* Уменьшаем отступ */
    color: #059669 !important;
    font-weight: 700;
    text-align: center;
}

/* Уменьшаем форму email */
.email-form {
    background: rgba(255, 255, 255, 0.15) !important;
    padding: 15px !important; /* Уменьшаем padding */
    border-radius: 15px;
    margin: 15px 0 !important; /* Уменьшаем margin */
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
}

.email-form p {
    margin-bottom: 12px !important; /* Уменьшаем отступ */
    font-size: 14px !important; /* Уменьшаем размер шрифта */
    font-weight: 500;
    color: #2d3748 !important;
    line-height: 1.3 !important;
}

/* Кнопка продолжить в бизнес */
#continue-to-business {
    margin: 8px 0 !important; /* Уменьшаем отступы */
    padding: 10px 20px !important; /* Уменьшаем padding */
    font-size: 14px !important; /* Уменьшаем размер шрифта */
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    #win-screen {
        padding: 10px 8px !important;
        justify-content: flex-start !important;
    }
    
    .win-content {
        padding: 12px !important;
        margin: 5px !important;
    }
    
    .win-text {
        font-size: 1.6rem !important;
        margin-bottom: 8px !important;
    }
    
    #win-screen p {
        font-size: 13px !important;
        margin: 6px 0 !important;
    }
    
    .level-results {
        padding: 10px !important;
        margin: 8px 0 !important;
    }
    
    .level-result h3 {
        font-size: 15px !important;
    }
    
    .email-form {
        padding: 12px !important;
        margin: 10px 0 !important;
    }
    
    .email-form p {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    #win-screen {
        padding: 8px 5px !important;
    }
    
    .win-content {
        padding: 10px !important;
    }
    
    .win-text {
        font-size: 1.4rem !important;
    }
    
    #win-screen p {
        font-size: 12px !important;
    }
    
    .level-results {
        padding: 8px !important;
    }
    
    .email-input {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .win-text {
        font-size: 1.3rem !important;
    }
    
    #win-screen p {
        font-size: 11px !important;
    }
    
    .level-result h3 {
        font-size: 14px !important;
    }
}

/* Убедимся, что все помещается */
.win-content > * {
    margin-bottom: 10px !important;
}

.win-content > *:last-child {
    margin-bottom: 0 !important;
}

/* Экран проигрыша */
#lose-screen {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white; z-index: 100; justify-content: center; padding: 20px; overflow-y: auto;
}

/* Модальное окно для подсказок */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.modal.hidden { display: none; }
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 15px;
    width: 80%; max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: modal-appear 0.4s ease-out;
}
@keyframes modal-appear { 
    0% { transform: scale(0.8); opacity: 0; } 
    100% { transform: scale(1); opacity: 1; } 
}
.close-modal { color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; top: 10px; right: 15px; }
.close-modal:hover { color: #333; }
#hint-text { font-size: 18px; line-height: 1.5; color: #333; padding: 20px 10px; text-align: center; }

/* Анимация для сообщений */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Анимация мигания для кнопки подсказки */
@keyframes hint-btn-pulse {
  0% { transform: scale(1); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(245, 158, 11, 0.8); }
  100% { transform: scale(1); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
}

.hint-btn-pulse {
  animation: hint-btn-pulse 1s ease-in-out infinite !important;
}

.dragging { opacity: .7; transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,0,0,.3); }
.drop-target { border: 2px dashed #3b82f6; background-color: rgba(59,130,246,.1); }

.equipment-btn.selected{outline:3px solid #3b82f6;box-shadow:0 6px 18px rgba(59,130,246,.35);transform:scale(1.03);} 
.playground .slot{cursor:pointer;} 
.equipment-panel .equipment-btn{cursor:pointer;}

/* Стили для формы email */
.email-form {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
}

.email-form p {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

.email-input {
    width: 80%;
    max-width: 300px;
    padding: 12px 15px;
    margin: 10px 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: #10b981;
    background: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.email-input::placeholder {
    color: #6b7280;
}

.send-results-btn {
    background: white;
    color: #10b981;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s ease;
    min-width: 200px;
}

.send-results-btn:hover:not(:disabled) {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.send-results-btn:disabled {
    background: #9ca3af;
    color: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.email-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
    font-style: italic;
}

/* Анимация в стиле GTA */
.animation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 110;
}

.logo-animation-container {
    text-align: center;
}

.logo-animated {
    max-width: 300px;
    max-height: 300px;
    opacity: 0;
    transform: scale(0.5);
    animation: gtaLogoAnimation 3s ease-in-out forwards;
}

@keyframes gtaLogoAnimation {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    20% {
        opacity: 1;
        transform: scale(1.1);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
    70% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.main-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%),
        url('assets/images/main-bg.png') center/cover no-repeat;
    animation: contentFadeIn 1s ease-in-out 1s forwards;
    opacity: 0;
}

@keyframes contentFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

#start-screen {
    position: relative;
    overflow: hidden;
    background: black;
}

/* === СТИЛИ ДЛЯ ЭКРАНА БИЗНЕСА С 7 УРОВНЯМИ === */
#business-start-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 85;
    justify-content: flex-start;
    padding: 20px 15px;
    overflow-y: auto;
}

.business-description {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0 20px 0;
    text-align: center;
    max-width: 600px;
}

.business-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 1400px;
}

.business-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.business-card.available {
    border: 3px solid #10b981;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.business-card.locked {
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed #9ca3af;
    opacity: 0.7;
}

.business-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 15px;
    background-size: cover;
    background-position: center;
}

/* Изображения для разных типов помещений */
.preparation-image {
    background: linear-gradient(135deg, #8B4513, #A0522D);
}

.mashing-image {
    background: linear-gradient(135deg, #4F7942, #90EE90);
}

.fermentation-image {
    background: linear-gradient(135deg, #1E90FF, #87CEEB);
}

.bottling-image {
    background: linear-gradient(135deg, #FF6347, #FFA07A);
}

.production-image {
    background: linear-gradient(135deg, #708090, #2F4F4F);
}

.advanced-image {
    background: linear-gradient(135deg, #9370DB, #DDA0DD);
}

.complex-image {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.business-card h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 18px;
}

.business-card-desc {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
    flex-grow: 1;
    text-align: left;
}

.business-card-desc strong {
    color: #1f2937;
}

.business-price {
    font-weight: bold;
    color: #3b82f6;
    margin: 10px 0;
    font-size: 16px;
}

.business-balance {
    font-weight: bold;
    color: #10b981;
    margin: 10px 0;
    font-size: 16px;
}

.business-action-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.business-action-btn.equipped {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.business-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.business-action-btn.equipped:hover {
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.business-action-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.development-roadmap {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 600px;
}

.development-roadmap h3 {
    color: white;
    text-align: center;
    margin-bottom: 15px;
}

.roadmap-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roadmap-step {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}

.roadmap-step.completed {
    background: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.roadmap-step.current {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    border: 1px solid #3b82f6;
}

.roadmap-step.locked {
    background: rgba(156, 163, 175, 0.3);
    color: #d1d5db;
}

/* Анимация для кнопки продолжения в бизнес */
#continue-to-business {
    background: linear-gradient(135deg, #ff8c00 0%, #ff4500 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: bold;
    animation: business-btn-pulse 5s infinite;
}

@keyframes business-btn-pulse {
  0% { 
    transform: scale(1); 
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4); 
  }
  10% { 
    transform: scale(1.05); 
    box-shadow: 0 0 20px 5px rgba(255, 140, 0, 0.8); 
  }
  20% { 
    transform: scale(1); 
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4); 
  }
  100% { 
    transform: scale(1); 
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4); 
  }
}

/* === АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 768px) {
    .screen { height: 95vh; max-height: none; padding: 8px 10px 5px; }
    .logo-container { width: 250px; height: 260px; margin: 5px auto 10px; }
    .game-title { font-size: 2.5rem; }
    .game-name { font-size: 2rem; }
    .welcome-text { font-size: 1.1rem; margin-bottom: 20px; }
    
    /* Уменьшаем верхние блоки еще больше для мобильных */
    .level-description {
        min-height: 40px !important;
        max-height: 50px !important;
        font-size: 11px !important;
        padding: 6px !important;
    }
    
    .game-header {
        min-height: 25px !important;
    }
    
    .level-name {
        font-size: 12px !important;
    }
    
    .timer {
        font-size: 16px !important;
    }
    
    /* Настройки для мобильных */
    .setting-item {
        min-height: 65px !important;
        padding: 8px !important;
    }
    
    .setting-item label {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }
    
    .temp-slider {
        height: 12px !important;
    }
    
    .temp-value {
        font-size: 13px !important;
        min-width: 35px !important;
    }
    
    /* Кнопки для мобильных */
    #hint-btn, #launch-btn {
        min-width: 140px !important;
        max-width: 160px !important;
        font-size: 13px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
    }
    
    #launch-btn {
        font-size: 12.5px !important;
        min-width: 150px !important;
    }
    
    /* Бизнес-карточки для мобильных */
    .business-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .business-card {
        min-height: 350px;
        padding: 15px;
    }
    
    .business-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .game-controls {
        gap: 8px;
        padding: 6px 3px !important;
    }
    
    .business-card {
        min-height: 320px;
        padding: 12px;
    }
    
    .business-image {
        width: 80px;
        height: 80px;
    }
    
    .business-card h3 {
        font-size: 16px;
    }
    
    .business-card-desc {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .playground-container,
    .equipment-panel-container {
        min-height: 120px !important;
        max-height: 130px !important;
    }
    
    .slot,
    .equipment-btn {
        width: 130px !important;
        height: 130px !important;
    }
    
    .equipment,
    .equipment-placed {
        width: 110px !important;
        height: 110px !important;
    }
    
    #hint-btn, #launch-btn {
        min-width: 130px !important;
        max-width: 140px !important;
        font-size: 12px !important;
    }
    
    #launch-btn {
        font-size: 11.5px !important;
        min-width: 140px !important;
    }
    
    .business-card {
        min-height: 300px;
    }
}

/* Для планшетов и больших экранов */
@media (min-width: 769px) {
    .slot, .equipment-btn { width: 160px; height: 160px; }
    .equipment { width: 140px; height: 140px; }
    .equipment-placed { width: 140px; height: 140px; }
    
    .business-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1201px) {
    .business-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Стили для развернутых результатов */
.parameter-results {
  margin: 15px 0;
}

.parameter {
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border-left: 4px solid #e5e7eb;
}

.parameter.correct {
  background: #f0f9ff;
  border-left-color: #10b981;
}

.parameter.incorrect {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.parameter-comment {
  font-size: 14px;
  color: #1f2937;
  margin: 6px 0 4px 0;
  font-weight: 600;
  line-height: 1.4;
}

.parameter-range {
  font-size: 13px;
  color: #9ca3af;
}

.level-summary {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

/* Улучшение читаемости для экранов победы/проигрыша */
#win-screen,
#lose-screen {
    background: url('assets/images/win-background.png') center/cover no-repeat !important;
    color: #000000 !important;
}

.win-content {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 10px;
}

#win-screen h1,
#lose-screen h1 {
    color: #1a202c !important;
    text-shadow: none !important;
}

#win-screen p,
#lose-screen p {
    color: #2d3748 !important;
    font-weight: 500;
    text-shadow: none !important;
}

.level-result h3 {
    color: #059669 !important;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.parameter {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e2e8f0 !important;
}

.parameter strong {
    color: #1a202c !important;
}

.parameter-comment {
    color: #4a5568 !important;
    font-weight: 500;
}

.parameter-range {
    color: #718096 !important;
    font-weight: 500;
}

.level-summary p {
    color: #059669 !important;
    font-weight: 600;
}

.level-summary strong {
    color: #047857 !important;
}

/* Гарантируем прокрутку на мобильных */
#win-screen,
#lose-screen,
#business-start-screen {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Улучшаем поле email для мобильных */
.email-input {
    border: 2px solid #3b82f6 !important;
    border-radius: 10px !important;
    padding: 12px 15px !important;
    font-size: 16px !important;
    background: white !important;
    width: 90% !important;
    max-width: 300px !important;
    margin: 10px 0 !important;
}

/* Особые стили для очень маленьких экранов */
@media (max-width: 480px) {
    .win-content {
        margin: 5px !important;
        padding: 20px 15px !important;
        min-height: auto !important;
    }
    
    .level-results {
        margin: 15px 0 !important;
        padding: 15px !important;
    }
    
    .level-result h3 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }
    
    .level-summary {
        margin-top: 15px !important;
        padding-top: 15px !important;
    }
}

/* Для горизонтальной ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    #win-screen,
    #lose-screen,
    #business-start-screen {
        padding: 10px 5px !important;
    }
    
    .win-content {
        padding: 15px 10px !important;
    }
    
    .business-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Убедимся что контент не обрезается */
.win-content {
    min-height: min-content !important;
    overflow: visible !important;
}

/* Скрываем логотип только в основном контенте стартового экрана */
#main-content .logo-container {
    display: none !important;
}
/* === ИСПРАВЛЕНИЯ ДЛЯ УРОВНЕЙ 3, 4, 5 === */

/* Убираем иконку "Оборудование недоступно" на уровнях 3 и 5 */
.equipment-panel-container .placeholder-image {
    display: none !important;
}

/* Исправляем отображение brewery-background для уровней 1 и 4 */
.brewery-background {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-height: 150px !important;
    margin: 10px 0 5px 0 !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 1 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.brewery-background img {
    width: auto !important;
    height: auto !important;
    max-width: 95% !important;
    max-height: 140px !important;
    object-fit: contain;
}

/* Убедимся, что brewery-background показывается только на нужных уровнях */
.brewery-background.hidden {
    display: none !important;
}

/* Для уровней с настройками (1 и 4) - правильное отображение */
.settings-container:has(.setting-item) + .brewery-background:not(.hidden) {
    display: flex !important;
}

/* Для уровней с оборудованием (2, 3, 5) - скрываем brewery-background */
.playground-container:not(.hidden) ~ .brewery-background {
    display: none !important;
}

/* Исправляем контейнеры оборудования - убираем placeholder */
.equipment-panel-container:not(.hidden) {
    background-color: #f3f4f6;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    height: auto !important;
}

/* Скрываем placeholder-image во всех случаях */
.placeholder-image {
    display: none !important;
}

/* === АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 768px) {
    .brewery-background {
        max-height: 120px !important;
        margin: 8px 0 3px 0 !important;
    }
    
    .brewery-background img {
        max-height: 110px !important;
    }
}

@media (max-width: 480px) {
    .brewery-background {
        max-height: 100px !important;
        margin: 5px 0 2px 0 !important;
    }
    
    .brewery-background img {
        max-height: 90px !important;
    }
}

@media (max-width: 360px) {
    .brewery-background {
        max-height: 80px !important;
    }
    
    .brewery-background img {
        max-height: 75px !important;
    }
}

/* === ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ИГРОВЫХ ЭКРАНОВ === */

/* Правильное отображение для разных типов уровней */
/* Уровни с настройками (1, 2, 4) */
.settings-container:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow-y: visible;
    height: auto;
    min-height: auto;
    align-items: stretch;
    width: 100%;
    flex: none !important;
}

/* Уровни с оборудованием (3, 5) */
.playground-container:not(.hidden) {
    flex: none !important;
    background-color: #f3f4f6;
    border-radius: 10px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
    height: auto !important;
}

.equipment-panel-container:not(.hidden) {
    flex: none !important;
    background-color: #f3f4f6;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    height: auto !important;
}

/* Убираем любые следы placeholder изображений */
.equipment-panel-container .placeholder-image,
.playground-container .placeholder-image {
    display: none !important;
}

/* Гарантируем, что equipment-panel всегда виден когда контейнер видим */
.equipment-panel-container:not(.hidden) .equipment-panel {
    display: inline-flex !important;
}
/* Стили для экрана оборудования */
#facility-equipment-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 84;
    justify-content: flex-start;
    padding: 20px 15px;
    overflow-y: auto;
}

.garage-setup-container {
    padding: 15px;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 15px 0;
}

.budget-display {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.budget-info {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    flex-wrap: wrap;
}

.budget-item {
    padding: 5px 10px;
}

.equipment-category {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #e5e7eb;
}

.equipment-category h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 16px;
}

.equipment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.equipment-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.equipment-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.equipment-option input:checked + label {
    color: #3b82f6;
    font-weight: bold;
}

.equipment-option input:checked ~ .equipment-option {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.equipment-option label {
    cursor: pointer;
    display: block;
    color: #1f2937;
}

.required-item {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.equipment-details {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equipment-details span {
    font-size: 12px;
    color: #6b7280;
}

.price {
    color: #059669 !important;
    font-weight: 600;
}

.warning {
    color: #dc2626 !important;
    font-weight: 600;
    font-size: 11px !important;
}

.hint-text {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}

.summary-section {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    margin-bottom: 15px;
}

.summary-section h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 16px;
    text-align: center;
}

#selected-equipment {
    max-height: 150px;
    overflow-y: auto;
    color: #1f2937;
}

#selected-equipment div {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.empty-selection {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 20px !important;
}

.warning-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.equipment-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.business-action-btn.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.business-action-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .equipment-options {
        grid-template-columns: 1fr;
    }
    
    .budget-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .equipment-controls {
        flex-direction: column;
    }
    
    .business-action-btn {
        width: 100%;
    }
    
    .garage-setup-container {
        max-height: 50vh;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .equipment-option {
        padding: 8px;
    }
    
    .equipment-category {
        padding: 10px;
    }
    
    .equipment-details span {
        font-size: 11px;
    }
}
/* Стили для полного магазина оборудования */
.equipment-store-container {
    padding: 15px;
    max-height: 65vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 15px 0;
}

.equipment-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.equipment-category h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 16px;
    padding: 10px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 8px;
    text-align: center;
}

.equipment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.equipment-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
}

.equipment-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.equipment-option input:checked + label {
    color: #3b82f6;
    font-weight: bold;
}

.equipment-option input:checked {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.equipment-option label {
    cursor: pointer;
    display: block;
    color: #1f2937;
    font-size: 14px;
}

.required-item {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.equipment-details {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equipment-details span {
    font-size: 12px;
    color: #6b7280;
}

.price {
    color: #059669 !important;
    font-weight: 600;
    font-size: 13px !important;
}

.warning {
    color: #dc2626 !important;
    font-weight: 600;
    font-size: 11px !important;
}

.hint-text {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}

.summary-section {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    margin: 20px 0 15px 0;
}

.summary-section h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 16px;
    text-align: center;
}

#selected-equipment {
    max-height: 200px;
    overflow-y: auto;
    color: #1f2937;
    background: white;
    border-radius: 8px;
    padding: 10px;
}

#selected-equipment div {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipment-item-price {
    color: #059669;
    font-weight: 600;
    font-size: 12px;
}

.empty-selection {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 20px !important;
}

.warning-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.equipment-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .equipment-options {
        grid-template-columns: 1fr;
    }
    
    .equipment-store-container {
        max-height: 55vh;
        padding: 10px;
    }
    
    .equipment-option {
        padding: 10px;
    }
    
    .equipment-controls {
        flex-direction: column;
    }
    
    .business-action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .equipment-category h3 {
        font-size: 14px;
        padding: 8px;
    }
    
    .equipment-details span {
        font-size: 11px;
    }
    
    #selected-equipment div {
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
/* Исправляем ширину бизнес-опций */
.business-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Увеличиваем минимальную ширину */
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 1400px;
    padding: 0 10px; /* Добавляем отступы по бокам */
}

.business-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 350px; /* Ограничиваем максимальную ширину */
    margin: 0 auto; /* Центрируем карточки */
}

/* Увеличиваем контейнер бизнес-экрана */
#business-start-screen .win-content {
    width: 100%;
    max-width: 1200px; /* Увеличиваем максимальную ширину */
    margin: 0 auto;
    padding: 20px;
}

/* Адаптивность для бизнес-карточек */
@media (max-width: 768px) {
    .business-options {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 5px;
    }
    
    .business-card {
        min-height: 350px;
        padding: 15px;
        max-width: 100%; /* На мобильных занимаем всю ширину */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .business-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .business-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Увеличиваем ширину roadmap */
.development-roadmap {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 800px; /* Увеличиваем ширину */
}

/* Увеличиваем описание */
.business-description {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0 20px 0;
    text-align: center;
    max-width: 800px; /* Увеличиваем ширину */
    padding: 0 15px;
}
/* Стили для широкого экрана оборудования */
#facility-equipment-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 84;
    justify-content: flex-start;
    padding: 20px 15px;
    overflow-y: auto;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
}

.equipment-win-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.equipment-description {
    font-size: 18px;
    line-height: 1.5;
    margin: 10px 0 25px 0;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: white;
}

.wide-equipment-store {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.equipment-header {
    margin-bottom: 25px;
}

.budget-display-wide {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.budget-display-wide h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.budget-info-wide {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.budget-item-wide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.budget-label {
    font-size: 14px;
    opacity: 0.9;
}

.budget-value {
    font-size: 18px;
    font-weight: bold;
}

.equipment-categories-wide {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.equipment-category-wide {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.equipment-category-wide h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 18px;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #3b82f6;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.equipment-option-wide {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.equipment-option-wide:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
}

.equipment-option-wide input:checked {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.equipment-option-wide input:checked + label {
    color: #3b82f6;
    font-weight: bold;
}

.equipment-option-wide label {
    cursor: pointer;
    display: block;
    color: #1f2937;
    font-size: 15px;
}

.equipment-details-wide {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.equipment-details-wide span {
    font-size: 13px;
    color: #6b7280;
}

.price-wide {
    color: #059669 !important;
    font-weight: 600;
    font-size: 14px !important;
    margin-top: 5px;
}

.required-item {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.summary-section-wide {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    margin: 30px 0 20px 0;
}

.summary-section-wide h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.summary-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

.selected-equipment-list {
    max-height: 250px;
    overflow-y: auto;
    color: #1f2937;
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e5e7eb;
}

.selected-equipment-list div {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipment-item-price {
    color: #059669;
    font-weight: 600;
    font-size: 13px;
}

.empty-selection-wide {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 30px !important;
}

.summary-warnings {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.warning-message-wide {
    background: #fef2f2;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.equipment-controls-wide {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.equipment-action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.equipment-action-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.equipment-action-btn.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.equipment-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.equipment-action-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Адаптивность для широкого экрана */
@media (max-width: 1024px) {
    .wide-equipment-store {
        padding: 20px;
    }
    
    .equipment-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 12px;
    }
    
    .summary-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    #facility-equipment-screen {
        padding: 15px 10px;
        width: 98%;
    }
    
    .equipment-win-content {
        padding: 15px;
    }
    
    .wide-equipment-store {
        padding: 15px;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .budget-info-wide {
        flex-direction: column;
        gap: 15px;
    }
    
    .equipment-category-wide {
        padding: 15px;
    }
    
    .equipment-controls-wide {
        flex-direction: column;
        align-items: center;
    }
    
    .equipment-action-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .equipment-description {
        font-size: 16px;
    }
    
    .budget-display-wide h2 {
        font-size: 1.3rem;
    }
    
    .equipment-category-wide h3 {
        font-size: 16px;
        padding: 10px;
    }
    
    .equipment-option-wide {
        padding: 12px;
    }
    
    .summary-section-wide {
        padding: 20px;
    }
}

/* Плавная анимация появления */
.wide-equipment-store {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Кастомный скроллбар */
.selected-equipment-list::-webkit-scrollbar {
    width: 6px;
}

.selected-equipment-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.selected-equipment-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.selected-equipment-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
/* ФИКС ДЛЯ КНОПОК НА ОБУЧАЮЩИХ УРОВНЯХ */
.game-controls {
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
}

/* Дополнительная страховка для очень маленьких экранов */
@media (max-width: 480px) {
    .game-controls {
        margin-bottom: 15px !important;
        padding-bottom: 8px !important;
    }
}

@media (max-width: 360px) {
    .game-controls {
        margin-bottom: 12px !important;
        padding-bottom: 6px !important;
    }
}
/* Увеличиваем блок описания уровня и шрифт */
.level-description {
    min-height: 70px !important; /* Было 45px */
    max-height: 80px !important; /* Было 60px */
    font-size: 14px !important; /* Было 12px */
    line-height: 1.4 !important; /* Было 1.2 */
    padding: 10px !important; /* Было 8px */
}

#level-desc-text {
    font-size: 14px !important;
    line-height: 1.4 !important;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .level-description {
        min-height: 65px !important;
        max-height: 75px !important;
        font-size: 13px !important;
        padding: 8px !important;
    }
    
    #level-desc-text {
        font-size: 13px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .level-description {
        min-height: 60px !important;
        max-height: 70px !important;
        font-size: 12px !important;
        padding: 7px !important;
    }
    
    #level-desc-text {
        font-size: 12px !important;
    }
}
#business-start-screen {
    background: url('assets/images/business-background.png') center/cover no-repeat !important;
}
/* Улучшение читаемости текста на экране бизнеса */
#business-start-screen .win-content {
    background: rgba(0, 0, 0, 0.7);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Убедимся, что весь текст белый */
#business-start-screen h1,
#business-start-screen .business-description,
#business-start-screen .business-description strong {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}
/* Зеленый цвет для "100 Brewery Points" */
.highlight-points {
    color: #10b981 !important;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}
/* === ЗЕЛЕНЫЙ ТЕКСТ С ЧЕРНОЙ ОБВОДКОЙ === */
.business-description {
    font-size: 20px !important;
    line-height: 1.6 !important;
    font-weight: 600;
    color: #1f2937 !important; /* Темно-серый для обычного текста */
    text-shadow: none;
    margin: 15px 0 25px !important;
    padding: 0 20px;
}

/* Обводка для "100 Brewery Points" */
.highlight-points {
    color: #10b981 !important; /* Зеленый цвет */
    font-weight: 800;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000 !important; /* Черная обводка */
}

/* === ФИРМЕННЫЙ ОРАНЖЕВЫЙ ДЛЯ ЗАГОЛОВКА === */
#business-start-screen .win-content h1 {
    color: #ff8c00 !important; /* Фирменный оранжевый */
    font-size: 2.2rem !important;
    margin-bottom: 10px !important;
    font-weight: 800;
    background: none;
    border: none;
    padding: 0;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .business-description {
        font-size: 18px !important;
        padding: 0 15px;
    }
    
    
    .highlight-points {
        text-shadow: 
            -0.5px -0.5px 0 #000,
            0.5px -0.5px 0 #000,
            -0.5px 0.5px 0 #000,
            0.5px 0.5px 0 #000 !important;
    }
}

@media (max-width: 480px) {
    .business-description {
        font-size: 16px !important;
        padding: 0 10px;
    }
    
    
    .highlight-points {
        text-shadow: 
            -0.5px -0.5px 0 #000,
            0.5px -0.5px 0 #000,
            -0.5px 0.5px 0 #000,
            0.5px 0.5px 0 #000 !important;
    }
}
/* === КРАСИВЫЕ ИКОНКИ ДЛЯ КАРТОЧЕК === */
.business-image {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color1), var(--color2));
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 40px;
}

/* Пивоварня ресторанного типа - бокал пива */
.preparation-image::before {
    content: "🍺";
}

/* Пивоварня с дистрибуцией - грузовик с пивом */
.mashing-image::before {
    content: "🚚";
}

/* Пивоваренный завод - промышленные танки */
.fermentation-image::before {
    content: "⚗️";
}

/* Пивоваренный комплекс - конвейер */
.bottling-image::before {
    content: "🏗️";
}

/* Пивоваренный концерн - сеть магазинов */
.production-image::before {
    content: "🌐";
}

/* Пивоваренная империя - ракета роста */
.advanced-image::before {
    content: "🚀";
}

/* Международный альянс - глобус с сетью */
.complex-image::before {
    content: "👑";
}

/* Градиенты для каждой иконки */
.preparation-image { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mashing-image { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.fermentation-image { background: linear-gradient(135deg, #10b981, #059669); }
.bottling-image { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.production-image { background: linear-gradient(135deg, #f97316, #ea580c); }
.advanced-image { background: linear-gradient(135deg, #ec4899, #db2777); }
.complex-image { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* === СТИЛЬ ДЛЯ ЗАГОЛОВКА ОСНАЩЕНИЯ === */
#equipment-facility-name {
    color: white !important; /* Белый цвет для "Оснащение:" */
    font-weight: 800;
    font-size: 2.2rem !important;
    margin-bottom: 15px !important;
    text-shadow: none;
}

.facility-name-orange {
    color: #ff8c00 !important; /* Фирменный оранжевый для названия */
    font-weight: 800;
    text-shadow: none;
}
.budget-display-wide {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.budget-info-wide {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.budget-item-wide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.budget-label {
    font-size: 14px;
    opacity: 0.9;
}

.budget-value {
    font-size: 18px;
    font-weight: bold;
}
.category-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    object-fit: contain;
}
/* === СТИЛИ ДЛЯ ШАПОК КАТЕГОРИЙ === */

.equipment-category-wide h3 {
    background: white !important;
    color: #1f2937 !important;
    margin-bottom: 15px;
    font-size: 18px;
    padding: 2px 20px !important; /* Минимальные отступы */
    border-radius: 10px;
    text-align: center;
    border: 2px solid #ff8c00 !important;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.15) !important;
    font-weight: bold;
    height: 85px !important; /* Фиксированная высота 85px */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.equipment-category-wide h3 .category-icon {
    width: 80px !important; /* Картинка 80px */
    height: 80px !important; /* Картинка 80px */
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
    object-fit: contain;
}
/* === ХИМРАСТВОР В ПОДАРОК === */

.equipment-option-wide[data-id="chemical"] {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe) !important;
    border: 2px solid #0ea5e9 !important;
    position: relative;
}

.equipment-option-wide[data-id="chemical"]::before {
    content: "🎁 В ПОДАРОК!";
    position: absolute;
    top: -8px;
    right: 10px;
    background: #0ea5e9;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}

.equipment-option-wide[data-id="chemical"] .price-wide {
    color: #0ea5e9 !important;
    font-weight: bold;
}

.equipment-option-wide[data-id="chemical"] .price-wide::before {
    content: "БЕСПЛАТНО";
    color: #0ea5e9;
    font-weight: 800;
}

.equipment-option-wide[data-id="chemical"] .price-wide::after {
    content: ""; /* Убираем старую цену */
}

/* В HTML обновляем цену на 0 */
/* === СВОДКА ОБОРУДОВАНИЯ В СТИЛЕ ЧЕРНО-БЕЛОГО ЧЕКА === */

.summary-section-wide {
    background: white !important;
    padding: 25px;
    border-radius: 0 !important; /* Убираем скругления */
    border: 2px solid #000 !important;
    margin: 30px 0 20px 0;
    font-family: 'Courier New', monospace !important;
    color: #000 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.summary-section-wide h3 {
    color: #000 !important;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #000 !important;
    font-family: 'Courier New', monospace !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100% !important;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100% !important;
}

.selected-equipment-list {
    background: white !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-height: 300px;
    overflow-y: auto;
    width: 100% !important;
}

/* КАЖДАЯ СТРОЧКА ЧЕКА НА ВСЮ ШИРИНУ */
.selected-equipment-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px !important;
    border-bottom: 1px solid #000 !important;
    font-size: 16px;
    color: #000 !important;
    width: 100% !important;
    margin: 0 !important;
}

.selected-equipment-list div:last-child {
    border-bottom: 2px solid #000 !important; /* Жирная линия перед итогом */
    font-weight: bold;
    font-size: 18px;
    background: #f5f5f5 !important;
}

.equipment-item-price {
    color: #000 !important;
    font-weight: bold;
    font-size: 16px;
}

.empty-selection-wide {
    color: #666 !important;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 40px !important;
    width: 100% !important;
    font-size: 16px;
}

/* ШАПКА И ПОДВАЛ ЧЕКА */
.summary-section-wide::before {
    content: "=== ПИВОВАРНЯ PRO === ";
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    color: #000 !important;
    letter-spacing: 3px;
}

.summary-section-wide::after {
    content: "======================";
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    margin-top: 15px;
    color: #000 !important;
    letter-spacing: 3px;
}

/* ПРЕДУПРЕЖДЕНИЯ В СТИЛЕ ЧЕКА */
.summary-warnings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100% !important;
}

.warning-message-wide {
    background: white !important;
    color: #000 !important;
    padding: 15px 20px !important;
    border-radius: 0 !important;
    border: 2px solid #000 !important;
    font-size: 14px;
    font-family: 'Courier New', monospace !important;
    width: 100% !important;
    text-align: center;
}

/* Кастомный скроллбар */
.selected-equipment-list::-webkit-scrollbar {
    width: 8px;
}

.selected-equipment-list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.selected-equipment-list::-webkit-scrollbar-thumb {
    background: #000;
    border: 1px solid #000;
}

.selected-equipment-list::-webkit-scrollbar-thumb:hover {
    background: #333;
}
/* ЖЕСТКО МЕНЯЕМ ИКОНКУ ВСПОМОГАТЕЛЬНОГО ОБОРУДОВАНИЯ */
.equipment-categories-wide .equipment-category-wide:last-child h3 img.category-icon {
    src: url('assets/images/steam-generator.png') !important;
    width: 80px !important;
    height: 80px !important;
    content: url('assets/images/steam-generator.png') !important;
}
/* Заменяем "ПИВОВАРНЯ PRO" на "ООО ОБОРУДОВАНИЕ КУБАНИ" */
.summary-section-wide::before {
    content: "=== ООО \"ОБОРУДОВАНИЕ КУБАНИ\" ===" !important;
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    color: #000 !important;
    letter-spacing: 1px;
}

.summary-section-wide::after {
    content: "==============================" !important;
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    margin-top: 15px;
    color: #000 !important;
    letter-spacing: 1px;
}

/* Агрессивное удаление галочек */
#selected-equipment *:before {
    display: none !important;
    content: "" !important;
}

#selected-equipment div {
    padding: 5px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 12px !important;
    list-style: none !important;
}

/* Мобильная версия - только то что просили */
@media (max-width: 768px) {
    /* 1. Текст "Оснащение: Пивоварня ресторанного типа" - уменьшить на 20% и 2 строки */
    .equipment-category h3 {
        font-size: 11.2px !important;
        line-height: 1.2 !important;
        max-height: 2.4em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    /* 2. Блок с бюджетом - в один ряд */
    .budget-info {
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 5px !important;
    }
    
    .budget-item {
        flex: 1;
        text-align: center;
        padding: 5px !important;
    }
    
    /* 3. Блоки выбора оборудования - шире с отступами 5px */
    .equipment-category {
        margin-left: 5px !important;
        margin-right: 5px !important;
        width: calc(100% - 10px) !important;
    }
    
    .equipment-options {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}
/* Мобильная версия - только то что просили */
@media (max-width: 768px) {
    /* 1. Текст "Оснащение: Пивоварня ресторанного типа" */
    .garage-setup-container .equipment-category h3 {
        font-size: 11.2px !important;
        line-height: 1.2 !important;
        max-height: 2.4em !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }
    
    /* 2. Блок с бюджетом - в один ряд */
    #business-start-screen .budget-info,
    .garage-setup-container .budget-info {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 5px !important;
        align-items: center !important;
    }
    
    .garage-setup-container .budget-item {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 5px !important;
        margin: 0 !important;
    }
    
    /* 3. Блоки выбора оборудования */
    .game-screen .equipment-category,
    .garage-setup-container .equipment-category {
        margin-left: 5px !important;
        margin-right: 5px !important;
        width: calc(100% - 10px) !important;
        max-width: none !important;
    }
    
    .garage-setup-container .equipment-options {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }
}
/* Заголовки глав */
.chapter-header {
  grid-column: 1 / -1;
  text-align: center;
  margin: 30px 0 20px 0;
  padding: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  border-left: 5px solid #3b82f6;
}

.chapter-header h2 {
  margin: 0 0 10px 0;
  color: white;
  font-size: 1.5em;
}

.chapter-header p {
  margin: 0;
  color: #ccc;
  font-size: 1em;
}

/* Особый стиль для карточки главы */
.level-card.chapter-card {
  background: linear-gradient(135deg, #ff8c00 0%, #ff4500 100%);
  border: 2px solid #ff8c00;
}

.level-card.chapter-card h3 {
  font-size: 1.3em;
  margin-bottom: 10px;
}

.chapter-status {
  margin-top: 10px;
  font-weight: bold;
  font-size: 0.9em;
}

/* Адаптация сетки для заголовков */
.level-cards {
    display: flex;
    flex-direction: column;  /* ← ДОБАВИТЬ */
    gap: 15px;
    max-width: 600px;  /* ← ИЗМЕНИТЬ с 1200px */
    margin: 0 auto;
}
.chapter-header {
  grid-column: 1 / -1;
  text-align: center;
  margin: 30px 0 10px 0;
  padding: 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

.chapter-header h2 {
  margin: 0;
  color: white;
  font-size: 1.3em;
}

.chapter-header p {
  margin: 5px 0 0 0;
  color: #ccc;
}

.business-card, .chapter2-card {
  border: 2px solid transparent;
}

.business-status, .chapter-status {
  margin-top: 10px;
  font-weight: bold;
}
/* === СТИЛИ ДЛЯ ЭКРАНА ВЫБОРА УРОВНЯ === */

/* Заголовки глав на экране выбора уровня */
#level-select-screen .chapter-header {
    background-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    text-align: center !important;
}

#level-select-screen .chapter-header h2 {
    color: white !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

#level-select-screen .chapter-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Карточки уровней на экране выбора уровня */
#level-select-screen .level-card {
    background-color: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

#level-select-screen .level-card:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Специфичные стили для разных типов карточек */
#level-select-screen .business-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2)) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

#level-select-screen .chapter2-card {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.2), rgba(255, 69, 0, 0.2)) !important;
    border: 1px solid rgba(255, 140, 0, 0.4) !important;
}

/* Текст в карточках */
#level-select-screen .level-card h3 {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

#level-select-screen .level-card p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Баллы и статусы */
#level-select-screen .level-score {
    color: #ffd700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

#level-select-screen .business-status,
#level-select-screen .chapter-status {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Заблокированные карточки */
#level-select-screen .level-card[style*="opacity: 0.6"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Мета-информация в карточках */
#level-select-screen .meta-item {
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}
/* Стили для контейнера уровней */
.levels-container {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

/* Стили для отдельных уровней */
.level {
    width: 100%;
    padding: 12px 15px;
    margin: 4px 0;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    text-align: left;
    font-size: 14px;
}

.level:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

.level.locked {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.level.completed {
    background-color: #e8f5e8;
    border-color: #4CAF50;
}

.level.active {
    background-color: #e3f2fd;
    border-color: #2196F3;
}

/* Стили для скроллбара */
.levels-container::-webkit-scrollbar {
    width: 6px;
}

.levels-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.levels-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.levels-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Убираем стандартные отступы у списков уровней */
.chapter ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Скрываем оригинальные маркеры списка */
.chapter li {
    display: none;
}

/* Показываем только наши стилизованные уровни */
.chapter .level {
    display: block;
}
.level-card {
    width: 100% !important;
    max-width: 500px;
    margin: 0 auto !important;
}
.level-cards {
    max-height: none !important; /* убрать ограничение */
    overflow-y: visible !important; /* убрать скролл внутри */
    height: auto !important;
}
#level-select-screen {
    overflow-y: auto !important; /* скролл всему экрану */
    height: 95vh !important;
}
.level-card {
    padding: 12px 20px !important;
    min-height: 60px !important; /* оптимальная высота */
    margin: 8px auto !important;
}

.level-card h3 {
    font-size: 17px !important;
    margin-bottom: 4px !important;
}

.level-card p {
    font-size: 14px !important;
    margin: 2px 0 !important;
}
@media (min-width: 768px) {
    .level-cards {
        max-width: 800px !important;
    }
    .level-card {
        max-width: 750px !important;
        padding: 15px 25px !important;
    }
}
#level-select-screen {
    background: url('assets/images/level-select-bg.png') center/cover fixed !important;
    min-height: 100vh !important;
    height: auto !important;
}

/* Убедись что псевдо-элемент тоже на всю высоту */
#level-select-screen::before {
    content: '';
    position: fixed; /* ← ВАЖНО: фиксированное положение */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    border-radius: 0; /* убрать скругления */
}
/* БЛОК АВТОРИЗАЦИИ */
.auth-block {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 15px 25px;
    margin: 10px auto 20px auto;
    display: flex;
    gap: 15px;
    justify-content: center;
    max-width: 400px;
}

.auth-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.register-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
/* Стили для блока авторизации */
.auth-block {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 10px auto 20px auto;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.auth-form h3 {
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

.auth-input {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #1f2937;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.login-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.register-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.auth-message {
    text-align: center;
    margin: 10px 0 0 0;
    font-size: 14px;
    min-height: 20px;
}

.auth-message.success {
    color: #10b981;
}

.auth-message.error {
    color: #ef4444;
}
/* Стили для блока статуса авторизации */
.auth-status-block {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 15px 25px;
    margin: 10px auto 20px auto;
    max-width: 400px;
    text-align: center;
}

.auth-status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.auth-greeting {
    color: white;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

#user-email-display {
    color: #10b981;
    font-weight: bold;
}

.logout-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}
.back-level-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.back-level-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}
/* Стили для общего хедера */
.game-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c5530 0%, #1a3c1e 100%);
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    border-bottom: 3px solid #4a7c59;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Левая часть - кнопка назад */
.header-left .back-level-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid #4a7c59;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.header-left .back-level-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Центральная часть - бюджет */
.budget-display {
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid #4a7c59;
}

.budget-label {
    color: #a8d5ba;
    font-size: 14px;
    margin-right: 8px;
}

.budget-value {
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

/* Правая часть - авторизация */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-header {
        padding: 8px 15px;
    }
    
    .budget-display {
        order: -1; /* Бюджет сверху на мобильных */
    }
}
/* Стили для авторизации в хедере */
.header-right .auth-block {
    display: flex;
    align-items: center;
}

.header-right .auth-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-right .auth-input {
    padding: 6px 10px;
    border: 1px solid #4a7c59;
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    font-size: 12px;
    width: 120px;
}

.header-right .auth-btn {
    padding: 6px 12px;
    background: #4a7c59;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.header-right .auth-btn:hover {
    background: #3a6c49;
}

.header-right .auth-message {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 12px;
    min-width: 200px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .header-right .auth-form {
        flex-direction: column;
        gap: 5px;
    }
    
    .header-right .auth-input {
        width: 100px;
        font-size: 11px;
    }
    
    .header-right .auth-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
}
/* === КОМПАКТНЫЙ ХЕДЕР БЕЗ УМЕНЬШЕНИЯ ШРИФТОВ === */

/* Базовые стили для ПК */
.game-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    border-bottom: 2px solid #ff8c00;
    width: 100%;
    max-width: 900px;
    height: 55px;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 35px;
    gap: 10px;
}

/* Левая часть - кнопка назад */
.header-left {
    flex-shrink: 0;
    min-width: 160px;
}

.header-left .back-level-btn {
    background: white;
    border: 2px solid #ff8c00;
    color: #1f2937;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Центр - бюджет */
.budget-display {
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: 2px solid #ff8c00;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0 10px;
}

.budget-label {
    color: #1f2937;
    font-size: 14px;
    margin-right: 5px;
    font-weight: 600;
}

.budget-value {
    color: #ff8c00;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

/* Правая часть - авторизация */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 200px;
    justify-content: flex-end;
}

/* Авторизованный статус */
.auth-status-block {
    margin: 0;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    border: 2px solid #ff8c00;
    height: 35px;
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.auth-status-content {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    width: 100%;
    min-width: 0;
}

.auth-greeting {
    color: #1f2937;
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#user-email-display {
    color: #ff8c00;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    padding: 6px 10px;
    background: white;
    color: #ff4500;
    border: 2px solid #ff4500;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    height: 31px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: #ff4500;
    color: white;
}

/* === КОМПАКТНАЯ МОБИЛЬНАЯ ВЕРСИЯ === */
@media (max-width: 768px) {
    .game-header {
        max-width: 98% !important;
        padding: 8px 0;
        height: 50px;
    }
    
    .header-container {
        padding: 0 10px;
    }
    
    .header-content {
        height: 34px;
        gap: 6px;
    }
    
    /* Левая часть - кнопка назад (мобильная) */
    .header-left {
        min-width: 120px;
    }
    
    .header-left .back-level-btn {
        padding: 5px 10px;
        font-size: 13px;
        height: 32px;
        border-width: 1px;
    }
    
    /* Центр - бюджет (мобильная) */
    .budget-display {
        padding: 5px 10px;
        border-width: 1px;
        height: 32px;
        margin: 0 5px;
        flex-shrink: 1;
        min-width: 80px;
    }
    
    .budget-label {
        font-size: 13px;
        margin-right: 3px;
    }
    
    .budget-value {
        font-size: 13px;
    }
    
    /* Правая часть - авторизация (мобильная) */
    .header-right {
        min-width: 150px;
        gap: 6px;
        flex-shrink: 1;
    }
    
    .auth-status-block {
        padding: 5px 8px;
        border-width: 1px;
        height: 32px;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .auth-status-content {
        gap: 6px;
    }
    
    .auth-greeting {
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }
    
    #user-email-display {
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }
    
    .logout-btn {
        padding: 4px 8px;
        font-size: 12px;
        height: 28px;
        border-width: 1px;
        flex-shrink: 0;
    }
    
    /* Еще компактнее для очень маленьких экранов */
    @media (max-width: 360px) {
        .game-header {
            height: 45px;
            padding: 6px 0;
        }
        
        .header-content {
            height: 32px;
            gap: 4px;
        }
        
        .header-left {
            min-width: 100px;
        }
        
        .header-left .back-level-btn {
            font-size: 12px;
            padding: 4px 8px;
            height: 30px;
        }
        
        .budget-display {
            padding: 4px 8px;
            height: 30px;
            margin: 0 3px;
            min-width: 70px;
        }
        
        .budget-label {
            font-size: 12px;
        }
        
        .budget-value {
            font-size: 12px;
        }
        
        .header-right {
            min-width: 130px;
            gap: 4px;
        }
        
        .auth-status-block {
            padding: 4px 6px;
            height: 30px;
        }
        
        .auth-greeting {
            font-size: 11px;
        }
        
        #user-email-display {
            font-size: 11px;
        }
        
        .logout-btn {
            padding: 3px 6px;
            font-size: 11px;
            height: 26px;
        }
    }
}

/* Сдвигаем контент под хедер */
body {
    padding-top: 65px;
}

@media (max-width: 768px) {
    body {
        padding-top: 55px;
    }
}

@media (max-width: 360px) {
    body {
        padding-top: 50px;
    }
}

/* Стартовый экран без отступа */
#start-screen {
    padding-top: 0 !important;
}

/* Убираем лишние отступы у игровых экранов */
#game-screen,
#level-select-screen,
#business-start-screen,
#facility-equipment-screen {
    padding-top: 5px !important;
}
/* === ПРОСТАЯ КНОПКА "ВЫЙТИ" БЕЗ ОБВОДКИ === */

.logout-btn {
    padding: 6px 12px;
    background: #ff4500;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 30px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.logout-btn:hover {
    background: #e63e00;
    transform: none;
}

/* Мобильная версия кнопки */
@media (max-width: 768px) {
    .logout-btn {
        padding: 4px 10px;
        font-size: 12px;
        height: 28px;
        min-width: 55px;
        border-radius: 3px;
    }
}

@media (max-width: 360px) {
    .logout-btn {
        padding: 3px 8px;
        font-size: 11px;
        height: 26px;
        min-width: 50px;
    }
}
/* Увеличиваем высоту хедера */
.game-header {
    height: 70px; /* Было 55px */
    padding: 12px 0;
}

/* Центрируем содержимое по вертикали */
.header-content {
    height: 46px; /* Было 35px */
    align-items: center;
}

/* Увеличиваем кнопки и поля */
.header-left .back-level-btn,
.budget-display,
.auth-status-block {
    height: 40px; /* Было 35px */
    padding: 8px 15px;
}

/* Делаем кнопку "Войти" в хедере */
.login-header-btn {
    padding: 8px 16px;
    background: #ff8c00;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    white-space: nowrap;
}
/* Стили для кнопки Войти в хедере */
.login-header-btn {
    padding: 8px 16px;
    background: #ff8c00;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.login-header-btn:hover {
    background: #e67e00;
    transform: translateY(-1px);
}

/* Увеличиваем высоту хедера */
.game-header {
    height: 70px;
    padding: 12px 0;
}

.header-content {
    height: 46px;
}

/* Стили для модального окна авторизации */
.auth-modal-content {
    max-width: 400px;
    padding: 30px;
}

.auth-modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #1f2937;
}

.auth-modal-content .auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
/* === КОМПАКТНЫЙ ХЕДЕР ДЛЯ МОБИЛЬНЫХ === */

/* Базовые стили для ПК */
.game-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    border-bottom: 2px solid #ff8c00;
    width: 100%;
    max-width: 900px;
    height: 60px; /* Уменьшаем высоту */
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 40px;
    gap: 8px;
}

/* Левая часть - кнопка назад */
.header-left {
    flex-shrink: 0;
    min-width: 140px;
}

.header-left .back-level-btn {
    background: white;
    border: 2px solid #ff8c00;
    color: #1f2937;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Центр - бюджет */
.budget-display {
    background: white;
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid #ff8c00;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0 5px;
}

.budget-label {
    color: #1f2937;
    font-size: 12px;
    margin-right: 4px;
    font-weight: 600;
}

.budget-value {
    color: #ff8c00;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

/* Правая часть - авторизация */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 120px;
    justify-content: flex-end;
}

/* Кнопка Войти в хедере */
.login-header-btn {
    padding: 6px 12px;
    background: #ff8c00;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 32px;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.login-header-btn:hover {
    background: #e67e00;
}

/* Авторизованный статус */
.auth-status-block {
    margin: 0;
    padding: 6px 8px;
    background: white;
    border-radius: 6px;
    border: 2px solid #ff8c00;
    height: 32px;
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.auth-status-content {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    width: 100%;
    min-width: 0;
}

.auth-greeting {
    color: #1f2937;
    font-size: 11px;
    margin: 0;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#user-email-display {
    color: #ff8c00;
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    padding: 4px 8px;
    background: #ff4500;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    height: 24px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

/* === АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 768px) {
    .game-header {
        max-width: 98% !important;
        padding: 8px 0;
        height: 50px; /* Еще компактнее на мобильных */
    }
    
    .header-container {
        padding: 0 10px;
    }
    
    .header-content {
        height: 34px;
        gap: 5px;
    }
    
    /* Левая часть - кнопка назад (мобильная) */
    .header-left {
        min-width: 110px;
    }
    
    .header-left .back-level-btn {
        padding: 4px 8px;
        font-size: 11px;
        height: 28px;
        border-width: 1px;
    }
    
    /* Центр - бюджет (мобильная) */
    .budget-display {
        padding: 4px 8px;
        border-width: 1px;
        height: 28px;
        margin: 0 3px;
        flex-shrink: 1;
        min-width: 70px;
    }
    
    .budget-label {
        font-size: 11px;
        margin-right: 2px;
    }
    
    .budget-value {
        font-size: 11px;
    }
    
    /* Правая часть - авторизация (мобильная) */
    .header-right {
        min-width: 100px;
        gap: 5px;
        flex-shrink: 1;
    }
    
    .auth-status-block {
        padding: 4px 6px;
        border-width: 1px;
        height: 28px;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .auth-status-content {
        gap: 5px;
    }
    
    .auth-greeting {
        font-size: 10px;
        flex: 1;
        min-width: 0;
    }
    
    #user-email-display {
        font-size: 10px;
        flex: 1;
        min-width: 0;
    }
    
    .logout-btn {
        padding: 3px 6px;
        font-size: 10px;
        height: 22px;
        border-width: 1px;
        flex-shrink: 0;
    }
    
    .login-header-btn {
        padding: 4px 8px;
        font-size: 11px;
        height: 28px;
        border-width: 1px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .game-header {
        height: 45px;
        padding: 6px 0;
    }
    
    .header-content {
        height: 32px;
        gap: 3px;
    }
    
    .header-left {
        min-width: 90px;
    }
    
    .header-left .back-level-btn {
        font-size: 10px;
        padding: 3px 6px;
        height: 26px;
    }
    
    .budget-display {
        padding: 3px 6px;
        height: 26px;
        margin: 0 2px;
        min-width: 60px;
    }
    
    .budget-label {
        font-size: 10px;
    }
    
    .budget-value {
        font-size: 10px;
    }
    
    .header-right {
        min-width: 80px;
        gap: 3px;
    }
    
    .auth-status-block {
        padding: 3px 5px;
        height: 26px;
    }
    
    .auth-greeting {
        font-size: 9px;
    }
    
    #user-email-display {
        font-size: 9px;
    }
    
    .logout-btn {
        padding: 2px 4px;
        font-size: 9px;
        height: 20px;
    }
    
    .login-header-btn {
        padding: 3px 6px;
        font-size: 10px;
        height: 26px;
    }
}

/* Сдвигаем контент под хедер */
body {
    padding-top: 65px;
}

@media (max-width: 768px) {
    body {
        padding-top: 55px;
    }
}

@media (max-width: 360px) {
    body {
        padding-top: 50px;
    }
}
/* Самый простой способ */
body:has(#start-screen:not(.hidden)) .game-header {
    display: none !important;
}

body:has(#start-screen:not(.hidden)) {
    padding-top: 0 !important;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: auto;
    background-color: white; /* ← МЕНЯЕМ НА БЕЛЫЙ */
    user-select: none;
    padding: 10px;
}
/* ХЕДЕР В ОДНУ СТРОКУ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .game-header {
        height: 50px !important;
        padding: 5px 0 !important;
    }
    
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 40px !important;
        gap: 5px !important;
    }
    
    /* Левая часть - кнопка назад */
    .header-left {
        flex: 0 0 auto !important;
        min-width: 120px !important;
    }
    
    .header-left .back-level-btn {
        font-size: 11px !important;
        padding: 6px 8px !important;
        height: 30px !important;
        white-space: nowrap !important;
    }
    
    /* Центр - бюджет */
    .budget-display {
        flex: 0 0 auto !important;
        padding: 6px 8px !important;
        height: 30px !important;
        margin: 0 !important;
        min-width: 80px !important;
    }
    
    .budget-label {
        font-size: 11px !important;
    }
    
    .budget-value {
        font-size: 11px !important;
    }
    
    /* Правая часть - кнопка Войти */
    .header-right {
        flex: 0 0 auto !important;
        min-width: 60px !important;
    }
    
    .login-header-btn {
        font-size: 11px !important;
        padding: 6px 8px !important;
        height: 30px !important;
        white-space: nowrap !important;
    }
    
    /* Статус авторизации */
    .auth-status-block {
        height: 30px !important;
        padding: 4px 6px !important;
        min-width: 120px !important;
    }
    
    .auth-greeting {
        font-size: 10px !important;
    }
    
    .logout-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        height: 22px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .header-left .back-level-btn {
        font-size: 10px !important;
        padding: 5px 6px !important;
    }
    
    .budget-display {
        padding: 5px 6px !important;
        min-width: 70px !important;
    }
    
    .login-header-btn {
        font-size: 10px !important;
        padding: 5px 6px !important;
    }
}
.level-select-title {
    display: none !important;
}
/* ЖЕСТКИЙ ФИКС ДЛЯ МОБИЛЬНОГО ХЕДЕРА */
@media (max-width: 768px) {
    .game-header {
        height: 50px !important;
        padding: 5px 0 !important;
    }
    
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 40px !important;
        gap: 5px !important;
        width: 100% !important;
    }
    
    /* УБИРАЕМ header-center */
    .header-center {
        display: contents !important;
    }
    
    /* Левая часть - кнопка назад */
    .header-left {
        flex: 0 0 auto !important;
        min-width: 100px !important;
        max-width: 120px !important;
    }
    
    #global-back-btn {
        font-size: 11px !important;
        padding: 6px 8px !important;
        height: 30px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Центр - бюджет */
    .budget-display {
        flex: 0 0 auto !important;
        padding: 6px 8px !important;
        height: 30px !important;
        margin: 0 !important;
        min-width: 70px !important;
        max-width: 90px !important;
    }
    
    .budget-label {
        font-size: 11px !important;
        display: inline !important;
    }
    
    .budget-value {
        font-size: 11px !important;
        display: inline !important;
    }
    
    /* Правая часть - кнопка Войти */
    .header-right {
        flex: 0 0 auto !important;
        min-width: 50px !important;
        max-width: 80px !important;
    }
    
    #header-login-btn {
        font-size: 11px !important;
        padding: 6px 8px !important;
        height: 30px !important;
        white-space: nowrap !important;
        width: 100% !important;
    }
    
    /* Статус авторизации */
    #auth-status-block {
        height: 30px !important;
        padding: 4px 6px !important;
        min-width: 120px !important;
        max-width: 150px !important;
    }
    
    .auth-greeting {
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    #logout-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        height: 22px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    #global-back-btn {
        font-size: 10px !important;
        padding: 5px 6px !important;
    }
    
    .budget-display {
        padding: 5px 6px !important;
        min-width: 60px !important;
    }
    
    .budget-label, .budget-value {
        font-size: 10px !important;
    }
    
    #header-login-btn {
        font-size: 10px !important;
        padding: 5px 6px !important;
    }
}
@media (max-width: 768px) {
    .budget-display {
        min-width: 85px !important; /* Было 70px */
        max-width: 100px !important; /* Было 90px */
        padding: 6px 10px !important; /* Добавляем отступы */
    }
}
/* Добавляем отступ сверху для экрана выбора уровня */
#level-select-screen {
    padding-top: 25px !important; /* Было 15px */
}

/* Или добавляем отступ конкретно для заголовков глав */
.chapter-header {
    margin-top: 20px !important;
}
@media (max-width: 768px) {
    /* Бюджет - делаем рамку еще шире */
    .budget-display {
        min-width: 105px !important; /* +20px */
        max-width: 120px !important; /* +20px */
        padding: 6px 12px !important;
    }
    
    /* Кнопку назад смещаем влево */
    .header-left {
        margin-left: -40px !important;
    }
}
/* Делаем отступ для внутреннего хедера игрового экрана */
#game-screen .game-header {
    margin-top: 60px !important; /* Отступ под фиксированным хедером */
    padding-top: 10px !important;
}

/* Или добавляем отступ для всего игрового экрана кроме хедера */
#game-screen {
    padding-top: 60px !important;
}

#game-screen .game-header {
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
}
#level-select-screen,
#game-screen,
#win-screen,
#lose-screen,
#business-start-screen,
#facility-equipment-screen {
    padding-top: 70px !important;
    /* Исправляем для мобильных - внутренний хедер игры */
@media (max-width: 768px) {
    #game-screen .game-header {
        display: flex !important; /* Возвращаем отображение */
        flex-direction: row !important;
        justify-content: space-between !important;
        margin-top: 60px !important;
        padding: 10px !important;
    }
    
    /* Делаем закругление углов для игрового контейнера */
    #game-screen .game-container,
    #game-screen .settings-container,
    #game-screen .playground-container {
        border-radius: 12px !important;
    }
    
    /* И для карточек настроек */
    #game-screen .setting-item {
        border-radius: 10px !important;
    }
}
}
@media (max-width: 768px) {
    #game-screen .game-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 60px !important;
        padding: 10px 15px !important;
        width: 100% !important;
    }
    
    /* Левая часть - название уровня и таймер */
    #game-screen .header-left {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-left: 0 !important;
        transform: none !important;
    }
    
    /* Правая часть - оставляем пустой или для сообщений */
    #game-screen .header-right {
        display: flex !important;
        align-items: center !important;
    }
    
    /* Заголовок уровня */
    #game-screen .level-name {
        font-size: 16px !important;
        font-weight: bold !important;
        color: #3b82f6 !important;
        margin-bottom: 2px !important;
    }
    
    /* Таймер */
    #game-screen .timer {
        font-size: 18px !important;
        font-weight: bold !important;
        color: #10b981 !important;
    }
}
/* === ИСПРАВЛЕНИЯ ДЛЯ ВНУТРЕННЕГО ХЕДЕРА УРОВНЯ === */

/* Основной контейнер game-screen */
#game-screen {
    padding-top: 70px !important; /* Отступ под фиксированным хедером */
    height: calc(100vh - 70px) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Внутренний хедер уровня */
#game-screen .game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px !important;
    flex-wrap: wrap;
    flex: none !important;
    min-height: 40px !important;
    padding: 0 5px;
    order: 1;
}

/* Левая часть - название уровня и таймер */
#game-screen .header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 45%;
    padding: 0 5px;
}

/* Правая часть - сообщения */
#game-screen .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 45%;
    padding: 0 5px;
}

/* Название уровня */
#game-screen .level-name {
    font-size: 16px !important;
    font-weight: bold;
    color: #3b82f6;
    text-align: left;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
}

/* Таймер */
#game-screen .timer {
    font-size: 20px !important;
    font-weight: bold;
    color: #10b981;
    text-align: left;
    margin-top: -2px !important;
}

/* Сообщения обратной связи */
#game-screen .feedback-message {
    height: 22px;
    font-weight: bold;
    margin: 2px 0;
    font-size: 15px;
    text-align: right;
    width: 100%;
    padding: 0 5px;
    animation: fadeInOut 3s ease forwards;
}

/* Описание уровня */
.level-description {
    order: 2;
    margin-bottom: 8px !important;
}

/* Игровой контейнер */
.game-container {
    order: 3;
    flex: 1 !important;
}

/* Кнопки управления */
.game-controls {
    order: 4;
    margin-top: auto !important;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    #game-screen {
        padding-top: 60px !important;
        height: calc(100vh - 60px) !important;
    }
    
    #game-screen .game-header {
        min-height: 35px !important;
        margin-bottom: 6px !important;
    }
    
    #game-screen .level-name {
        font-size: 14px !important;
    }
    
    #game-screen .timer {
        font-size: 18px !important;
    }
    
    .level-description {
        margin-bottom: 6px !important;
    }
}

@media (max-width: 480px) {
    #game-screen .game-header {
        min-height: 30px !important;
        margin-bottom: 4px !important;
    }
    
    #game-screen .level-name {
        font-size: 13px !important;
    }
    
    #game-screen .timer {
        font-size: 16px !important;
    }
    
    .level-description {
        margin-bottom: 4px !important;
    }
}
/* === МОБИЛЬНАЯ ВЕРСИЯ ХЕДЕРА УРОВНЯ === */

@media (max-width: 768px) {
    #game-screen .game-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 5px !important;
        flex-wrap: nowrap;
        min-height: 25px !important;
        padding: 0 5px;
        gap: 8px;
    }
    
    /* Левая часть - в одну строку */
    #game-screen .header-left {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }
    
    /* Правая часть */
    #game-screen .header-right {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        min-width: 0;
    }
    
    /* Название уровня компактное */
    #game-screen .level-name {
        font-size: 12px !important;
        font-weight: bold;
        color: #3b82f6;
        white-space: nowrap;
        margin: 0 !important;
        line-height: 1.1 !important;
    }
    
    /* Таймер компактный */
    #game-screen .timer {
        font-size: 14px !important;
        font-weight: bold;
        color: #10b981;
        white-space: nowrap;
        margin: 0 !important;
    }
    
    /* Сообщения обратной связи компактные */
    #game-screen .feedback-message {
        font-weight: bold;
        font-size: 11px !important;
        white-space: nowrap;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        text-align: right;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    #game-screen .game-header {
        min-height: 22px !important;
        gap: 5px;
    }
    
    #game-screen .header-left {
        gap: 8px;
    }
    
    #game-screen .level-name {
        font-size: 11px !important;
    }
    
    #game-screen .timer {
        font-size: 13px !important;
    }
    
    #game-screen .feedback-message {
        font-size: 10px !important;
    }
}

/* Для экстремально маленьких */
@media (max-width: 360px) {
    #game-screen .header-left {
        gap: 5px;
    }
    
    #game-screen .level-name {
        font-size: 10px !important;
    }
    
    #game-screen .timer {
        font-size: 12px !important;
    }
    
    #game-screen .feedback-message {
        font-size: 9px !important;
    }
}
/* === ФИКС ДЛЯ ЭКРАНА ОСНАЩЕНИЯ НА МОБИЛЬНЫХ === */

@media (max-width: 768px) {
    #facility-equipment-screen {
        padding-top: 60px !important; /* Отступ под хедером */
        height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
    }
    
    /* Убедимся что хедер поверх всего */
    .game-header {
        z-index: 1000 !important;
    }
    
    /* Увеличиваем отступ для контента */
    .equipment-win-content {
        padding-top: 10px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    #facility-equipment-screen {
        padding-top: 55px !important;
        height: calc(100vh - 55px) !important;
    }
}
/* === ГАРАНТИРОВАННЫЙ ФИКС ДЛЯ ХЕДЕРА НА ВСЕХ ЭКРАНАХ === */

/* Показываем хедер на всех экранах кроме стартового */
#game-header {
    display: flex !important;
}

/* Только на стартовом экране скрываем хедер */
#start-screen:not(.hidden) ~ #game-header,
body:has(#start-screen:not(.hidden)) #game-header {
    display: none !important;
}

/* Отступы для всех экранов кроме стартового */
#level-select-screen:not(.hidden),
#game-screen:not(.hidden),
#win-screen:not(.hidden),
#lose-screen:not(.hidden),
#business-start-screen:not(.hidden),
#facility-equipment-screen:not(.hidden) {
    padding-top: 70px !important;
}

/* Мобильные отступы */
@media (max-width: 768px) {
    #level-select-screen:not(.hidden),
    #game-screen:not(.hidden),
    #win-screen:not(.hidden),
    #lose-screen:not(.hidden),
    #business-start-screen:not(.hidden),
    #facility-equipment-screen:not(.hidden) {
        padding-top: 60px !important;
    }
}
/* === ФИКС ДЛЯ IPHONE X (НОВИЧОК) === */

/* 1. Фиксированный хедер - добавляем отступ для "чёлки" */
.game-header {
    padding-top: 20px !important; /* Добавляем место для "чёлки" */
}

/* 2. Все основные экраны - добавляем отступ под хедер + "чёлка" */
#level-select-screen,
#game-screen, 
#win-screen,
#lose-screen,
#business-start-screen,
#facility-equipment-screen {
    padding-top: 90px !important; /* Было 70px + 20px для "чёлки" */
}

/* 3. Для мобильных - немного меньше */
@media (max-width: 768px) {
    .game-header {
        padding-top: 15px !important;
    }
    
    #level-select-screen,
    #game-screen,
    #win-screen, 
    #lose-screen,
    #business-start-screen,
    #facility-equipment-screen {
        padding-top: 75px !important; /* Было 60px + 15px для "чёлки" */
    }
}

/* 4. Для очень маленьких iPhone */
@media (max-width: 380px) {
    .game-header {
        padding-top: 10px !important;
    }
    
    #level-select-screen,
    #game-screen,
    #win-screen,
    #lose-screen, 
    #business-start-screen,
    #facility-equipment-screen {
        padding-top: 70px !important; /* Было 60px + 10px для "чёлки" */
    }
}
/* === ФИКС ОТСТУПА ДЛЯ IPHONE === */
.game-header {
    padding-bottom: 3px !important;
}
/* === ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНОГО ХЕДЕРА === */
@media (max-width: 768px) {
    .game-header {
        height: 55px !important;
        padding: 8px 10px !important;
    }
    
    .header-container {
        padding: 0 5px !important;
    }
    
    .header-content {
        height: 39px !important;
        gap: 8px !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* Левая часть - кнопка назад (ПРАВИЛЬНОЕ переименование) */
    .header-left {
        min-width: 65px !important;
        max-width: 65px !important;
        flex-shrink: 0;
    }
    
    #global-back-btn {
        padding: 6px 8px !important;
        font-size: 11px !important;
        height: 32px !important;
        width: 100% !important;
        position: relative;
        overflow: hidden;
    }
    
    /* ПРАВИЛЬНО скрываем оригинальный текст */
    #global-back-btn {
        font-size: 0 !important; /* Скрываем весь текст */
    }
    
    /* Показываем "Уровни" через псевдоэлемент */
    #global-back-btn::before {
        content: "Уровни";
        font-size: 11px !important;
        font-weight: 600;
        color: #1f2937;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }
    
    /* Центр - бюджет (растягивающаяся рамка) */
    .header-center {
        flex: 1 !important;
        min-width: 90px !important;
        max-width: 120px !important;
        display: flex;
        justify-content: center;
    }
    
    .budget-display {
        padding: 6px 10px !important;
        height: 32px !important;
        margin: 0 !important;
        min-width: 90px !important;
        max-width: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        flex-shrink: 1;
        box-sizing: border-box;
    }
    
    .budget-label {
        font-size: 11px !important;
        margin-right: 3px !important;
        display: inline !important;
        flex-shrink: 0;
    }
    
    .budget-value {
        font-size: 11px !important;
        display: inline !important;
        flex-shrink: 0;
    }
    
    /* Правая часть - авторизация */
    .header-right {
        min-width: 60px !important;
        max-width: 60px !important;
        flex-shrink: 0;
    }
    
    #header-login-btn {
        padding: 6px 8px !important;
        font-size: 11px !important;
        height: 32px !important;
        width: 100% !important;
        min-width: auto !important;
    }
    
    /* Статус авторизации */
    #auth-status-block {
        padding: 4px 6px !important;
        height: 32px !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .auth-status-content {
        gap: 4px !important;
        justify-content: center !important;
    }
    
    .auth-greeting {
        display: none !important;
    }
    
    #logout-btn {
        padding: 4px 8px !important;
        font-size: 10px !important;
        height: 24px !important;
        width: 100% !important;
        min-width: auto !important;
    }
}

/* Для очень узких экранов */
@media (max-width: 360px) {
    .game-header {
        padding: 6px 8px !important;
        height: 50px !important;
    }
    
    .header-content {
        gap: 6px !important;
    }
    
    .header-left {
        min-width: 60px !important;
        max-width: 60px !important;
    }
    
    #global-back-btn {
        padding: 5px 6px !important;
        font-size: 10px !important;
        height: 28px !important;
    }
    
    #global-back-btn::before {
        font-size: 10px !important;
    }
    
    .header-center {
        min-width: 80px !important;
        max-width: 100px !important;
    }
    
    .budget-display {
        padding: 5px 8px !important;
        height: 28px !important;
        min-width: 80px !important;
        max-width: 100px !important;
    }
    
    .budget-label, .budget-value {
        font-size: 10px !important;
    }
    
    .header-right {
        min-width: 55px !important;
        max-width: 55px !important;
    }
    
    #header-login-btn {
        padding: 5px 6px !important;
        height: 28px !important;
        font-size: 10px !important;
    }
}

/* Восстанавливаем оригинальный текст на ПК */
@media (min-width: 769px) {
    #global-back-btn {
        font-size: 14px !important; /* Восстанавливаем оригинальный текст */
    }
    
    #global-back-btn::before {
        content: "" !important; /* Убираем "Уровни" */
    }
}