* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Landing page */
.container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.container.center {
  text-align: center;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #666;
  margin-bottom: 2rem;
}

.notice {
  text-align: center;
  color: #888;
}

.notice-sub {
  font-size: 0.875rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Room page */
.room-container {
  width: 100%;
  max-width: 400px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
  padding-bottom: env(safe-area-inset-bottom);
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid #1a1a1a;
}

.room-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.room-label {
  font-size: 1.125rem;
  color: #555;
}

.room-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

/* Dropdown menu */
.menu-container {
  position: relative;
}

.menu-btn {
  background: none;
  border: none;
  color: #666;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.menu-btn:hover {
  background: #1a1a1a;
  color: #888;
}

.menu-btn svg {
  width: 20px;
  height: 20px;
}

.menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 4px;
  min-width: 180px;
  z-index: 100;
}

.menu-dropdown button {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: none;
  border: none;
  color: #ccc;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.menu-dropdown button:hover {
  background: #252525;
}

/* Connection status - shows below header when not connected */
.connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: #888;
  background: #111;
  border-radius: 8px;
  margin-top: 1rem;
}

.connection-status.hidden {
  display: none;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}

.status-dot.connected {
  background: #22c55e;
}

.status-dot.connecting,
.status-dot.reconnecting {
  background: #eab308;
  animation: pulse 1s infinite;
}

.status-dot.disconnected {
  background: #ef4444;
}

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

/* Main content area */
.room-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
}

/* Participants list */
.participants {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.participant {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem;
  background: #141414;
  border-radius: 12px;
  border: 1px solid #1a1a1a;
  transition: border-color 0.2s;
}

.participant.speaking {
  border-color: #22c55e;
}

.participant.local {
  background: #1a1a1a;
}

.participant-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #222;
  overflow: hidden;
  flex-shrink: 0;
}

.participant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participant-name {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #ccc;
}

/* Muted indicator - small icon */
.participant-status {
  opacity: 0;
  transition: opacity 0.2s;
}

.participant.muted .participant-status {
  opacity: 0.4;
}

.participant-status svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-top: auto;
}

.control-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}

.control-btn:hover {
  background: #252525;
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn.muted {
  background: #dc2626;
}

.control-btn.leave {
  background: #dc2626;
}

.control-btn.leave:hover {
  background: #b91c1c;
}

.control-btn svg {
  width: 22px;
  height: 22px;
}

/* Empty state */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #444;
  gap: 0.25rem;
}

.empty-state p {
  font-size: 0.875rem;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Join button */
.join-btn {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: #22c55e;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.join-btn:hover {
  background: #16a34a;
}

.join-btn:active {
  transform: scale(0.98);
}
