/* --- Grundlegendes Layout --- */

body {
  background-color: #1e1e1e;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 20px;
}

.fade-in {
  opacity: 0;
  animation: fadeInAnimation ease 2s forwards;
  will-change: opacity;
}

@keyframes fadeInAnimation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* --- Wrapper für Spiel und Steuerung --- */

#game-wrapper {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px; /* mehr Platz geben */
  flex-wrap: nowrap; /* kein Umbruch erzwingen */
}

/* Steuerbereich */
#game-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  min-width: 220px;
  background-color: rgba(44, 107, 47, 0.15);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(44, 107, 47, 0.4);
}

/* Select und Button volle Breite */
#game-controls select,
#game-controls button {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #2c6b2f;
  background-color: #1e1e1e;
  color: #eee;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#game-controls select:hover,
#game-controls button:hover {
  background-color: #2c6b2f;
  color: #d4ffd4;
}

/* Trennlinie */
#difficulty-separator {
  width: 100%;
  height: 2px;
  background: rgba(44, 107, 47, 0.7);
  margin-bottom: 15px;
  border-radius: 2px;
}

/* Score-Anzeige */
#score {
  font-size: 1rem;
  line-height: 1.4;
}

/* Spielbrett-Grid */
#board {
  display: grid;
  grid-template-columns: repeat(8, 50px);
  grid-template-rows: repeat(8, 50px);
  gap: 3px;
  margin: 0 auto;
  width: fit-content;
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background-color: #66cc66; /* helleres Grün für Gitter */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Einzelne Zellen */
.cell {
  width: 50px;
  height: 50px;
  background-color: #2c6b2f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.cell:hover {
  background-color: #4caf50;
}

/* Steine */
.stone.black {
  width: 40px;
  height: 40px;
  background: black;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease;
}

.stone.white {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease;
}

.stone.black:hover,
.stone.white:hover {
  transform: scale(1.1);
}

.stone.black,
.stone.white {
  z-index: 10;
  position: relative;
}

/* Button-Reihe */
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Hilfe-Button (gelb & rund) */
#hilfeBtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffcc00;
  border: none;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  color: #333;
  line-height: 1;
}

#hilfeBtn:hover {
  background-color: #ffd633;
  transform: scale(1.05);
}

/* Hilfebereich (Mac Style) */
#hilfePopover {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  max-width: 380px;
  margin-top: 15px;
  font-size: 0.95rem;
  color: #222;
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#hilfeAccordion h3 {
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  padding: 8px 0;
  cursor: pointer;
  user-select: none;
}

#hilfeAccordion div {
  padding: 5px 0 10px;
  border-bottom: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
  #game-wrapper {
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
  }

  #game-controls {
    width: 90%;
    align-items: center;
    text-align: center;
  }

  #board {
    margin-top: 20px;
    transform: scale(0.95);
  }
    body {
    padding-top: 10px;
  }

  .logo-text-container {
    margin-bottom: 10px;
  }
}

.headline-text,
h1 {
    font-size: 2.5rem;
    color: #2c6b2f;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    margin-top: 5px;
}
#hilfePopover ul {
    list-style-type: none !important; /* überschreibt jQuery UI */
    margin: 0 !important;
    padding: 0 !important;
}

#hilfePopover li {
    margin: 4px 0; /* etwas Abstand zwischen den Zeilen */
}


