/* ============================================
   Batata WebRTC - Estilos
   Interface escura com botões grandes
   ============================================ */

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #e8e8e8;
  padding: 1rem;
}

.container {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

#screen-connected .video-container {
  max-width: 100%;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.subtitle {
  color: #a0a0a0;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.hint {
  color: #808080;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Telas */
.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.screen.hidden {
  display: none;
}

/* Botões grandes */
.btn {
  width: 100%;
  max-width: 320px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.btn-primary {
  background: linear-gradient(135deg, #e94560 0%, #c73e54 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #e8e8e8;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Código de 4 dígitos */
.room-code {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.code-input {
  width: 100%;
  max-width: 200px;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.code-input::placeholder {
  color: #666;
}

.code-input:focus {
  outline: none;
  border-color: #e94560;
}

/* Status */
.status {
  font-size: 1rem;
  color: #b0b0b0;
}

/* Área de vídeo para compartilhamento de tela */
.video-container {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

#remote-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Scanner */
.scanner-container {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.scanner-container video {
  width: 100%;
  display: block;
}

/* Mensagens (debug) */
.messages {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  text-align: left;
}

.messages.hidden {
  display: none;
}

.messages h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #a0a0a0;
}

#message-list {
  list-style: none;
  font-size: 0.85rem;
}

#message-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#message-list li:last-child {
  border-bottom: none;
}
