* {
  margin: 0;
  padding: 0;
  font-size: 1.5vh;
  box-sizing: border-box;
  font-family: "Roboto", Verdana, Helvetica;


  @media screen and (orientation: landscape) {
    font-size: 2.3vh;
  }

  @media screen and (orientation: portrait) {
    font-size: 1.7vh;
  }

  @media screen and (min-width: 1024px) {
    /* Gäller för större skärmar (desktop) */
    font-size: 1.6vh;
  }

}


body {

  background: rgb(21, 1, 77);
  text-align: center;
  color: white;

}



#gameLayout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  flex-direction: column;
}

#gameStatus {
  font-size: 1.0em;
  color: #f70e0e;
}

#turnIndicator {
  color: #e7e30c;
}

#camera {
  display: flex;
  flex-direction: row;
  width: 750px;
  font-size: smaller;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#remoteVideo,
#localVideo {
  width: 365px;
  height: 205px;
  border: 1px solid #5728b4;
  border-radius: 4px;
}

#canvasChat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;

  @media screen and (orientation: landscape) {
    flex-direction: row;
    width: 1000px;
  }

  @media screen and (orientation: portrait) {
    flex-direction: column;
    width: 98vw;   /* Fyller hela bredden */
  }
}

#chat {
  display: flex;
  flex-direction: column;

  @media screen and (orientation: landscape) {
    width: 300px;
  }

  @media screen and (orientation: portrait) {
    width: 98vw;   /* Fyller hela bredden */
  }

}


canvas {
  background: hwb(240 19% 22%);
  border: 2px solid #333;
  margin: 2px;
  display: block;

    @media screen and (orientation: landscape) {
    width: 630px;
    height: 540px;
  }

    @media screen and (orientation: portrait) {
    width: 98vw;   /* Fyller hela bredden */
    aspect-ratio: 7 / 6;

  }
}





#chatLog {
  height: 550px;
  overflow-y: auto;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid #ccc;
  margin-top: 5px;
  padding: 5px;
  text-align: left;

  @media screen and (orientation: landscape) {
    height: 550px;
  }

  @media screen and (orientation: portrait) {
    height: 300px;
  }
}



#lobby {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.roomEntry {
  display: flex;
  flex-direction: row-reverse;
  /* block axis */
  align-items: center;
  /* Main axel */
  justify-content: space-between;
  margin: 6px 0;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 20em;
  margin-left: auto;
  margin-right: auto;
}

.hostName {
  font-size: 1em;
  font-weight: bold;
  margin-bottom: 4px;
}

.joinRoomBtn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.joinRoomBtn:hover {
  background-color: #163917;
}

.mediaBtn {
  width: 30px;
  height: 30px;
  margin: 0 5px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.mediaBtn.active {
  background: #2ecc71;
  opacity: 1;
}

.mediaBtn.inactive {
  background: #e74c3c;
  opacity: 1;
}

.mediaBtn.disabled {
  background: #95a5a6;
  opacity: 0.5;
  cursor: not-allowed;
}

#mediaControls {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 10px 0;
}