body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #202124;
  color: white;
}

.meet-container {
  display: flex;
  height: 100vh;
}

/* Video */
.video-area {
  flex: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #121212;
  position: relative;
  flex-direction: column;
}

/* Wrapper để căn giữa video + toolbar */
.video-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.video-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.user-video, .remote-video {
  flex: 1;
  max-width: 45%;
  aspect-ratio: 16/9;   /* ✅ giữ đúng tỉ lệ */
  position: relative;
}

.user-video video, 
.remote-video video {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;          
  object-position: center 30%; /* ✅ focus phần mặt */
  background: #333;
}

.username {
  position: absolute;
  bottom: 6px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 15px;
}
.toolbar button {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: #3c4043;
  color: white;
  cursor: pointer;
}
.leave {
  background: #d93025 !important;
}

/* Chat popup */
.chat-popup {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 280px;
  height: 350px;
  background: #2c2c2c;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  flex-direction: column;
  z-index: 2000;
}
.chat-popup.active {
  display: flex;
}
.chat-header {
  background: #3c4043;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  position: relative;
}
.close-btn {
  position: absolute;
  right: 10px;
  top: 5px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
}
.chat-messages {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
}
.chat-input {
  display: flex;
  border-top: 1px solid #444;
}
.chat-input input {
  flex: 1;
  padding: 8px;
  border: none;
}
.chat-input button {
  background: #1877f2;
  border: none;
  color: white;
  padding: 0 10px;
}

/* Popup login */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}
.popup-box {
  background: white;
  padding: 20px 40px;
  border-radius: 8px;
  text-align: center;
}
.popup-box h2 {
  color: #1877f2;
}
.popup-box button {
  background: #1877f2;
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 5px;
  margin-top: 15px;
  cursor: pointer;
}

/* Animations */
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
