/* General */
body,
html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #1a1a1a;
}
a {
  text-decoration: none;
  color: #0070f3;
}
a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  border-bottom: 1px solid #e0e0e0;
}
.logo {
  font-size: 28px;
  font-weight: bold;
  color: #0070f3;
}
.header-links a,
.language-selector {
  margin-left: 20px;
  font-size: 14px;
  color: #1a1a1a;
  cursor: pointer;
}

/* Landing page main */
.main-content {
  text-align: center;
  padding: 80px 20px;
}
.main-content h1 {
  font-size: 32px;
  margin-bottom: 40px;
}
.buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.btn {
  max-width: 300px;
  width: 100%;
  padding: 12px 0;
  font-size: 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn.primary {
  background-color: #0070f3;
  color: #fff;
}
.btn.primary:hover {
  background-color: #005bb5;
}
.btn.secondary {
  background-color: #f2f2f2;
  color: #1a1a1a;
  border: 1px solid #d0d0d0;
}
.btn.secondary:hover {
  background-color: #e0e0e0;
}
.download-text,
.disclaimer {
  font-size: 14px;
  margin-top: 10px;
  color: #666;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 12px;
  color: #666;
}
.footer-links a {
  margin: 0 5px;
}

/* Chat icon */
.chat-icon {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #0070f3;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Preview page */
.preview-container {
  padding: 20px 50px;
  font-family: Arial, sans-serif;
  background: white;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: #0070f3;
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover {
  color: #005bb5;
}

/* Main layout */
.preview-main {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  justify-content: center;
  align-items: flex-start;
}

/* Video preview */
.video-preview {
  position: relative;
  background: #1a1a1a;
  width: 640px;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#localVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #333;
}

/* Video controls */
.video-controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.video-controls button {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.video-controls button:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Meeting info form */
.meeting-info {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.meeting-info h2 {
  font-size: 22px;
  margin: 0 0 15px 0;
  color: #111;
}

/* Input fields */
.meeting-info input[type="text"] {
  padding: 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* Checkbox label */
.meeting-info .remember {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Join button */
.meeting-info button {
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background: #0070f3;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition:
    background 0.2s,
    transform 0.15s;
}
.meeting-info button:hover:not(:disabled) {
  background: #005bb5;
  transform: translateY(-2px);
}
.meeting-info button:active:not(:disabled) {
  transform: translateY(0);
}
.meeting-info button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Legal text */
.legal {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
.legal a {
  color: #0070f3;
  text-decoration: none;
}
.legal a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: #666;
}
.footer-links a {
  color: #0070f3;
  text-decoration: none;
  margin: 0 5px;
}
.footer-links a:hover {
  text-decoration: underline;
}

/* Admin login / panel */
.login-container,
.admin-container {
  padding: 50px;
  text-align: center;
}
.login-container input,
.admin-container input {
  padding: 10px;
  margin: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 90%;
  max-width: 300px;
}
.login-container button,
.admin-container button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #0070f3;
  color: #fff;
  cursor: pointer;
  margin-top: 10px;
}

/* -------------------- */
/* RESPONSIVE DESIGN FIX */
/* -------------------- */

* {
  box-sizing: border-box;
}

/* Tablets & small laptops */
@media (max-width: 1024px) {
  .header {
    padding: 15px 25px;
  }

  .main-content {
    padding: 60px 20px;
  }

  .preview-main {
    gap: 25px;
  }

  .video-preview {
    width: 100%;
    max-width: 600px;
  }

  .admin-container {
    padding: 30px 20px;
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .header-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .main-content {
    padding: 40px 15px;
  }

  .main-content h1 {
    font-size: 24px;
  }

  .buttons {
    width: 100%;
  }

  .btn {
    width: 90%;
    max-width: 320px;
  }

  .preview-main {
    flex-direction: column;
    align-items: center;
  }

  .video-preview {
    width: 100%;
    height: auto;
  }

  .meeting-info {
    width: 100%;
    max-width: 90%;
  }

  .control-bar {
    gap: 8px;
    padding: 10px;
  }

  .control-bar button {
    font-size: 12px;
    padding: 8px 10px;
  }

  .chat-icon {
    width: 45px;
    height: 45px;
    font-size: 20px;
    bottom: 15px;
    right: 15px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .main-content h1 {
    font-size: 20px;
  }

  .logo {
    font-size: 22px;
  }

  .btn {
    width: 95%;
  }

  .join-overlay {
    width: 92%;
    padding: 18px;
  }

  .admin-container,
  .login-container {
    padding: 20px 15px;
  }

  .video-preview {
    height: auto;
  }

  .footer {
    padding: 20px 10px;
  }
}
/* ================================================= */
/* ROOM PAGE                                         */
/* ================================================= */

.room-container {
  width: 100%;
  height: 100vh;

  background: #0f172a;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

/* ================================================= */
/* MAIN CONTENT                                      */
/* ================================================= */

.room-container {
  display: flex;
  flex-direction: column;
}

.profile-panel,
.video-panel {
  flex: 1;
}

@media (min-width: 769px) {
  .room-container {
    flex-direction: row;
  }

  .profile-panel {
    width: 40%;
  }

  .video-panel {
    width: 60%;
  }
}

/* ================================================= */
/* LEFT PROFILE PANEL                                */
/* ================================================= */
.profile-panel {
  background: linear-gradient(180deg, #111827, #0f172a);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 40px 20px;

  text-align: center;

  color: white;

  position: relative;

  width: 100%;
  height: 100%;

  border-radius: 24px;

  overflow: hidden;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* PROFILE CARD */

.profile-panel::before {
  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  background: rgba(59, 130, 246, 0.12);

  border-radius: 50%;

  filter: blur(60px);

  z-index: 0;
}

/* CALL ICON */

.call-animation {
  font-size: 82px;

  margin-bottom: 24px;

  animation: vibrate 0.28s infinite;

  z-index: 1;
}

/* ANIMATION */

@keyframes vibrate {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(4deg);
  }

  50% {
    transform: rotate(-4deg);
  }

  75% {
    transform: rotate(4deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* PROFILE NAME */

.profile-name {
  font-size: 36px;

  font-weight: bold;

  margin-bottom: 10px;

  z-index: 1;
}

/* STATUS */

.profile-status {
  font-size: 16px;

  color: #cbd5e1;

  z-index: 1;
}

/* ================================================= */
/* RIGHT VIDEO PANEL                                 */
/* ================================================= */

.video-panel {
  background: #020617;

  display: flex;
  justify-content: center;
  align-items: center;

  position: relative;

  padding: 20px;

  overflow: hidden;
}

/* VIDEO AREA */

.video-grid {
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* VIDEO */

.video-grid video {
  width: 100%;
  height: 100%;

  object-fit: cover;

  border-radius: 24px;

  background: #111827;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
/* ================================================= */
/* JOIN OVERLAY                                      */
/* ================================================= */

.join-overlay {
  position: fixed;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: 90%;
  max-width: 360px;

  background: rgba(255, 255, 255, 0.97);

  border-radius: 22px;

  padding: 30px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;

  z-index: 9999;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);

  opacity: 0;
  visibility: hidden;

  animation: showOverlay 0.4s ease forwards;
  animation-delay: 2s;
}

/* SHOW AFTER 4 SECONDS */

@keyframes showOverlay {
  from {
    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, -45%);
  }

  to {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, -50%);
  }
}

/* OVERLAY TITLE */

.join-overlay h3 {
  margin: 0 0 18px 0;

  color: #111827;

  font-size: 20px;

  text-align: center;
}

/* INPUT */

.join-overlay input {
  width: 100%;

  padding: 14px 16px;

  border-radius: 12px;

  border: 1px solid #d1d5db;

  outline: none;

  font-size: 15px;

  margin-bottom: 18px;

  box-sizing: border-box;
}

.join-overlay input:focus {
  border-color: #2563eb;
}

/* BUTTON */

.join-overlay button {
  width: 100%;

  padding: 14px;

  border: none;

  border-radius: 12px;

  background: #2563eb;

  color: white;

  font-size: 15px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.2s ease;
}

.join-overlay button:hover {
  background: #1d4ed8;
}

/* ================================================= */
/* CONTROL BAR                                       */
/* ================================================= */

.control-bar {
  position: fixed;

  bottom: 20px;
  left: 50%;

  transform: translateX(-50%);

  background: transparent;

  backdrop-filter: none;

  border-radius: 22px;

  padding: 12px 16px;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 10px;

  z-index: 999;
}

/* BUTTONS */

.control-bar button {
  border: none;

  background: #1e293b;

  color: white;

  padding: 12px 16px;

  border-radius: 14px;

  cursor: pointer;

  font-size: 14px;

  transition: all 0.2s ease;
}

.control-bar button:hover {
  background: #334155;

  transform: translateY(-2px);
}

/* LEAVE BUTTON */

#leaveBtn {
  background: #dc2626;
}

#leaveBtn:hover {
  background: #b91c1c;
}

/* ================================================= */
/* MOBILE RESPONSIVE                                 */
/* ================================================= */

@media (max-width: 768px) {
  .room-container {
    flex-direction: column;
  }

  .profile-panel {
    height: 35%;

    padding: 25px 16px;
  }

  .video-panel {
    height: 65%;

    padding: 10px;
  }

  .profile-name {
    font-size: 26px;
  }

  .profile-status {
    font-size: 14px;
  }

  .call-animation {
    font-size: 58px;
  }

  .video-grid video {
    border-radius: 16px;
  }

  .control-bar {
    width: 95%;

    bottom: 10px;

    padding: 10px;

    gap: 8px;
  }

  .control-bar button {
    font-size: 12px;

    padding: 10px 12px;
  }

  .join-overlay {
    width: 92%;

    padding: 24px 18px;
  }
}
