:root {
  --bg: #1e1f22;
  --panel: #2b2d31;
  --panel-alt: #313338;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --text: #dbdee1;
  --text-dim: #949ba4;
  --danger: #da373c;
  --speaking: #23a55a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.screen.hidden { display: none; }

.card {
  background: var(--panel);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card.wide { max-width: 480px; text-align: left; }

h1 { margin: 0 0 4px; color: #fff; }
.subtitle { color: var(--text-dim); margin: 0 0 20px; }

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: var(--panel-alt);
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
}

input[type="text"]:focus { box-shadow: 0 0 0 2px var(--accent); }

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  transition: background 0.15s;
}

button:hover { background: var(--accent-hover); }

.danger-btn { background: var(--danger); }
.danger-btn:hover { background: #a52a2e; }

#login-btn, #create-room-btn { width: 100%; }

.new-room-row {
  display: flex;
  gap: 8px;
}
.new-room-row input { margin-bottom: 20px; }
.new-room-row button { white-space: nowrap; }

#room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

#room-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel-alt);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

#room-list li:hover { background: #3a3d43; }

#room-list .room-count {
  color: var(--text-dim);
  font-size: 13px;
}

#room-list .empty-hint {
  color: var(--text-dim);
  text-align: center;
  padding: 16px;
  cursor: default;
  background: transparent;
}

#room-screen {
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
  min-height: 100vh;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#room-title { color: #fff; margin: 0; }

#participant-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

#participant-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel);
  border-radius: 8px;
  margin-bottom: 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  transition: box-shadow 0.1s;
}

.avatar.speaking {
  box-shadow: 0 0 0 3px var(--speaking);
}

.participant-name { flex: 1; }

.mic-icon { color: var(--text-dim); font-size: 14px; }
.mic-icon.muted { color: var(--danger); }

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--panel-alt);
}

#mute-btn.muted { background: var(--danger); }
#mute-btn.muted:hover { background: #a52a2e; }

#status-text {
  color: var(--text-dim);
  font-size: 13px;
}

.hidden { display: none !important; }
