body {
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 100vh;
}

#room-info {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  z-index: 100;
  transition: opacity 0.5s;
}

#room-info.faded {
  opacity: 0;
  pointer-events: none;
}

#room-code {
  font-size: 1.8rem;
  letter-spacing: 0.15em;
  color: #6ec6ff;
}

#connection-status {
  font-size: 0.9rem;
  opacity: 0.7;
}

#master-badge {
  font-size: 0.7rem;
  opacity: 0.45;
  margin-left: 8px;
}

#display-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
#home-btn,
#new-display-btn,
#open-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
#home-btn:hover,
#new-display-btn:hover,
#open-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

#fullscreen-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  color: #fff;
  transition: opacity 0.5s;
}

#fullscreen-btn.faded {
  opacity: 0;
  pointer-events: none;
}

#timers-container {
  display: flex;
  flex-wrap: wrap;
  height: 100vh;
}

.timer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.timer-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.timer-name,
.timer-time,
.timer-status {
  position: relative;
  z-index: 1;
}

.timer-name {
  font-size: clamp(1.2rem, 3vw, 2.5rem);
  opacity: 0.85;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.timer-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}

.timer-card.negative .timer-time {
  color: #ff6b6b;
  animation: pulse 1s ease-in-out infinite;
}

.timer-status {
  font-size: clamp(0.8rem, 1.5vw, 1.2rem);
  opacity: 0.5;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#display-logo {
  position: fixed;
  bottom: 16px;
  right: 16px;
  max-height: 80px;
  max-width: 150px;
  z-index: 90;
  opacity: 0.85;
  pointer-events: none;
}

#display-logo[hidden] {
  display: none;
}

/* Beleren Bold font-face (fallback graceful if file absent) */
@font-face {
  font-family: 'Beleren Bold';
  src: url('../fonts/BelerenBold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
