body {
  background: #f7f4ee;
  margin: 0;
  padding: 24px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.site-header {
  width: 100%;
  background: #f7f4ee;
  border-bottom: 1px solid #d8d1c4;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 40px;
  background: #f7f4ee;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-link {
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  color: #1f1f1f;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  opacity: 0.65;
}

.nav-link.active {
  color: #d98900;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#dashboardSymbol {
  display: inline-block;
  min-width: 12px;
  text-align: center;
}

.sub-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  padding: 28px 40px;
  background: #ebe7df;
  border-top: 1px solid #d8d1c4;
}

.sub-nav.hidden {
  display: none;
}

.session-link {
  background: none;
  border: none;
  padding: 0;
  color: #3a3a3a;
  font-family: inherit;
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.session-link:hover {
  color: #000;
  opacity: 0.7;
}

.session-link.active {
  color: #d98900;
  font-weight: 700;
}

.signout-btn {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .main-nav {
    flex-direction: column;
    align-items: center;
    padding: 18px 20px;
  }

  .nav-left,
  .nav-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .sub-nav {
    padding: 20px;
    gap: 16px;
  }

  .nav-link {
    font-size: 0.95rem;
  }

  .session-link {
    font-size: 0.95rem;
    text-align: center;
  }
}

/* TABS */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  background: #ffb86b;
  border-color: #ff9f3b;
  color: #2b2b2b;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* CARDS + AUTH */

#signInBtn,
#signOutBtn {
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

#authGate {
  text-align: center;
  padding: 16px;
  border-radius: 10px;
}

.card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;

  background: white;
  padding: 20px;
  border-radius: 16px; /* clean rounded rectangle */

  /* IMPORTANT */
  overflow: hidden; /* keep this for overlay clipping */

  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 16px rgba(0, 0, 0, 0.12);
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-overlay {
  position: absolute;
  inset: 0; /* fills entire card */

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transition: opacity 0.25s ease;
  /* background: rgba(220, 80, 80, 0.881); */

  border-radius: 16px;
  z-index: 2;
}

/* tinted overlays by status */
.card.green .card-overlay {
  background: rgba(71, 222, 127, 0.468);
}

.card.orange .card-overlay {
  background: rgba(252, 179, 51, 0.52);
}

.card.red .card-overlay {
  background: rgba(255, 64, 64, 0.484);
}

.card.gray .card-overlay {
  background: rgba(107, 114, 128, 0.22);
}

/* Shows the shadow overlay */
.card:hover .card-overlay {
  opacity: 1;
}


.overlay-text {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* slightly dim underlying content on hover */
.card-content {
  transition: filter 0.25s ease;
}



/* ROOM STATUS */
.room-title {
  font-weight: bold;
  margin-bottom: 12px;
}

.room-status {
  font-weight: 600;
  margin-bottom: 6px;
}

.green {
  color: #2ecc71;
}

.orange {
  color: #f39c12;
}

.red {
  color: #e74c3c;
}

.gray {
  color: #7f8c8d;
}

.count {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
}

/* CHAT */
.chat-box {
  background: #f3f3f3;
  border-radius: 18px;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.chat-controls {
  margin-bottom: 16px;
}

.chat-controls label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.chat-controls select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 16px;
}

.messages {
  background: white;
  min-height: 300px;
  max-height: 450px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
}

.message {
  background: #f8f8f8;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
}

.message-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.message-class {
  color: #d88913;
  font-weight: 700;
}

.message-time {
  color: #777;
  font-size: 14px;
  white-space: nowrap;
}

.message-meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 6px;
}

.message-text {
  font-size: 16px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}

.chat-input-row input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 16px;
}

.chat-input-row button {
  background: #f3a634;
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
}

.empty-chat {
  color: #777;
  text-align: center;
  margin-top: 30px;
}