:root {
    --hex-radius: 40px;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    width: 100%;
    height: 100%;
}

#menu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* 🔹 пространство между элементами */
    height: 100vh;
    background-color: #222;
    color: #fff;
    font-family: sans-serif;
}

#menu-container label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #ccc;
}

#menu-container input,
#menu-container select {
    margin-top: 5px;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    width: 300px;
}

#menu-container button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: steelblue;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s ease all;
}

#menu-container button:hover {
    background-color: dodgerblue;
}


/* 🔘 Базовый стиль кнопки */
#end-turn-button {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px 20px;
    
    border: none;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🔘 При отключении (на всякий случай fallback) */
#end-turn-button:disabled {
    background-color: #888;
    cursor: not-allowed;
}

/* 🔵 Стиль: ещё есть действия — кнопка синяя */
#end-turn-button.btn-pending {
    background-color: steelblue !important;
    color: #fff;
}

/* ✅ Стиль: все действия завершены — кнопка зелёная */
#end-turn-button.btn-done {
    background-color: limegreen !important;
    color: #000;
}

/* 🔘 Hover-эффект */
#end-turn-button:hover {
    opacity: 0.5;
}

#back-to-menu-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    background-color: #999;
    color: #000;
    z-index: 1000;
    border-radius: 4px;
    transition: 0.2s ease all;
}

#back-to-menu-button:hover {
    background-color: #bbb;
}

/* 💰 Панель экономики (сессия 23): токены, база, постройка, техи — сверху
   слева под End Turn (внизу — панель действий и ветерана). */
#economy-panel {
    position: absolute;
    top: 60px;
    left: 10px;
    max-width: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    z-index: 1000;
    font-family: sans-serif;
    color: #fff;
}

#economy-panel button {
    margin: 0 6px 4px 0;
    padding: 8px 10px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    background-color: goldenrod;
    color: #000;
    cursor: pointer;
    transition: 0.2s ease all;
}

#economy-panel button:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

#economy-panel button:hover:not(:disabled) {
    background-color: gold;
}

#economy-panel .economy-label {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 2px;
}

/* 🎮 Панель действий (сессия 15): Torp, Пауза — поверх карты, внизу слева.
   Без позиции кнопки уходили под холст (он на весь экран) и были не видны. */
#action-panel {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    z-index: 1000;
    font-family: sans-serif;
}

#action-panel button {
    padding: 10px 16px;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    background-color: steelblue;
    color: #fff;
    cursor: pointer;
}

#action-panel button:disabled {
    background-color: #555;
    color: #aaa;
    cursor: not-allowed;
}

#torp-button:not(:disabled) {
    background-color: darkorange;
    color: #000;
}


#cap-button:not(:disabled) {
    background-color: mediumseagreen;
    color: #000;
}

/* ⭐ Выбор апгрейда ветерана (прогрессия, сессия 22): над панелью действий. */
#upgrade-panel {
    position: absolute;
    bottom: 76px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 6px;
    z-index: 1001;
    font-family: sans-serif;
    color: #fff;
}

#upgrade-panel .upgrade-title {
    margin-bottom: 6px;
    font-size: 14px;
}

#upgrade-panel button {
    margin: 0 8px 0 0;
    padding: 10px 14px;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    background-color: gold;
    color: #000;
    cursor: pointer;
}

#upgrade-panel button:disabled {
    background-color: #555;
    color: #aaa;
    cursor: not-allowed;
}

#upgrade-panel button.upgrade-wait {
    background-color: #888;
}
