* {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  position: fixed;
  text-align: right;
  top: 0;
  right: 0;
  width: 100vw;
  background: #2b2b2b;
  height: 35px;
  z-index: 999;
}

.userIcon {
  width: 28px;
  height: 28px;

  background: #373737;
  color: #e1e1e1;

  border-radius: 50%;
  font-size: 20px;
  line-height: 1;

  display: inline-flex;
  margin-right: 5px;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* Main container */
.main {
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 35px; /* below topbar */
  left: 0;
  margin: 0;
  padding: 0;
  color: white;
  background: #2f2f2f;
}

/*  header */
.main h1 {
  margin: 10px 0 0 10px;
  font-family: "Work Sans", sans-serif;
  font-weight: 1000;
}

/* create room button */
#createRoom {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  color: white;
  font-size: 14px;
  font-weight: 550;

  width: 115px;
  height: 20px;
  cursor: pointer;

  margin-top: 15px;
  margin-left: 10px;
  background: #004EF3;
  background: radial-gradient(90deg, rgba(0, 78, 243, 1) 0%, rgba(0, 158, 243, 1) 100%);
  border: transparent;
  border-radius: 3px;
}

#roomList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
}

/* Each room card */
.room {
  width: 250px;
  height: 150px;
  background: #383838;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: 15px;
  text-align: left;
  transition: transform 0.2s;
  
}

.room img {
  width: calc(100% - 15px);
  height: calc(100px - 10px);
  border-radius: 5px;
  margin-bottom: 10px;
}

.room h2 {
  margin: 0;
  font-size: 18px;
}

.room p {
  margin: 0;
  font-size: 14px;
  color: #ccc;
}

/* Hover effect */
.room:hover{
  transform: scale(1.1);
}

.room:active {
  transform: scale(1);
}

/* createRoom Popup */
/* BACKDROP */
#popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25); /* 25% black */
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* SHOW MODAL */
#popup:target {
  opacity: 1;
  pointer-events: auto;
}

/* MODAL BOX */
.modal {
  background: #1e1e1e;
  color: white;
  width: 360px;
  padding: 20px;
  border-radius: 12px;
  position: relative;

  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

/* POP-IN ANIMATION */
#popup:target .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* CLOSE (X) BUTTON */
.x {
  position: absolute;
  top: 12px;
  right: 12px;
  color: white;
  text-decoration: none;
  font-size: 18px;
  opacity: 0.7;
}

.x:hover {
  opacity: 1;
}

/* FORM STYLES */
form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
select {
  padding: 8px;
  border-radius: 6px;
  border: none;
  outline: none;
}

input[type="submit"] {
  margin-top: 10px;
  background: #3a3a3a;
  color: white;
  cursor: pointer;
}

input[type="submit"]:hover {
  background: #555;
}

a {
  text-decoration: none;
}