:root {
  --bg-primary: #0b0f1a;
  --bg-secondary: #111827;
  --border: #1f2937;
  --border-light: #27303f;
  --text-primary: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-blue: #60a5fa;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --mobile-nav-height: 76px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background: linear-gradient(180deg, #050505 0%, #0f0a0f 45%, #1d0c13 70%, #320c16 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

body.mobile-chat-open {
  overflow: hidden;
}

.container {
  max-width: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.age-gate-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(18px);
  z-index: 3200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.age-gate-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.age-gate-modal {
  width: min(520px, 100%);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-primary);
  outline: none;
}

.age-gate-modal h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(1.4rem, 2.8vw, 1.75rem);
  font-weight: 600;
}

.age-gate-modal p {
  margin: 0;
  line-height: 1.6;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

.age-gate-bullets {
  margin: 1.5rem 0 1.75rem;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.age-gate-bullets li {
  line-height: 1.5;
}

.age-gate-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.age-gate-confirm-btn {
  width: 100%;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.age-gate-footnote {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

@media (min-width: 640px) {
  .age-gate-confirm-btn {
    width: auto;
    min-width: 240px;
  }

  .age-gate-footnote {
    text-align: left;
  }
}

/* Header moderno - menor e em linha única */
.topbar {
  background: #0f172a;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 100;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  width: 100%;
  margin: 0;
  gap: 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #ff512f 0%, #f09819 100%); /* vermelho para laranja */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: 1.5rem;
  flex-shrink: 0;
}

.nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  text-decoration: none;
}

.online-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.online-stats-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.online-stats-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text-secondary);
  line-height: 1;
}

.online-badge span {
  font-variant-numeric: tabular-nums;
}

.online-badge.online-male {
  border-color: rgba(96, 165, 250, 0.65);
  color: #bfdbfe;
}

.online-badge.online-female {
  border-color: rgba(244, 114, 182, 0.65);
  color: #fbcfe8;
}

.online-badge.online-couple {
  border-color: rgba(168, 85, 247, 0.65);
  color: #e9d5ff;
}

@media (max-width: 768px) {
  .topbar {
    padding: 0.75rem 1.25rem;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .online-stats {
    width: 100%;
    margin-left: 0;
    order: 3;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.9);
  }

  .online-stats-badges {
    gap: 0.35rem;
  }

  .nav {
    margin-left: 0;
    order: 2;
    width: 100%;
    justify-content: flex-end;
  }
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.75rem;
}

/* Layout principal moderno com cards - largura total */
.main-layout {
  display: flex;
  height: calc(100vh - 90px);
  gap: 0.75rem;
  width: 100%;
  margin: 0;
}

.video-column {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-column {
  flex: 1.1;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  position: relative;
}

.chat-overlay {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Vídeo cards modernos */
.video-box {
  flex: 1;
  background: #000;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-height: 340px;
  aspect-ratio: 16 / 9;
}

.status-overlay {
  position: absolute;
  inset: 0;
  display: flex; /* Show overlay for status messages */
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 1rem;
  text-align: center;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.35), rgba(0, 0, 0, 0.75));
  color: #e5e7eb;
  font-weight: 600;
  font-size: 1rem;
  z-index: 8;
}

/* Hide overlay when connected */
.status-overlay.connected {
  display: none;
}

.video-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.remote-mute-indicator {
  display: none;
  align-items: center;
  justify-content: center;
}

.remote-mute-indicator.is-visible {
  display: inline-flex;
}

.remote-mute-indicator svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--accent-red);
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--accent-red);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9;
  border-radius: var(--radius-xl);
}

.video-placeholder.is-visible {
  opacity: 1;
  visibility: visible;
}

.video-placeholder svg {
  width: 64px;
  height: 64px;
}

.video-placeholder .placeholder-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

video {
  width: 100%;
  height: 100%;
  object-fit: var(--video-fit, contain);
  display: block;
  border-radius: var(--radius-xl);
}

.video-action-btn {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  z-index: 12;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-shadow: var(--shadow-sm);
}

.video-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.2);
}

.video-action-btn .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.video-action-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.video-action-stack {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.video-action-stack .video-action-btn {
  position: static;
  bottom: auto;
  left: auto;
}

.cam-settings-btn .cam-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cam-settings-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.report-btn {
  color: #f97316;
}

.report-btn:hover {
  border-color: rgba(249, 115, 22, 0.55);
}

.mute-toggle-btn {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
}

.mute-toggle-btn.is-muted {
  background: linear-gradient(135deg, var(--accent-red) 0%, #b91c1c 100%);
  border-color: rgba(248, 113, 113, 0.6);
}

.mute-toggle-btn.is-muted svg {
  color: #fee2e2;
}

/* Chat área moderna */
/* Chat system styling - removed duplicate styles */

.chat-message {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  word-wrap: break-word;
}

.user-message {
  background: rgba(55, 65, 81, 0.3);
}

.system-message {
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid #fbbf24;
  font-style: italic;
  opacity: 0.9;
}

.chat-sender {
  font-weight: bold;
  margin-right: 0.25rem;
}

.chat-text {
  color: var(--text-primary);
}

.system-message .chat-text {
  color: var(--text-secondary);
}

/* Chat input improvements - removed duplicate styles */

#chatInput {
  flex: 1;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

#chatInput:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.1);
}

#chatInput:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn {
  background: var(--accent-green) !important;
  color: white !important;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.send-btn:hover:not(:disabled) {
  background: #059669 !important;
  transform: translateY(-1px);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Scrollbar styling for chat */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.3);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.5);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.7);
}

/* Animation for new messages */
.chat-message {
  animation: fadeInMessage 0.3s ease-out;
}

@keyframes fadeInMessage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-area {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  height: 100%;
  min-height: 0;
}

/* Informações do usuário */
.user-info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #0f172a;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.user-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  word-wrap: break-word;
  line-height: 1.35;
}

.gender-icon {
  display: inline-block;
  vertical-align: text-top;
  margin-left: 0.4rem;
  margin-top: -0.1rem;
}

.chat-messages {
  flex: 1 1 auto;
  background: #0f172a;
  border-radius: var(--radius-lg);
  margin: 0 0 0.75rem 0;
  padding: 1rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  min-height: 0;
}

.chat-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #0f172a;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.chat-hint {
  color: var(--text-secondary);
}

#chatCharCounter {
  font-weight: 600;
}

.chat-input-container input {
  flex: 1;
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  background: #0b1220;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.chat-input-container input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.send-btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Chat lines */
.chat-line {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.chat-username {
  color: var(--accent-blue);
  font-weight: 600;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 0.60rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 1200;
  pointer-events: none;
}

.toast {
  width: clamp(280px, 42vw, 520px);
  padding: 0.60rem 1.1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.toast-info {
  border-left: 3px solid var(--accent-blue);
}

.toast-success {
  border-left: 3px solid var(--accent-green);
}

.toast-warning {
  border-left: 3px solid #facc15;
}

.toast-error {
  border-left: 3px solid var(--accent-red);
}

@media (max-width: 768px) {
  .toast-container {
    top: 0.5rem;
    width: calc(100% - 2rem);
  }
  .toast {
    width: 100%;
    padding: 0.7rem 1rem;
  }
}

/* Botões modernos - gap reduzido */
.control-buttons {
  display: flex;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #0f172a;
  height: auto;
  min-height: 72px;
  align-items: stretch;
  flex-shrink: 0;
}

.control-buttons .btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  min-height: 50px;
}

.skip-btn {
  background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%) !important;
  color: white !important;
}

.stop-btn {
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%) !important;
  color: white !important;
}

.config-btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%) !important;
  color: white !important;
}

.config-btn:disabled {
  background: var(--border) !important;
  color: var(--text-muted) !important;
  opacity: 0.6;
}

.control-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.control-buttons .btn:active {
  transform: translateY(0);
}

.control-buttons .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.control-buttons .btn span {
  font-size: 1.1rem;
}

.chat-toggle-btn {
  display: none !important;
  position: relative;
}

.chat-toggle-btn[data-unread="true"]::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.65);
}

/* Formulários modernos */
.form {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

input, select {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.125rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-secondary);
  transition: all 0.2s ease;
  color: var(--text-primary);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.btn {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
  border-color: var(--accent-blue);
  color: white;
}

.btn.danger {
  background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fff;
}

.btn.outline {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(148, 163, 184, 0.35);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn.danger.is-ready {
  animation: buttonPulse 1.4s ease-in-out infinite;
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.42);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Modais modernos */
.modal.hidden, .setup-form.hidden {
  display: none !important;
}

.modal, .setup-form {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
}

.modal-card, .setup-card {
  position: relative;
  width: min(480px, calc(100% - 2rem));
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
}

.disclaimer-card {
  max-width: 520px;
}

.disclaimer-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
  text-align: left;
}

.disclaimer-body p {
  margin: 0;
}

.disclaimer-countdown {
  margin-top: 1.25rem;
  text-align: center;
  font-weight: 600;
  color: var(--accent-red);
}

.disclaimer-countdown span {
  font-variant-numeric: tabular-nums;
}

.modal-card h2, .setup-card h2 {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.permissions-refresh {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.permissions-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.1rem;
}

.permissions-status.success {
  color: var(--accent-green);
}

.permissions-status.error {
  color: var(--accent-red);
}

/* Responsivo */
@media (max-width: 1024px) {
  .main-layout {
    flex-direction: column;
    height: auto;
  }
  
  .video-column, .chat-column {
    flex: none;
  }
  
  .video-column {
    height: 60vh;
  }
  
  .chat-column {
    height: 40vh;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.35rem);
  }

  .container {
    min-height: 100vh;
  }

  .main {
    padding: 0.6rem 0.6rem calc(0.6rem + env(safe-area-inset-bottom));
    gap: 0.6rem;
  }

  .topbar {
    padding: 0.5rem 0.85rem;
  }

  .brand {
    font-size: 1.05rem;
  }

  .nav {
    gap: 0.5rem;
  }

  .nav a {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
  }

  .main-layout {
    flex-direction: column;
    height: auto;
    gap: 0.75rem;
  }

    .video-column {
      flex: 1;
      gap: 0.5rem;
      padding-bottom: calc(0.45rem + env(safe-area-inset-bottom));
    }

    .video-box {
      min-height: clamp(180px, 34vh, 340px);
      max-height: 50vh;
      aspect-ratio: auto;
      margin-bottom: 0.45rem;
    }

  .chat-column {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    height: auto;
    overflow: visible;
  }

  .chat-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--mobile-nav-height);
    padding: 0 1rem 0.75rem;
    max-height: calc(70vh - 0.75rem);
    pointer-events: none;
    opacity: 0;
    transform: translateY(calc(100% + 16px));
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 180;
  }

  .chat-overlay.is-open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
  }

  .chat-area {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-xl);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
  }

  .user-info-section {
    display: none;
  }

  .chat-messages {
    background: rgba(11, 18, 32, 0.85);
    border: 1px solid rgba(94, 110, 139, 0.24);
    padding: 0.75rem;
  }

  .chat-messages .chat-message:nth-last-child(n+4) {
    display: none;
  }

  .chat-message {
    margin-bottom: 0.45rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
  }

  .chat-input-container {
    background: rgba(11, 18, 32, 0.9);
    border: 1px solid rgba(94, 110, 139, 0.24);
    padding: 0.7rem;
    gap: 0.45rem;
  }

  .chat-input-row {
    gap: 0.5rem;
  }

  .chat-input-container input {
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
  }

  .send-btn {
    min-width: 64px;
    padding: 0.6rem 0.8rem;
  }

  .chat-meta {
    font-size: 0.78rem;
  }

  .control-buttons {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 -14px 28px rgba(0, 0, 0, 0.45);
    padding: 0.5rem 0.8rem calc(0.5rem + env(safe-area-inset-bottom));
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
    z-index: 190;
  }

  .control-buttons .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.6rem 0.4rem;
    min-height: 48px;
    border-radius: var(--radius-md);
  }

  .chat-toggle-btn {
    display: inline-flex !important;
    justify-content: center;
  }

  .chat-toggle-btn.active {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
  }

  .nav {
    gap: 0.75rem;
  }
}