/* Online Multiplayer Table & Room Styling */

.room-view-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.room-header-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.room-code-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  background: #181924;
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  letter-spacing: 4px;
}

.room-phase-pill {
  font-family: var(--f-ui, 'Unbounded', sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.phase-lobby { background: #1e1e2d; color: #a5b4fc; border: 1px solid #4338ca; }
.phase-night { background: #180d26; color: #c084fc; border: 1px solid #7e22ce; }
.phase-day { background: #261e0d; color: #fde047; border: 1px solid #ca8a04; }
.phase-voting { background: #260d0d; color: #f87171; border: 1px solid #dc2626; }

/* Table Arena */
.online-table-arena {
  background: #09090e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  min-height: 480px;
  padding: 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}

.table-center-hub {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 480px;
  background: rgba(18, 18, 26, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.players-grid-radial {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 24px;
}

.player-seat-card {
  background: #14141d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}

.player-seat-card:hover {
  border-color: var(--border-medium);
  background: #1c1c28;
  transform: translateY(-2px);
}

.player-seat-card.is-speaker {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.player-seat-card.is-dead {
  opacity: 0.4;
  filter: grayscale(1);
}

.player-seat-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  margin-bottom: 10px;
}

.player-seat-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.player-seat-status {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Night Overlay / Curtain */
.night-curtain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.night-action-prompt-box {
  background: #13131b;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

/* Chat drawer & Log panel */
.bottom-panels-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.game-log-panel, .chat-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 320px;
}

.log-scroll-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 8px;
}

.log-item-row {
  font-size: 0.84rem;
  color: #cbd5e1;
  display: flex;
  gap: 8px;
}

.log-time-stamp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Synchronized Active Speaker & Timer Bar */
.active-speaker-bar {
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.speaker-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speaker-bar-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--f-mono);
  letter-spacing: 1px;
}

.speaker-bar-name {
  font-family: var(--f-display);
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 700;
}

.speaker-bar-timer-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.speaker-bar-timer-digits {
  font-family: var(--f-mono);
  font-size: 1.8rem;
  font-weight: 800;
  color: #f87171;
  text-shadow: 0 0 12px rgba(248, 113, 113, 0.4);
}

.speaker-bar-timer-sec {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--f-mono);
}

/* Integrated Host Control Panel inside Room */
.host-inline-panel {
  background: #0f0f15;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.host-inline-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.host-inline-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.host-control-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
}

.host-control-title {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.host-moderation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.host-mod-row {
  background: #14141d;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.host-mod-player-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.host-mod-avatar {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.host-mod-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90px;
}

.host-mod-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.host-mod-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.18s;
  font-family: var(--f-mono);
}

.host-mod-btn:hover {
  background: #ffffff;
  color: #000000;
}

.host-mod-btn.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.host-mod-btn.danger:hover {
  background: #ef4444;
  color: #ffffff;
}
