/* ═══════════════════════════════════════════
   FF Meet — Omegle-Style Random Chat Styles
   Uses FF brand colors: white, blue (#6366f1)
   ═══════════════════════════════════════════ */

/* ── Page ── */
.meet-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
  background: var(--bg-primary, #ffffff);
  color: var(--text-primary, #111827);
  overflow: hidden;
  position: relative;
}

.meet-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99,102,241,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(59,130,246,0.04) 0%, transparent 50%);
  animation: meet-bg-shift 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes meet-bg-shift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, 3%); }
}

.meet-page > * {
  position: relative;
  z-index: 1;
}

/* ── Lobby Screen ── */
.meet-lobby {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 20px;
  text-align: center;
  animation: meet-fadeIn 0.4s ease;
}

.meet-lobby-title {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  font-family: 'Sora', 'Nunito', sans-serif;
}

.meet-lobby-subtitle {
  font-size: 14px;
  color: #4b5563;
  margin-top: -8px;
}

.meet-online-count {
  font-size: 13px;
  color: #22c55e;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meet-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: meet-pulse-dot 2s ease-in-out infinite;
}

@keyframes meet-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.meet-rules {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.7;
  max-width: 380px;
  text-align: left;
}

.meet-rules strong {
  color: #f59e0b;
  font-size: 13px;
}

.meet-rules ul {
  margin: 8px 0 0;
  padding-left: 18px;
  list-style: disc;
}

.meet-rules ul li {
  margin-bottom: 3px;
  color: #6b7280;
}

.meet-mode-buttons {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.meet-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 36px;
  border-radius: 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 130px;
  font-family: 'Nunito', sans-serif;
}

.meet-mode-btn .meet-mode-icon {
  font-size: 32px;
  line-height: 1;
}

.meet-mode-btn:hover {
  transform: translateY(-3px);
}

.meet-mode-btn.text-btn:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.meet-mode-btn.video-btn:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

.meet-mode-btn:active {
  transform: translateY(0);
}

/* ── Searching Screen ── */
.meet-searching {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  animation: meet-fadeIn 0.3s ease;
}

.meet-search-anim {
  width: 80px;
  height: 80px;
  position: relative;
}

.meet-search-anim::before,
.meet-search-anim::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.meet-search-anim::before {
  border-top-color: #6366f1;
  border-right-color: #6366f1;
  animation: meet-spin 1s linear infinite;
}

.meet-search-anim::after {
  inset: 10px;
  border-bottom-color: #3b82f6;
  border-left-color: #3b82f6;
  animation: meet-spin 1.5s linear infinite reverse;
}

@keyframes meet-spin {
  to { transform: rotate(360deg); }
}

.meet-search-text {
  font-size: 16px;
  font-weight: 600;
  color: #4b5563;
  animation: meet-text-pulse 2s ease-in-out infinite;
}

@keyframes meet-text-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.meet-cancel-btn {
  padding: 10px 28px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Nunito', sans-serif;
}

.meet-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
}

/* ── Connected Banner ── */
.meet-connected-banner {
  text-align: center;
  padding: 8px;
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  animation: meet-fadeIn 0.3s ease;
}

/* ── Text Chat Screen ── */
.meet-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: meet-fadeIn 0.3s ease;
}

.meet-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.8);
}

.meet-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meet-stranger-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 700;
}

.meet-stranger-label {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.meet-stranger-status {
  font-size: 11px;
  color: #4ade80;
}

.meet-skip-btn {
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Nunito', sans-serif;
}

.meet-skip-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
}

.meet-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}

.meet-msg {
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.5;
  animation: meet-msg-in 0.2s ease;
  color: #1f2937;
}

@keyframes meet-msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.meet-msg-stranger .meet-msg-label {
  color: #ef4444;
  font-weight: 700;
}

.meet-msg-you .meet-msg-label {
  color: #6366f1;
  font-weight: 700;
}

.meet-msg-system {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  font-style: italic;
  padding: 8px 0;
}

.meet-typing-indicator {
  color: #9ca3af;
  font-size: 12px;
  font-style: italic;
  padding: 2px 16px;
  min-height: 18px;
}

.meet-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.8);
}

.meet-chat-input input {
  flex: 1;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  color: #111827;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.meet-chat-input input:focus {
  border-color: rgba(99, 102, 241, 0.5);
}

.meet-chat-input input::placeholder {
  color: rgba(255,255,255,0.25);
}

.meet-send-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background: #6366f1;
  color: white;
  font-weight: 700;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.meet-send-btn:hover {
  background: #5558e6;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.meet-send-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Video Chat Screen ── */
.meet-video {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: meet-fadeIn 0.3s ease;
  background: #000;
}

.meet-video-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  position: relative;
  background: #000;
}

@media (min-width: 768px) {
  .meet-video-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

.meet-video-cell {
  position: relative;
  background: #0a0a0a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meet-video-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meet-video-cell.local video {
  transform: scaleX(-1);
}

.meet-video-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(4px);
}

.meet-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
}

.meet-video-placeholder-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.meet-video-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.6);
}

.meet-video-ctrl-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meet-video-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.meet-video-ctrl-btn.danger {
  background: #ef4444;
  color: white;
}

.meet-video-ctrl-btn.danger:hover {
  background: #dc2626;
}

.meet-video-ctrl-btn.muted {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ── Disconnected Overlay ── */
.meet-disconnected {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 10;
  animation: meet-fadeIn 0.3s ease;
}

.meet-disconnected h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.meet-disconnected p {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.meet-new-btn {
  padding: 12px 32px;
  border-radius: 12px;
  border: none;
  background: #6366f1;
  color: white;
  font-weight: 700;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.meet-new-btn:hover {
  background: #5558e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.meet-back-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.meet-back-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ── Animations ── */
@keyframes meet-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
