/* -----------------------------------------------------------
   Schriftart lokal einbinden (Open Sans Condensed)
------------------------------------------------------------ */
@font-face {
  font-family: 'Open Sans Condensed';
  src: url('./font/static/OpenSans_Condensed-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* -----------------------------------------------------------
   CSS-Variablen für Farben, Schatten, etc.
------------------------------------------------------------ */
:root {
  --abo-green: #008A3B;
  --abo-green-light: #e7fbe5;
  --abo-blue: #3388ff;
  --card-radius: 22px;
  --card-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
}

/* -----------------------------------------------------------
   Box-Sizing global setzen
------------------------------------------------------------ */
* {
  box-sizing: border-box;
}

/* -----------------------------------------------------------
   Body, HTML & Container Styling
------------------------------------------------------------ */
html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Open Sans Condensed', sans-serif;
  background: var(--abo-green-light);
  color: #223;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2em;
}

.logo {
  position: fixed;   /* bleibt fest in der Ecke, auch beim Scrollen */
  top: 10px;
  left: 10px;
  height: 40px;      /* klein halten */
  width: auto;       /* Seitenverhältnis beibehalten */
  opacity: 0.9;      /* leicht transparent, wirkt dezenter */
  z-index: 2000;     /* sicher über anderen Elementen */
}

#game-instruction {
  display: none;
}

.app-container {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2em 2.5em;
  max-width: 900px;
  width: 100%;
  min-width: 300px;
  box-sizing: border-box;
  margin-bottom: 2em;
}

/* -----------------------------------------------------------
   Kartenbereich zentrieren
------------------------------------------------------------ */
#map {
  width: 100%;     /* volle Breite im Container */
  height: 500px;
  margin: 0 auto 10px auto;
  border: 1px solid #004d00;
  border-radius: 6px;
  display: block;
  max-width: 100%; /* maximal Containerbreite */
}

/* -----------------------------------------------------------
   Grundlegendes Styling für Body und HTML
------------------------------------------------------------ */
body, html {
  font-family: 'Open Sans Condensed', sans-serif;
  color: #004d00;
  background-color: var(--abo-green-light);
}

/* -----------------------------------------------------------
   Header Styling
------------------------------------------------------------ */
.abo-header {
  text-align: center;
}

.main-title {
  color: var(--abo-green);
  font-weight: 900;
  margin: 0 0 0.5em 0;
  user-select: none;
}

/* -----------------------------------------------------------
   Projekt-Labels und Hervorhebungen
------------------------------------------------------------ */
.project-label {
  font-weight: 600;
}

.project-name-highlight {
  font-weight: 900;
  color: var(--abo-green);
  text-shadow: 0 0 5px #a2e7a2;
  user-select: text;
}

/* -----------------------------------------------------------
   Info-Box / Steps Styling
------------------------------------------------------------ */
.abo-step {
  background: var(--abo-green-light);
  color: #2b6533;
  font-weight: 700;
  border-radius: 8px;
  text-align: center;
  line-height: 1.4em;
  user-select: none;
}

/* -----------------------------------------------------------
   Buttons Styling
------------------------------------------------------------ */
button {
  font-family: 'Open Sans Condensed', sans-serif;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.6em 1.6em;
  font-size: 1em;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#submit-btn,
#save-score-btn,
#skip-score-btn,
#restart-btn {
  background-color: var(--abo-green);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  user-select: none;
  display: inline-block;
  margin-top: 5px;
}

#submit-btn:hover,
#save-score-btn:hover,
#skip-score-btn:hover,
#restart-btn:hover {
  background-color: #006827;
}

#restart-btn {
  margin-top: 15px;
  display: none;
}

/* -----------------------------------------------------------
   Feedback Overlay (Popup Meldungen)
------------------------------------------------------------ */
#feedback-overlay {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--abo-green);
  color: white;
  font-weight: 700;
  font-size: 1.35em;
  padding: 1.2em 2em;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
  z-index: 10000;
  display: none;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

/* -----------------------------------------------------------
   Flexbox für Mode-Auswahl (Easy / Hard)
------------------------------------------------------------ */
.mode-selection {
  display: flex;
  gap: 2em;
  justify-content: center;
  max-width: 700px;
  margin: 2em auto;
  flex-wrap: wrap;
}

.mode-box {
  flex: 1 1 300px;  /* weniger Grundbreite */
  border: 2px solid var(--abo-green);
  border-radius: 8px;
  padding: 1em;
  background: var(--abo-green-light);
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.mode-box#hard-box {
  border-color: #007a24;
}

.mode-box h3 {
  margin-top: 0;
  color: #006726;
  font-weight: 700;
}

.mode-box#hard-box h3 {
  color: #004d14;
}

.mode-box:hover,
.mode-box:focus {
  box-shadow: 0 0 15px 3px rgba(0, 138, 59, 0.7);
  background-color: #cdefc0;
  outline: none;
}

/* -----------------------------------------------------------
   Highscore Tabelle Styling (max Breite wie Mode-Boxen)
------------------------------------------------------------ */
.highscore-table {
  width: 100%;
  max-width: 400px;
  margin: 1em auto 2em auto;
  border-collapse: collapse;
  font-size: 1em;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 6px;
  overflow: hidden;
  font-family: 'Open Sans Condensed', sans-serif;
  user-select: none;
}

.highscore-table th,
.highscore-table td {
  padding: 0.6em 1em;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  text-align: left;
}

.highscore-table tr:nth-child(even) {
  background-color: #f3fdf7;
}

.highscore-table tr:nth-child(odd) {
  background-color: #ffffff;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
  #map {
    height: 400px;
    max-width: 100%;  /* volle Breite */
  }
  .app-container {
    padding: 1.5em 1em;
    max-width: 95%;
    min-height: auto;
  }
  button, #submit-btn, #restart-btn {
    width: 100%;
    margin-top: 8px;
  }
}


.highscore-table {
  margin: 0 auto;
  border-collapse: collapse;
  font-family: sans-serif;
}

.highscore-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #ccc;
}

.highscore-table td.score-cell {
  font-weight: 700;
  color: #008A3B;
  text-align: right;
  width: 80px;
}

/* Namens-Eingabe Container */
#name-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1em;
  padding: 1em 1.2em;
  background-color: #f7f7f7; /* helles Feld */
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  gap: 0.8em;
}

/* Input + Buttons Wrapper */
#name-entry-inner {
  display: flex;
  width: 100%;
  gap: 0.6em;
}

/* Eingabefeld */
#player-name {
  flex: 1;
  min-width: 120px;       /* Mindestbreite für Lesbarkeit */
  max-width: 180px;       /* Eingabe nicht zu lang machen */
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95em;
  transition: border 0.2s, box-shadow 0.2s;
}

#player-name:focus {
  border-color: #008A3B;
  box-shadow: 0 0 5px rgba(0,138,59,0.5);
  outline: none;
}

/* Buttons anpassen */
#save-score-btn, #skip-score-btn {
  padding: 8px 12px;     /* etwas kompakter */
  font-size: 0.9em;
}

#save-score-btn {
  background-color: #008A3B;
  color: white;
}

#save-score-btn:hover {
  background-color: #006622;
  transform: translateY(-1px);
}

#skip-score-btn {
  background-color: #ccc;
  color: #333;
}

#skip-score-btn:hover {
  background-color: #999;
  transform: translateY(-1px);
}

#result {
  display: none;
}

p strong {
  color: #008A3B;
  font-size: 1.2em;
}


#submit-btn {
  background-color: #008A3B;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#submit-btn:hover {
  background-color: #00692a;
}