body {
    margin: 0;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
    background-color: #87CEEB;
}

.hidden {
    display: none !important;
}

/* UI Игры */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M9 0v20h2V0zM0 9h20v2H0z" fill="white" stroke="black"/></svg>');
    background-size: contain;
}

#hotbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px;
    border-radius: 4px;
    pointer-events: auto;
}

.slot {
    width: 40px;
    height: 40px;
    background: rgba(100, 100, 100, 0.5);
    border: 2px solid #555;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    position: relative;
}

.slot.active {
    border-color: white;
    background: rgba(150, 150, 150, 0.6);
    transform: scale(1.1);
}

.slot span {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    text-shadow: 1px 1px 0 #000;
}

#inventory-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 10;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(5, 50px);
    grid-template-rows: repeat(4, 50px);
    gap: 5px;
    background: #c6c6c6;
    padding: 10px;
    border: 4px solid #555;
}

.inventory-grid .slot {
    background: #8b8b8b;
    border: 2px solid #373737;
    width: 50px;
    height: 50px;
    transform: none;
}

/* Экран Загрузки */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 30;
    color: white;
}

.progress-container {
    width: 300px;
    height: 20px;
    border: 2px solid white;
    background: #333;
    margin-top: 20px;
    border-radius: 4px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: #4caf50; /* Зеленый цвет */
    transition: width 0.1s linear;
}

#progress-text {
    margin-top: 10px;
    font-size: 1.2rem;
}

/* Меню */
#main-menu, #settings-menu, #blocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    color: white;
}

#main-menu h1, #settings-menu h1, #instructions h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 4px 4px 0 #000;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 200px;
}

button {
    background: #727272;
    border: 4px solid #373737;
    color: white;
    padding: 15px;
    font-size: 1.2rem;
    font-family: inherit;
    cursor: pointer;
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.5), 4px 4px 0 rgba(0,0,0,0.5);
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.95);
}

button:hover {
    background: #8b8b8b;
}

/* Меню Выбора Сида */
#seed-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 25;
    color: white;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 300px;
}

.input-group label {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

#seed-input {
    width: 100%;
    padding: 10px;
    font-size: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
    background: #333;
    border: 2px solid #555;
    color: white;
    outline: none;
    box-shadow: inset 4px 4px 0 rgba(0,0,0,0.5);
}

#seed-input:focus {
    border-color: white;
}

/* Стили для меню паузы */
#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20; /* Поверх игры */
}

#pause-menu h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px #000;
}

#pause-menu .menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Утилита для скрытия элементов */
.hidden {
    display: none !important;
}

/* Убедимся, что в главном меню интерфейс игры скрыт */
body.main-menu-active #game-ui {
    display: none;
}