/* Custom styles to enhance Bootstrap */
body {
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
  min-height: 100vh;
}

/* Header */
header {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}
#logo {
  color: #0d6efd;
  transition: color 0.3s;
}
#logo:hover {
  color: #0a58ca;
}
#onlineCount {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* Interest form card */
#interestCard {
  background: #222 !important;
  transition: transform 0.3s ease;
}
#interestCard:hover {
  transform: translateY(-5px);
}
.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}
.btn-primary {
  transition: background-color 0.3s, transform 0.2s;
}
.btn-primary:hover {
  background-color: #0a58ca;
  transform: scale(1.05);
}

/* Interest form labels */
#interestForm label {
  color: #ffffff; /* White text for visibility on dark background */
  font-size: 1rem; /* Readable font size */
  margin-right: 1rem; /* Space between labels */
  display: inline-flex; /* Align checkbox and text */
  align-items: center; /* Vertically center checkbox with text */
}

/* Ensure checkboxes are styled consistently */
#interestForm input[type="checkbox"] {
  margin-right: 0.5rem; /* Space between checkbox and label text */
}

/* Optional: Style the form container for better appearance */
#interestForm {
  background: #222; /* Match the dark theme */
  padding: 1rem; /* Add padding */
  border-radius: 0.5rem; /* Rounded corners */
  margin-bottom: 1rem; /* Space below form */
}

/* Partner info */
.alert-info {
  background-color: #2c3e50 !important;
  border-color: #34495e !important;
  color: #ecf0f1 !important;
}
.flag-img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border: 1px solid #444;
}

/* Video streams */
.video-stream {
  background: #000;
  border: 2px solid #444;
  transition: border-color 0.3s;
}
.video-stream:hover {
  border-color: #0d6efd;
}

/* Chat box */
.chat-box {
  max-height: 250px;
  overflow-y: auto;
  background: #222;
  border-radius: 0.5rem;
  padding: 1rem;
}
.message {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  max-width: 70%;
  word-wrap: break-word;
  clear: both;
  animation: slideIn 0.3s ease;
}
.user-message {
  background-color: #0d6efd;
  color: #fff;
  float: right;
}
.stranger-message {
  background-color: #444;
  color: #fff;
  float: left;
}

/* Chat controls */
#chatControls {
  align-items: center;
}
#chatInput {
  background: #222 !important;
  border-color: #444 !important;
  color: #fff !important;
  transition: border-color 0.3s;
}
#chatInput:focus {
  border-color: #0d6efd !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}
.btn-danger {
  transition: background-color 0.3s, transform 0.2s;
}
.btn-danger:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

/* Scrollbar styling */
.chat-box::-webkit-scrollbar {
  width: 8px;
}
.chat-box::-webkit-scrollbar-track {
  background: #222;
}
.chat-box::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 4px;
}
.chat-box::-webkit-scrollbar-thumb:hover {
  background: #0a58ca;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #videoContainer {
    flex-direction: column;
  }
  .video-stream {
    width: 100%;
    margin-bottom: 1rem;
  }
  #chatControls {
    flex-direction: column;
  }
  #chatInput {
    margin: 0.5rem 0;
  }
  .btn-primary, .btn-danger {
    width: 100%;
  }
}



.video-controls {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.video-controls button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.video-controls button:hover {
  transform: scale(1.1);
  background-color: rgba(0,0,0,0.9) !important;
}

.video-controls button.muted {
  color: #dc3545 !important;
}

.video-controls button.video-off {
  color: #dc3545 !important;
}

/* --- Authentication Card Styling --- */
#authCard {
  background: #222 !important; /* Matches your interestCard background */
  border: 1px solid #333 !important;
  border-radius: 0.5rem;
}

/* Nav Pills (Tabs) Customization */
.nav-pills .nav-link {
  color: #e0e0e0;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  background-color: transparent;
}

.nav-pills .nav-link:hover {
  background-color: #2a2a2a;
}

.nav-pills .nav-link.active {
  background-color: #0d6efd !important;
  color: #fff !important;
}

/* Custom Google Button to match dark theme */
.google-btn {
  border-color: #444;
  background-color: #2a2a2a;
  color: #e0e0e0;
  transition: background-color 0.3s, transform 0.2s, border-color 0.3s;
}

.google-btn:hover {
  background-color: #333;
  color: #fff;
  border-color: #0d6efd; /* Subtle brand-color highlight on hover */
  transform: scale(1.02);
}

/* Reuse your existing custom focus outline for forms */
#authSection .form-control {
  background-color: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

#authSection .form-control::placeholder {
  color: #6c757d;
}

#authSection .form-control:focus {
  background-color: #2a2a2a;
  border-color: #0d6efd;
  color: #e0e0e0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Mirror your own camera (Local) */
#localVideo {
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
}

/* Ensure the stranger's camera is NOT mirrored (Remote) */
#remoteVideo {
    transform: scaleX(1);
    -webkit-transform: scaleX(1);
}
