/* Базовая тема для Project_Ing / Невской Деревушки */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 4px;
}

.field-block {
    margin-bottom: 16px;
}

button {
    padding: 8px 16px;
    font-size: 15px;
    cursor: pointer;
}

h1 {
    margin-top: 0;
}

/* Блоки ошибок и ответа */

.error {
    color: #b00020;
    margin: 10px 0;
}

.answer-block {
    margin-top: 20px;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 4px;
    white-space: pre-wrap;
}

/* --- ИГРОВОЙ ЭКРАН Невской Деревушки --- */

.game-body {
    margin: 0;
    background: #101820;
    color: #f0f0f0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.game-layout {
    display: grid;
    grid-template-rows: 60px 1fr 100px;
    grid-template-columns: 260px 1fr 260px;
    grid-template-areas:
        "top-bar top-bar top-bar"
        "left-panel center-area right-panel"
        "bottom-bar bottom-bar bottom-bar";
    height: 100vh;
}

/* Области */

.top-bar {
    grid-area: top-bar;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr 1.5fr;
    align-items: center;
    padding: 0 16px;
    background: #151d27;
    border-bottom: 1px solid #273344;
}

.left-panel {
    grid-area: left-panel;
    padding: 8px;
    background: #141920;
    border-right: 1px solid #273344;
    overflow-y: auto;
}

.center-area {
    grid-area: center-area;
    padding: 8px;
    background: #101820;
    overflow: hidden;
}

.right-panel {
    grid-area: right-panel;
    padding: 8px;
    background: #141920;
    border-left: 1px solid #273344;
    overflow-y: auto;
}

.bottom-bar {
    grid-area: bottom-bar;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 16px;
    background: #151d27;
    border-top: 1px solid #273344;
}

/* Верхняя панель */

.game-logo {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.top-bar__year-block {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.top-bar__year-value {
    font-size: 20px;
    font-weight: 700;
}

.top-bar__era-badge {
    padding: 2px 6px;
    border-radius: 4px;
    background: #273344;
    font-size: 12px;
}

.top-bar__time-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.time-speed {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.top-bar__village-status {
    text-align: right;
    font-size: 13px;
    opacity: 0.9;
}

/* Панели */

.panel {
    background: #171e27;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #273344;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.panel__header {
    padding: 6px 8px;
    border-bottom: 1px solid #273344;
}

.panel__title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.panel__content {
    padding: 6px 8px;
}

.panel__footer {
    padding: 6px 8px;
    border-top: 1px solid #273344;
}

/* Ресурсы */

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resource-row {
    display: grid;
    grid-template-columns: 20px 1fr auto 20px;
    align-items: center;
    gap: 4px;
    padding: 4px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.resource-row__icon {
    width: 18px;
    height: 18px;
    background: #3b4a5f;
    border-radius: 3px;
}

.resource-row__name {
    font-size: 13px;
}

.resource-row__amount {
    font-size: 13px;
    text-align: right;
}

.resource-row__trend {
    font-size: 11px;
    text-align: center;
}

.resource-row__trend--up {
    color: #4caf50;
}
.resource-row__trend--down {
    color: #f44336;
}

/* Навигация / действия */

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn {
    width: 100%;
    padding: 6px 8px;
    text-align: left;
    border-radius: 4px;
    border: none;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    cursor: pointer;
    font-size: 13px;
}

.nav-btn--active {
    background: #273344;
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Центр / карта-заглушка */

.map-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #273344;
    background: radial-gradient(circle at top, #1f2a36, #0c1117);
    display: flex;
    flex-direction: column;
}

.map-placeholder__header {
    padding: 6px 10px;
    border-bottom: 1px solid #273344;
    font-size: 13px;
    opacity: 0.9;
}

.map-placeholder__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plot-grid {
    display: grid;
    grid-template-columns: repeat(2, 140px);
    gap: 8px;
}

.plot-tile {
    width: 140px;
    height: 80px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed #3a4a5f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Нижняя панель */

.bottom-bar__log {
    flex: 1;
    padding-right: 16px;
}

.log-entry {
    font-size: 12px;
    opacity: 0.9;
}

.log-entry__year {
    color: #9fb3ff;
    margin-right: 4px;
}

.bottom-bar__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 40%;
    font-size: 12px;
}

.hint-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #273344;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Кнопки игры */

.btn {
    border-radius: 4px;
    border: none;
    background: #273344;
    color: #f0f0f0;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
}

.btn-sm {
    padding: 2px 6px;
    font-size: 11px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-full {
    width: 100%;
}

.btn-active {
    background: #3c4d66;
}

/* Карточка действующего персонажа */

.panel--active-character .panel__content {
  display: flex;
  gap: 8px;
  align-items: center;
}

.active-character__avatar {
  flex: 0 0 48px;
}

.active-character__avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #273344;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.7;
}

.active-character__info {
  flex: 1;
  font-size: 12px;
}

.active-character__name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.active-character__meta {
  opacity: 0.85;
  margin-bottom: 2px;
}

.active-character__stat {
  opacity: 0.8;
  
  
}
/* --- ДОБЫЧА РЕСУРСОВ: УЧАСТКИ --- */

.gathering-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.gather-slot {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  box-shadow: 0 0 0 1px #273344;
  padding: 6px;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 120px;
}

.gather-slot__map {
  border-radius: 6px;
  background: radial-gradient(circle at top, #273344, #151d27);
  border: 1px dashed #3a4a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.gather-slot__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.gather-slot__selected {
  opacity: 0.85;
}

/* --- ДОБЫЧА: СПИСОК РЕСУРСОВ ДЛЯ УЧАСТКА --- */

.gathering-details {
  margin-top: 8px;
  background: #171e27;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #273344;
}

.gathering-placeholder {
  font-size: 12px;
  opacity: 0.8;
}

.gather-res-row {
  display: grid;
  grid-template-columns: 1.5fr auto auto auto;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.gather-res-row:last-child {
  border-bottom: none;
}

.gather-res-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-res-time,
.gather-res-yield {
  text-align: right;
}

.gather-res-action {
  text-align: right;
}
.center-area > .panel {
  max-width: 900px;
  margin: 0 auto;
}

