html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: radial-gradient(circle at 30% 0%, #90a4d4 0%, #5b4b9a 55%, #3a2e6e 100%);
  color: #fff;
}

#roomListView, #roomView {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 50px 40px;
}

.tv-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-bottom: 10px;
}

.tv-topbar.room-topbar {
  width: 100%;
  max-width: 1100px;
  justify-content: space-between;
}

.tv-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tv-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.tv-topbar h1, .tv-topbar h2 {
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tv-category {
  width: 100%;
  max-width: 1100px;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0 0;
}

.tv-topbar h1 { font-size: 44px; }
.tv-topbar h2 { font-size: 32px; }

.tv-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  margin: 6px 0 44px;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
  width: 100%;
  max-width: 1100px;
}

.room-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.room-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
}

.room-card-id {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 12px;
  word-break: break-word;
}

.room-card-mode {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.room-card-mode.local { background: #2196f3; }
.room-card-mode.text { background: #f57c00; }

.room-card-category {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.room-card-players {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.no-rooms {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 60px;
}

/* Vue détail d'une room */
#roomView {
  justify-content: flex-start;
}

.back-btn {
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.back-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.tv-label {
  width: 100%;
  max-width: 1100px;
  text-align: center;
  font-size: 58px;
  font-weight: 900;
  margin: 60px 0 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  word-wrap: break-word;
}

.tv-cover {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  margin: 26px 0 50px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tv-scoreboard-title {
  font-size: 26px;
  margin-bottom: 22px;
}

.tv-scoreboard {
  width: 100%;
  max-width: 720px;
}

.tv-scoreboard .playerInfo {
  font-size: 24px;
}

@media (max-width: 700px) {
  .tv-label { font-size: 34px; margin: 36px 0 0; }
  .tv-cover { width: 140px; height: 140px; margin: 18px 0 30px; }
  .tv-topbar h1 { font-size: 30px; }
  .tv-topbar h2 { font-size: 22px; }
  .tv-scoreboard .playerInfo { font-size: 18px; }
}
