* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #1a1a2e;
  font-family: system-ui, sans-serif;
}

.game-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  color: #f5f5dc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.title {
  font-size: 18px;
  font-weight: bold;
  color: #daa520;
  border-bottom: 2px solid #daa520;
  padding-bottom: 8px;
}

.idle-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #2a2a4e;
  border-radius: 8px;
}

.idle-label {
  font-size: 14px;
}

.idle-value {
  font-size: 20px;
  font-weight: bold;
  color: #87ceeb;
}

.panels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.resource-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #2a2a4e;
  border-radius: 8px;
  min-height: 60px;
}

.panel-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
  flex-shrink: 0;
}

.panel-icon {
  font-size: 20px;
}

.panel-value {
  font-size: 12px;
  font-weight: bold;
  color: #87ceeb;
}

.panel-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-label {
  font-size: 12px;
  color: #aaa;
}

.panel-rate {
  font-size: 10px;
  color: #6b6;
}

.progress-bar {
  height: 16px;
  background: #1a1a2e;
  border-radius: 2px;
  overflow: hidden;
}

.panel-cost-info {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #888;
}

.cost-resource {
  color: #aaa;
}

.cost-people {
  color: #87ceeb;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a9, #6b6);
  border-radius: 2px;
}

.progress-fill.indeterminate {
  width: 100% !important;
  background: repeating-linear-gradient(
    -45deg,
    #4a9,
    #4a9 10px,
    #6b6 10px,
    #6b6 20px
  );
  background-size: 28.28px 100%;
  animation: stripe-move 0.3s linear infinite;
}

@keyframes stripe-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 28.28px 0;
  }
}

.panel-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 24px;
  font-weight: bold;
  flex-shrink: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.panel-btn.enabled {
  background: #daa520;
  color: #1a1a2e;
}

.panel-btn.enabled:active {
  transform: scale(0.95);
  background: #c49520;
}

.panel-btn.disabled {
  background: #444;
  color: #666;
  cursor: not-allowed;
}

.resource-panel.readonly {
  padding-right: 20px;
}

/* Bottom tabs */
.bottom-tabs {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #444;
  border-radius: 8px;
  background: #2a2a4e;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active {
  border-color: #daa520;
  background: #3a3a5e;
  color: #f5f5dc;
}

.tab-btn:active {
  transform: scale(0.98);
}

.tab-btn.pulse {
  animation: tab-pulse 1.5s ease-in-out infinite;
}

@keyframes tab-pulse {
  0%,
  100% {
    border-color: #444;
    box-shadow: none;
  }
  50% {
    border-color: #daa520;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.6);
  }
}
