@font-face {
    font-family: 'GoogleOpenSans'; /* Geben Sie der Schrift einen Namen */
    src: url('OpenSans-Regular.ttf') format('truetype'); /* Pfad zur TTF-Datei */
}
:root {
    --main-button-color: #3498db;
    --main-element-background-color: #222;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* min-width: 800px;
    min-height: 600px; */
}

.gamelobby-container {
    width: 50%;
    margin-left: 25%;
    text-align: center;
}

.gamelobby-backbutton {
    width: 20%;
}

.gamelobby-playerlist {
    width: 80%;
    list-style: none;
    background: var(--main-element-background-color);
    padding: 15px;
    border: 2px solid #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    margin-top: 20px;

}
.gamelobby-settings input.fieldInput {
    width: min(40%,200px);
 }

.gamelobby-settings button{
    width: min(40%,200px);
    /* margin-left: 5%; */
}

.lobbyheader{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    gap: 5px;
}

.lobbyheader * { 
    width: 50%;
    text-align: center;
  align-content: space-around;
  margin-left: 25%;
}


body {
    font-family: "GoogleOpenSans", sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;  
    justify-content: center;
    align-items: center;
    height: 100vh;
    /* height: max(100%, 100vh); */
    overflow: hidden;
}

.lobby-overlay {
    z-index: 500;
    /* position: absolute; */
    margin: 20px;
    /* width: calc(100% - 25px - 20px);
    height: calc(100% - 25px - 20px); */
    border: 1px solid white;
    /* background-color: #5a643f42; */
    padding: 10px;
    border-radius: 5px;
    width: 1800px;
    height: 1000px;
    transform: scale(1);
    /* transform-origin: top left; */
}

.game-lobby {
    position: relative;
}

.main-lobby {
    width: min(calc(100vw - 100px), 1200px);
    height: 95%;
    overflow-y: auto;
    overflow-x: auto;
    display: block;
    padding: 10px;
    border: 2px solid rgb(34, 34, 34);
    border-radius: 8px;
    margin: 20px;
    min-width: 350px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.login, .lobby {
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
    width: 320px;
    text-align: center;
}

input[type="text"], input[type="password"], input[type="number"], button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #333;
    font-size: 16px;
    background-color: #2c2c2c;
    color: #e0e0e0;
}

button {
    background-color: var(--main-button-color);
    color: white;
    border: none;
    cursor: pointer;
    height: 40px;
}

.error {
    color: #cf6679;
    margin-top: 10px;
}

.lobby ul, #hoverUserList {
    list-style-type: none;
    padding: 0;
}

.lobby ul li, #hoverUserList li {
    padding: 8px;
    background-color: #333;
    margin-bottom: 5px;
    border-radius: 8px;
    color: #ffffff;
}

#gameCanvas {
    margin-top: 20px;
    background-color: #1c1c1c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    /* Fester Rand um das Canvas */
    margin: 20px;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 95vh;
    position: relative;
    flex-direction: column; /* Flex-Richtung vertikal */
}

.player-menu {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    padding: 10px 20px;
    border-radius: 12px;
    color: #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.player-menu:hover {
    background-color: #444;
}

.player-menu:hover .hidden {
    display: block;
}

#hoverUserList {
    background-color: var(--main-element-background-color);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Spieler in Zeilen umbrechen */
}

#hoverUserList li {
    padding: 8px 12px;
    background-color: #444;
    border-radius: 8px;
    display: inline-block;
    transition: transform 0.2s ease;
}

#hoverUserList li:hover {
    transform: scale(1.05);
    background-color: #555;
}

.hidden {
    display: none;
}
/* Lobby Header */
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Kompakteres Erstellen eines Spiels */
.create-game.compact {
  display: flex;
  flex-direction: column;
  /* width: 250px; */
  margin-bottom: 20px;
  background-color: var(--main-element-background-color);
  padding: 15px;
  border: 1px solid #333;
  border-radius: 5px;
}

.join-game.compact {
  display: flex;
  flex-direction: column;
  /* width: 250px; */
  margin-bottom: 20px;
  background-color: var(--main-element-background-color);
  padding: 15px;
  border: 1px solid #333;
  border-radius: 5px;
}

.flex-compact {
    /* width: 500px; */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 5px;
}

.flex-compact li {
    justify-content: space-between;
    flex-direction: column;
    
}

.grid-parallel {
    display: grid;
    grid-template-columns: 25% 70%;
    gap: 5px;
}

.create-game.compact input, 
.create-game.compact button {
    margin-top: 5px;
    padding: 8px;
}

/* Grid für öffentliche Spiele */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 5px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Einzelnes Spiel-Kachel */
.games-grid li {
    border: 1px solid #333;
    padding: 15px;
    background-color: var(--main-element-background-color);
    color: #fff;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.games-grid li span {
    margin-top: 10px;
}

.games-grid li .owner {
    font-size: 0.9em;
    color: #aaa;
}

button.joinGameBtn {
    margin-top: 10px;
    padding: 10px;
    background-color: #00aaff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

button.joinGameBtn:hover {
    background-color: #0088cc;
}

/* Modal für Passwortabfrage */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: var(--main-element-background-color);
    color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 30%;
    border-radius: 5px;
    text-align: center;
}

.close {
    cursor: pointer;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover, .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.labelSetting {
    width: 100%; 
    display: inline-block;
}


.labelUpdateGameLobbyHidden {
    width: 30%; 
    display: inline-block;
}

.displayTextYourCardMaster {
    text-align: center;
    width: 100%;
    font-size: 30px;
}

#copyGameJoinLink {
    width: 80%;
}