body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
}

nav {
  background-color: #d3d0ff;
  color: white;
  padding: 10px;
  display: flex;
  align-items: center;
}
nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
}
nav li {
  margin-right: 20px;
}

.logo {
  height: 58px;
  margin-right: 20px;
}

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 10px;
  position: fixed;
  bottom: 0;
  width: 100%;
}

#contentContainer {
    position: relative;
    z-index: 0;
}

.connection-panel {
    max-width: 460px;
    margin: 24px auto 0;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connection-panel label {
    font-weight: 700;
    color: #2b2b2b;
}

.connection-panel input {
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 1rem;
}

  .peer-roster {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    color: #2b2b2b;
  }

  .peer-roster ul {
    margin: 8px 0 0;
    padding-left: 20px;
    color: #4b5563;
  }

.connection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.connection-actions button {
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: #4f46e5;
    color: #fff;
    cursor: pointer;
}

.connection-panel p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

#turnControl{
    margin-left: auto;
}

.dice-box {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
} 

.dice-box-canvas {
    width: 99.4vw;
    height: 90vh; 
    pointer-events: none;
}

/* ── Voice chat ─────────────────────────────────────────── */
#voiceChatPanel {
  max-width: 460px;
  margin: 12px auto 0;
}

.voice-chat-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-chat-title {
  color: #2b2b2b;
}

.voice-chat-actions {
  display: flex;
  gap: 8px;
}

.voice-chat-actions button {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
}

.voice-chat-actions button:disabled {
  background: #a5b4fc;
  cursor: default;
}

.voice-status {
  font-size: .9rem;
  color: #6b7280;
}

/* ── Text chat ───────────────────────────────────────────── */
#textChatPanel {
  max-width: 460px;
  margin: 12px auto 80px;
}

.text-chat-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-chat-title {
  color: #2b2b2b;
}

.text-chat-messages {
  height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #f9fafb;
}

.text-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.text-chat-msg--self {
  align-self: flex-end;
  align-items: flex-end;
}

.text-chat-msg--peer {
  align-self: flex-start;
  align-items: flex-start;
}

.text-chat-sender {
  font-size: .75rem;
  color: #6b7280;
  margin-bottom: 2px;
}

.text-chat-text {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.4;
  word-break: break-word;
}

.text-chat-msg--self .text-chat-text {
  background: #4f46e5;
  color: #fff;
}

.text-chat-msg--peer .text-chat-text {
  background: #e5e7eb;
  color: #1f2937;
}

.text-chat-input-row {
  display: flex;
  gap: 8px;
}

.text-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 1rem;
}

.text-chat-send-btn {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
}
