:root {
  --background-dark: #121212;
  --panel-background: #1e1e1e;
  --primary-accent: #8A2BE2;
  --primary-accent-darker: #7b2cbf;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --border-color: #333333;
  --error-color: #e53935;
  --success-color: #43a047;

  --primary-gradient: linear-gradient(135deg, #a020f0, #8a2be2);
  --text-color: #ffffff;
  --button-bg: #ffffff;
  --button-text: #a020f0;
  --border-color-lv: #ffffff50;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100dvh;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-dark);
  color: var(--text-primary);
}

#app-container {
  display: flex;
  flex-direction: row;
  height: 100dvh;
  width: 100vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out;
}

body.in-call #app-container {
  opacity: 1;
  visibility: visible;
}

#lobby {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

body.in-call #lobby {
  opacity: 0;
  visibility: hidden;
}

/* .lobby-content {
  text-align: center;
  padding: 2rem;
} */

/* .lobby-content h1 {
  font-size: 4rem;
  font-weight: 700;
  background: -webkit-linear-gradient(45deg, var(--primary-accent), #c788f6);
  --webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
} */

/* .lobby-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
} */

/* #statusMessage {
  margin-bottom: 2rem;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
} */

#statusMessage.status-searching {
  color: var(--primary-accent);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 10px 20px rgba(138, 43, 226, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(138, 43, 226, 0);
  }
}

#video-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--background-dark);
  flex: 2;
  height: 100%;
  position: relative;
}

.video-wrapper {
  flex: 1;
  position: relative;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  min-height: 0;
}

.video-wrapper video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}

.video-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2;
}

#localVideo {
  transform: scaleX(-1);
}

.placeholder {
  color: var(--text-secondary);
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  text-align: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
}

body.in-call #remoteVideo[srcObject]+.video-label+.placeholder {
  display: none;
}

#chat-container {
  display: flex;
  flex-direction: column;
  background-color: var(--panel-background);
  border-left: 1px solid var(--border-color);
  flex: 1;
  height: 100%;
  z-index: 99;
  transition: transform 0.3s ease-in-out;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.chat-header h2 {
  font-weight: 600;
  color: var(--primary-accent);
}

.messages-display {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message {
  padding: 0.6rem 1rem;
  border-radius: 18px;
  max-width: 80%;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.sent {
  background-color: var(--primary-accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.received {
  background-color: #363636;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  display: flex;
  flex-direction: row;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  gap: 0.5rem;
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: #333;
  color: var(--text-primary);
}

.chat-input-area button {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 20px;
  background-color: var(--primary-accent);
  color: white;
  border: none;
  cursor: pointer;
}

#chatInput {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: #333;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.2s ease;
}

#chatInput:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 5px var(--primary-accent);
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#startCallButton:hover:not(:disabled) {
  background-color: var(--primary-accent-darker);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

#startCallButton,
#sendChatButton {
  background-color: var(--primary-accent);
  margin-right: 10px;
  color: white;
}

#endCallButton {
  background-color: var(--error-color);
  color: white;
}

button:disabled {
  background-color: #555 !important;
  color: #999 !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#toggleChatBtn {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 1.75rem;
  z-index: 100;
  background-color: var(--primary-accent);
  color: white;
  padding: 0.75rem 1.2rem;
  border-radius: 30px;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#closeChatBtn.mobile-only {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-left: auto;
  cursor: pointer;
}

.displaynone {
  display: none !important;
}

/* END CALL BUTTON SET. */

#video-container #endCallButton {
  position: absolute;
  top: 2rem;
  right: 1.75rem;
  z-index: 10;
  background-color: var(--error-color);
  color: white;
  border: none;
  padding: 0.75rem 0.88rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease-in-out;
}

#video-container #endCallButton:hover {
  background-color: #c62828;
  transform: translateY(-2px);
}

/* #video-container #flipCameraButton {
  position: absolute;
  top: 2rem;
  left: 1.75rem;
  z-index: 10;
  background-color: var(--primary-accent);
  color: white;
  border: none;
  padding: 0.75rem 1.2rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease-in-out;
}

#video-container #flipCameraButton:hover {
  background-color: var(--primary-accent-darker);
  transform: translateY(-2px);
} */

#menuWrapper {
  position: absolute;
  top: 2rem;
  left: 1.75rem;
  z-index: 10;
}

#menuToggleBtn {
  background-color: var(--primary-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#menuOptions {
  margin-top: 0.5rem;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  display: flex;
}

#menuOptions.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

#menuOptions button {
  background-color: var(--primary-accent-darker);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

#menuOptions button:hover {
  background-color: var(--primary-accent);
}

.hidden {
  display: none !important;
}



@media (max-width: 768px) {
  #app-container {
    flex-direction: column;
  }

  #video-container {
    flex-direction: column;
    height: auto;
    position: relative;
  }

  .video-wrapper {
    height: 45vh;
  }

  #chat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    background-color: var(--panel-background);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 99;
  }

  #chat-container.open {
    transform: translateY(0%);
  }

  #toggleChatBtn {
    display: block;
  }

  #closeChatBtn.mobile-only {
    display: block;
  }

  body.chat-open #video-container {
    display: none;
  }

  /* .lobby-content h1 {
    font-size: 3rem;
  } */

  .chat-header h2 {
    font-size: 1.2rem;
  }

  #chatInput {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }

  button {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }

  .video-wrapper:has(#localVideo) {
    position: absolute;
    width: 110px;
    height: 140px;
    bottom: 2rem;
    right: 1.75rem;
    z-index: 10;
    border: 2px solid var(--primary-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    background: #000;
  }

  .video-wrapper:has(#localVideo) .video-label {
    display: none;
  }

  .video-wrapper:has(#remoteVideo) {
    width: 100%;
    height: 100%;
    position: relative;
  }
}






/* New code added :::::: */


/* :root {
  --primary-gradient: linear-gradient(135deg, #a020f0, #8a2be2);
  --text-color: #ffffff;
  --button-bg: #ffffff;
  --button-text: #a020f0;
  --border-color: #ffffff50;
} */

.lobby {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-gradient);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

.lobby-content {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  text-align: center;
}

.lv-title {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.lv-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  margin: 20px 0;
}

.lv-marquee {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: marquee-left 25s linear infinite;
}

.lv-marquee.lv-reverse {
  animation: marquee-right 25s linear infinite;
}

.lv-marquee img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color-lv);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.lv-marquee img:hover {
  transform: scale(1.1);
}

@keyframes marquee-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-right {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.lv-stats {
  font-size: 2.2rem;
  font-weight: bold;
  margin: 30px 0 10px;
}

.lv-subtext {
  font-size: 1rem;
  margin-bottom: 5px;
  opacity: 0.9;
}

.lv-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
}

.lv-buttons button {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lv-btn-match {
  background: var(--button-bg);
  color: var(--button-text);
}

.lv-btn-match:hover {
  background: #f0f0f0;
}

.lv-btn-advice {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.lv-btn-advice:hover {
  background: white;
  color: #a020f0;
}

@media (max-width: 480px) {
  .lv-title {
    font-size: 1.6rem;
  }

  .lv-marquee img {
    width: 75px;
    height: 75px;
  }

  .lv-stats {
    font-size: 1.6rem;
  }

  .lv-subtext {
    font-size: 0.9rem;
  }

  .lv-buttons button {
    font-size: 14px;
    padding: 10px 16px;
  }
}




 .chat-btn {
  position: relative;
  padding-right: 20px; /* Give space for the red dot */
  font-size: 16px;
  cursor: pointer;
}

.chat-btn::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: red;
  border-radius: 50%;
  display: none;
}

.chat-btn.show-dot::after {
  display: block;
}