/* =========================================================
   ANNO COLLECTION BASE STYLE
   Moderne Grundstruktur für alle Anno-Spiele
   ========================================================= */

/* === Globale Variablen === */
:root {
  --font-main: "Arial", sans-serif;
  --color-text: #111;
  --color-bg: #000;
  --color-panel: rgba(255, 255, 255, 0.4);
  --color-panel-hover: rgba(255, 255, 255, 0.9);
  --color-border: rgba(255, 255, 255, 0.5);
  --color-line: rgba(255, 255, 255, 0.35);
  --color-accent: #bfa76a; /* wird pro Spiel überschrieben */
}

/* === Reset & Grundlayout === */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  scroll-behavior: smooth;
  text-align: center;
  overflow: hidden;
}

/* === Hintergrundbild, wird pro Spiel in eigener CSS gesetzt === */
.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* === Scrollbarer Hauptbereich === */
.scroll-content {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.15);
  padding-bottom: 80px;
}

/* === Header === */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 12px;
  margin: 12px auto;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(3px);
  box-shadow: 0 0 6px var(--color-border);
  position: sticky;
  top: 0;
  z-index: 5;
}

header h1 {
  margin: 0;
  font-weight: bold;
  color: var(--color-text);
  text-shadow: 0 0 10px #fff;
}

/* === Panels (Hintergrundboxen) === */
.panel {
  background: var(--color-panel);
  border-radius: 10px;
  padding: 10px;
  margin: 12px auto;
  max-width: 1800px;
  box-shadow: 0 0 6px var(--color-border);
  backdrop-filter: blur(3px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.panel:hover {
  box-shadow: 0 0 12px var(--color-panel-hover);
  transform: translateY(-2px);
}

/* === Eingaben & Buttons === */
input[type="number"], input[type="text"] {
  width: 110px;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #444;
  background: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

/* === Einwohner-Eingabe-Kacheln (nebeneinander) === */
.input-grid {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-direction: row;
  gap: 32px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 10px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 150, 100, 0.4) transparent;
}

.input-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: rgba(255, 255, 240, 0.35);
  border: 1px solid rgba(255, 230, 150, 0.5);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  width: 140px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(3px);
}

.input-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 16px rgba(255, 255, 200, 0.7);
}

.input-item img {
  height: 70px;
  width: 70px;
  border-radius: 50%;
  border: 3px solid #c6a646;
  background: radial-gradient(circle at center, #fff8e1 25%, #d4af37 95%);
  box-shadow: 0 0 10px rgba(200, 160, 50, 0.4);
  margin-bottom: 6px;
}

.input-item label {
  font-weight: bold;
  font-size: 1.05em;
  color: #3b2b08;
  margin-bottom: 6px;
}

.input-item input {
  width: 80%;
  text-align: center;
  font-size: 16px;
  border: 1px solid rgba(100, 80, 20, 0.4);
  border-radius: 6px;
  padding: 6px 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Basis-Button – Optik wird pro Spiel überschrieben */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #333;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover {
  background: #fff;
  box-shadow: 0 0 10px #fff;
  transform: scale(1.03);
}

/* === Linien === */
hr {
  width: 70%;
  border: none;
  height: 1px;
  background-color: var(--color-line);
  margin: 20px auto;
}

/* === Tabellen === */
table {
  border-collapse: separate;
  border-spacing: 8px;
  margin: 0 auto;
}
th, td {
  text-align: center;
  padding: 4px 6px;
}

/* === Produktionsketten / Panels – gemeinsame Breite === */
.panel,
#annoproduktionsketten {
  width: 85%;
  max-width: 1800px;
  margin: 0 auto;
}

/* === Ergebnisbox === */
#resultsBox {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}


/* === Hilfsklassen === */
.scroll-x {
  overflow-x: visible !important;
}

.results-table {
  table-layout: auto;
  width: 100%;
  word-break: break-word;
}

.results-table thead {
  background: rgba(255, 255, 255, 0.3);
  font-weight: bold;
  color: var(--color-text);
}

.results-table th,
.results-table td {
  white-space: nowrap;
}

@media (max-width: 1800px) {
  .results-table th,
  .results-table td {
    white-space: normal;
  }
}

.results-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.2s ease;
}

.results-table img {
  width: 48px;
  height: 48px;
}

.icon64 { width: 64px; height: 64px; }
.icon70 { width: 70px; height: 70px; }
.imgB  { width: 125px; height: auto; }
