html {
  height: 100%;
}

body {
  min-height: 100vh; /* mindestens volle Höhe */
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #0d2c2c 0%, #041414 100%);
  color: white;
  font-family: "Segoe UI", sans-serif;
  text-align: center;
  user-select: none;

  /* Scrollen erlauben, wenn Inhalt größer als Viewport */
  overflow:hidden;
}


h1 {
  margin: 10px 0;
}

#top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.pile, .foundation {
  width: 90px;
  height: 130px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: flex-start;    /* Text oben ausrichten */
  justify-content: flex-start; /* Text links ausrichten */
  font-size: 32px;
  position: relative;
  padding: 5px;
}

#foundations {
  display: flex;
  gap: 10px;
}

#tableau {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.column {
  position: relative;
  width: 90px;
  min-height: 130px;
}

/* Karten innerhalb des Tableau leicht nach unten versetzen */
.column .card {
  width: 90px;
  height: 130px;
  border-radius: 8px;
  position: absolute;
  background: white;
  color: black;
  font-size: 24px;
  display: flex;
  align-items: flex-start;    /* Text oben ausrichten */
  justify-content: flex-start; /* Text links ausrichten */
  padding: 5px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
  cursor: grab;
  touch-action: none;
}


.card {
  color: black!important;
  background: white!important;
}
.card.red {
  color: red!important;
}


.card.face-down {
  background: #1e272e!important;
  color: transparent!important;
}

.card.dragging {
  opacity: 0.75;
  transform: scale(1.05);
  z-index: 1000;
}

/* Waste-Karte */
#waste .card {
  position: absolute;
  top: 0;
  left: 0;
}

#stock {
  border-color: #e6c79c;
}

#waste {
  border-color: rgba(255,255,255,0);
}

/* Foundations-Karten */
.foundation .card {
  position: absolute;
  top: 0;
  left: 0;
}

.foundation .card.hint {
  background: rgba(255,255,255,0.1)!important; /* leicht transparent */
  color: white;                        /* weißes Symbol */
  font-size: 32px;
  display: flex;
  justify-content: center; /* Symbol zentriert */
  align-items: center;
}




/* Restart Button */
#restart {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  background: #38ada9;
  color: white;
  cursor: pointer;
}

/* Tableau Karten, face-down */
.column .card.face-down {
  background: #1e272e;
  color: transparent;
}

/* Waste Karten */
#waste .card {
  position: absolute;
  top: 0;
  left: 0;
  background: white;       /* immer weiße Karte */
  color: black;            /* schwarze Schrift standard */
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 5px;
  width: 90px;
  height: 130px;
  border-radius: 8px;
}

/* Foundations Karten */
.foundation .card {
  position: absolute;
  top: 0;
  left: 0;
  background: white;       /* immer weiße Karte */
  color: black;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 5px;
  width: 90px;
  height: 130px;
  border-radius: 8px;
}


.hidden {
  display: none;
}

#game-screen {
  text-align: center;
  overflow-y: auto;
  min-height: 100vh;
}

#start-game {
  padding: 15px 30px;
  font-size: 20px;
  border: none;
  border-radius: 8px;
  background: #38ada9;
  color: white;
  cursor: pointer;
}

/* Startscreen */
#startScreen {
  height: 100vh;
  position: relative;
}

#startScreen_inner {
  text-align: center;
  background: #fff7e0;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  width: 300px;
  color: #071b1b;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
}


#startScreen h1 {
  margin-bottom: 1.5rem;
}

#startScreen select,
#startScreen button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 1.1rem;
}

#startScreen button {
  background: #f0b85d;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

#startScreen button:hover {
  background: #e0a946;
}


#topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: #e6c79c;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  gap: 0.5rem;
  margin-bottom: 20px;
}



#topbar button,
#topbar select {
  background: #38ada9;
  color: white;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}


#topbar .left-controls,
#topbar .right-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.center-info {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-weight: bold;
  color: #3e2f1c;
}
