/* Add this at the very top of styles.css */
:root {
  --mobile-viewport-height: 100vh;
}
/* ─────────────────────────────────────────────────────────────────────────────
   0) CORE: Force HTML/BODY/ROOT to cover entire viewport and no horizontal scrollbar
   ───────────────────────────────────────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;      /* prevent any child from causing a horizontal scroll */
}

#chat-container {
  display: flex;
  height: 100vh;           /* 100% of viewport height */
  width: 100vw;            /* 100% of viewport width */
  position: relative;
  overflow: hidden;        /* chat‐area and sidebar scroll internally if needed */
}

/* ─────────────────────────────────────────────────────────────────────────────
   1) SIDEBAR & CHAT‐AREA share the full height, sidebar is 280px wide,
      chat‐area flexes to fill the rest.
   ───────────────────────────────────────────────────────────────────────────── */
.sidebar {
  width: 280px;
  background: #114777;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;           /* same as #chat-container’s height */
  position: relative;      /* so that .sidebar‐toggle can be positioned on top */
  z-index: 100;
  transition: transform 0.3s ease;
}
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  overflow: hidden;        /* let child scroll wrappers handle overflow */
}

/* ─────────────────────────────────────────────────────────────────────────────
   2) ON SMALL SCREENS (<768px), hide sidebar by default, show toggle button,
      let chat‐area occupy full width.
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%); /* off‐canvas initially */
    height: 100vh;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);      /* slide back in when “.open” is added */
  }
  .chat-area {
    flex: 1 1 100%;                /* fill entire width when sidebar is hidden */
  }
  .sidebar-toggle {
    display: flex;                 /* allow hamburger to show */
  }  
}

/* ─────────────────────────────────────────────────────────────────────────────
   3) CHAT MESSAGES scroll internally, not entire page
   ───────────────────────────────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;       /* only the messages list scrolls */
  padding: 1rem;
  background: #f5f5f5;
}


/* ─────────────────────────────────────────────────────────────────────────────
   5) PIN “Block / Start Video Chat” at top of .chat-area
   ───────────────────────────────────────────────────────────────────────────── */
.chat-area {
  position: relative;     /* child can be “sticky” */
}

.chat-actions button {
  z-index: 1002;          /* ensure buttons are clickable */
}
/* ─────────────────────────────────────────────────────────────────────────────
   A) RESET & UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  width: 100%;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: #f8f9fa;
  overflow-x: hidden;
}
.hidden {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   B) MAIN LAYOUT STRUCTURE
   ───────────────────────────────────────────────────────────────────────────── */
#chat-container {
  display: flex;
  height: 100vh;
  position: relative;
}

/* Marketing wrapper should be hidden when chat is active */
.marketing-wrapper {
  width: 100%;
}
#chat-container:not(.hidden) + .marketing-wrapper {
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   C) SIDEBAR STYLES
   ───────────────────────────────────────────────────────────────────────────── */
.sidebar {
  width: 280px;
  background: #114777;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.25rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Sidebar toggle button */
.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #114777;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Nav tabs */
.nav-tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-tab {
  flex: 1;
  text-align: center;
}
.nav-tab a {
  display: block;
  padding: 1rem 0;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}
.nav-tab.active a {
  color: white;
  font-weight: 600;
}
.nav-tab.active {
  border-bottom: 3px solid #f0f2f0;
}

/* Content areas */
.online-section, 
.inbox-content,
.blocked-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* User list styles */
.user-list {
  padding: 0;
}
.user-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.2s ease;
}
.user-item:hover {
  background: rgba(255,255,255,0.05);
}
.username {
  color: white;
  font-weight: 500;
}
.gender {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}
.unread-badge {
  background: #e74c3c;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  margin-left: auto;
}

/* Inbox styles */
.inbox-header {
  padding: 0.8rem 1rem;
  background: rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#inbox-search-container {
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.1);
}
#inbox-search-input {
  width: 100%;
  padding: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 4px;
}

.inbox-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.2s ease;
}
.inbox-item:hover {
  background: rgba(255,255,255,0.05);
}

/* Blocked users list */
.unblock-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.logout-button {
  display: inline-block;
  background: #e74c3c;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.app-info {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   D) CHAT AREA STYLES
   ───────────────────────────────────────────────────────────────────────────── */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
}

/* Chat header */
.chat-header {
  padding: 0.8rem 1rem;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  color: #333;
}

/* Chat messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #f5f5f5;
}
.message {
  margin-bottom: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.message:nth-child(even) {
  background: #f9f9f9;
}

.message:nth-child(odd) {
  background: #fff;
}

.message .timestamp {
  font-size: 0.75rem;
  color: #999;
}
.message.sent {
  background: #4caf50;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.message.received {
  background: white;
  color: #333;
  margin-right: auto;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.message-text {
  word-wrap: break-word;
}
.message-time {
  font-size: 0.7rem;
  opacity: 0.8;
  text-align: right;
  margin-top: 0.3rem;
}

/* Message input */
.message-input {
  padding: 0.8rem;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
}
.message-input input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  outline: none;
}
.image-upload-label {
  margin-left: 0.5rem;
  color: #666;
  cursor: pointer;
  font-size: 1.2rem;
}

.block-button, .video-button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  cursor: pointer;
}
.block-button {
  background: #e74c3c;
}
.video-button {
  background: #4caf50;
}


/* Welcome message */
.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  color: #666;
}

/* ─────────────────────────────────────────────────────────────────────────────
   E) MARKETING STYLES
   ───────────────────────────────────────────────────────────────────────────── */
.marketing-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero section */
#hero {
  background: linear-gradient(135deg, #3a7bd5, #00d2ff);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}
#hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
#hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}
#hero p {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  opacity: 0.9;
}
.cta-button {
  background: white;
  color: #3a7bd5;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Features section */
#features {
  padding: 3rem 1rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.feature {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.feature i {
  font-size: 2rem;
  color: #3a7bd5;
  margin-bottom: 1rem;
}
.feature h3 {
  margin-bottom: 0.5rem;
}

/* How it works */
#how-it-works {
  padding: 3rem 1rem;
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 2rem auto;
}
.step {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.step-number {
  width: 50px;
  height: 50px;
  background: #3a7bd5;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: bold;
}

/* Testimonials */
#testimonials {
  background: linear-gradient(135deg, #3a7bd5, #00d2ff);
  color: white;
  padding: 3rem 1rem;
  text-align: center;
}
.testimonial-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 2rem auto;
}
.testimonial {
  background: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* Footer */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}
footer a {
  color: #00d2ff;
  text-decoration: none;
}

/* Login wrapper */
.login-wrapper {
  display: flex;
  max-width: 1000px;
  margin: 2rem auto;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.side-text {
  flex: 1;
  padding: 2rem;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#login-container {
  flex: 1;
  padding: 2rem;
  max-width: 500px;
}
.logo {
  text-align: center;
  margin-bottom: 2rem;
}
.logo i {
  font-size: 3rem;
  color: #3a7bd5;
  margin-bottom: 1rem;
}
.tabs {
  display: flex;
  margin-bottom: 1.5rem;
}
.tab-button {
  flex: 1;
  padding: 0.8rem;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-weight: 500;
}
.tab-button.active {
  background: #3a7bd5;
  color: white;
}
.tab-content {
  display: none;
  padding: 1rem 0;
}
.tab-content.active {
  display: block;
}
.input-group {
  margin-bottom: 1rem;
  position: relative;
}
.input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}
.input-group input, 
.input-group select {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.btn-primary {
  background: #3a7bd5;
  color: white;
  border: none;
  padding: 0.8rem;
  width: 100%;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1rem;
}
.gender-selection {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.gender-option {
  flex: 1;
  text-align: center;
}
.gender-option input {
  display: none;
}
.gender-icon {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  background: #f5f5f5;
}
.gender-option input:checked + .gender-icon {
  background: #3a7bd5;
  color: white;
}

/* ─────────────────────────────────────────────────────────────────────────────
   F) RESPONSIVE ADJUSTMENTS
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  #hero h2 {
    font-size: 2rem;
  }
  .feature-grid, 
  .steps, 
  .testimonial-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .sidebar-toggle {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   G) ANIMATIONS & EFFECTS
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Flood warning */
.flood-warning {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffebee;
  border: 1px solid #ef9a9a;
  padding: 1.5rem;
  border-radius: 8px;
  z-index: 10000;
  max-width: 90%;
  text-align: center;
  animation: fadeIn 0.3s ease;
}
#countdown {
  font-weight: bold;
}
#continue-button {
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

/* Mute warning */
.mute-warning {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #e74c3c;
  color: white;
  padding: 1rem;
  border-radius: 8px;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(-50%); }
  20%, 60% { transform: translateX(calc(-50% - 5px)); }
  40%, 80% { transform: translateX(calc(-50% + 5px)); }
}

/* Particle effect */
.particle {
  position: absolute;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: float 15s infinite linear;
}
@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}
/* ─────────────────────────────────────────
   A
   ───────────────────────────────────────── */
.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  padding: 0.5em;
  color: #FFF;              /* brand/nav colour */
  transition: color 0.2s;
}
.icon-button:hover {
  color: ##ff0044;              /* red accent */
}
.search-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 320px;
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  /* scroll if too tall */
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
/* ─── 1) Simplify label alignment and ensure controls span col 2 ─── */
.advanced-search {
  display: grid;
  grid-template-columns: 1fr 2fr;
  row-gap: 0.75em;
  column-gap: 0.5em;
  font-family: sans-serif;
}

.advanced-search > h2 {
  grid-column: 1 / -1;
  margin: 0 0 0.75em;
  font-size: 1.25em;
  text-align: center;
}

.advanced-search label {
  text-align: right;
  padding-right: 0.5em;
  font-weight: 500;
  align-self: center;      /* vertically center label */
  margin: 0;
  line-height: normal;
}

.advanced-search input[type="text"],
.advanced-search select,
.advanced-search input[type="range"],
.advanced-search .radio-group {
  grid-column: 2 / 3;
  width: 100%;
  box-sizing: border-box;
}

.advanced-search input[type="range"] {
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

/* ─── 2) Age‐Range grid ─── */
.advanced-search .age-slider {
  display: grid;
  grid-template-columns: 1fr 2fr;
  row-gap: 0.5em;
  column-gap: 0.5em;
  align-items: center;
}

.advanced-search .age-slider label {
  text-align: right;
  font-weight: 500;
  margin: 0;
}

.advanced-search .age-slider input[type="range"] {
  width: 100%;
  margin: 0;
}

/* ─── 3) Fieldset spacing ─── */
.advanced-search fieldset {
  grid-column: 1 / -1;
  border: none;
  margin: 0 0 1em;
  padding: 0;
}

.advanced-search legend {
  font-size: 1em;
  font-weight: 500;
  margin-bottom: 0.5em;
  color: #333;
}

/* ─── 4) Button row tweaks ─── */
.advanced-search .button-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.75em;
  margin-top: 1.5em; /* a bit more breathing room */
}

.advanced-search .button-row button {
  flex: 1;
  padding: 0.75em;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}

.advanced-search .button-row .btn-primary {
  background-color: #4caf50;
  color: white;
}

.advanced-search .button-row .btn-secondary {
  background-color: #bf0202;
  color: white;
}

/* ─── 5) Responsive collapse on small screens ─── */
@media (max-width: 400px) {
  .search-panel {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }

  .advanced-search {
    grid-template-columns: 1fr;
  }

  .advanced-search label {
    text-align: left;
    padding-right: 0;
    margin-bottom: 0.25em;
  }

  .advanced-search input[type="text"],
  .advanced-search select,
  .advanced-search input[type="range"],
  .advanced-search .radio-group {
    grid-column: 1 / -1;
  }

  .advanced-search fieldset {
    margin-bottom: 1.25em;
  }
}
/* 1) Make the “hint” text stand out */
.advanced-search .results-box .search-hint {
  margin: 0 0 0.5em;
  font-size: 0.95em;
  color: #555;
  font-style: italic;
}

/* 2) Tweak .user-entry to look more like a link/button */
.advanced-search .results-box .user-entry {
  display: flex;
  align-items: center;        /* center icon + text */
  gap: 0.5em;                  /* space between icon and name */
  width: 100%;
  padding: 0.75em;             /* a bit more padding for easy tapping */
  margin-bottom: 0.5em;        /* more breathing room between items */
  background: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #007bff;              /* link-blue by default */
  text-decoration: none;       /* remove any browser underline */
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, text-decoration 0.2s;
}

/* 3) Hover/focus: underline + slight background change */
.advanced-search .results-box .user-entry:hover,
.advanced-search .results-box .user-entry:focus {
  background: #e9f2ff;         /* very light blue */
  border-color: #007bff;
  text-decoration: underline;  /* underline on hover/focus */
  outline: none;
}

/* 4) Icon color matches link color */
.advanced-search .results-box .user-entry i {
  color: #007bff;
}

/* 5) If it’s a <button>, remove default button styles */
.advanced-search .results-box .user-entry[type="button"],
.advanced-search .results-box .user-entry[role="button"] {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
/* ── Style for the “Click a user…” hint ── */
.search-hint {
  display: flex;
  align-items: center;
  gap: 0.5em;                  /* space between icon and text */
  font-size: 0.95em;           /* slightly smaller than body text */
  color: #444;                 /* dark‐gray for good contrast */
  background-color: #f0f8ff;   /* very light blue */
  padding: 0.5em 0.75em;       /* top/bottom and left/right padding */
  border-left: 3px solid #007bff; /* blue accent bar at left */
  border-radius: 4px;
  margin-bottom: 0.75em;       /* space below before the buttons */
}
.search-hint i {
  font-size: 1.1em;            /* make the icon just a bit bigger */
  color: #007bff;              /* same blue as the accent bar */
}

/* ─────────────────────────────────────────
   Flags
   ───────────────────────────────────────── */
.flag-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
  vertical-align: middle;
}
/* Inbox Delete etc*/
/* Ensure each inbox-item is position: relative so the icon can be absolutely placed */
#inbox-list .inbox-item {
  position: relative;
  padding-right: 2rem; /* leave space on the right for the icon */
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

/* Style the delete icon on the right */
.delete-inbox-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1rem; /* adjust as needed */
  color: #cc0000;  /* a red color to stand out */
}
.delete-inbox-btn:hover {
  color: #ff0000;
}
/* ────────────────────────────────────────────────────────────────────
   Make the search‐icon button line up vertically with the other tabs
   ──────────────────────────────────────────────────────────────────── */
.nav-tabs .icon-button {
  /* Match the padding used by .nav-tab a (1rem top/bottom) */
  padding: 1rem 0;
  /* Keep it full-width so it sits exactly under its <li> and matches the <a> width */
  width: 100%;
  /* Center the icon horizontally */
  display: block;
  /* Use a line-height to help center the icon inside its padded space */
  line-height: 1;
}
/* ────────────────────────────────────────────────────────────────────
   VIDEO CHAT FIXES
   ──────────────────────────────────────────────────────────────────── */

/* 1) Base container (#video-chat) should be a fixed box in the lower right,
      but with pointer‐events enabled so you can click the Stop button.
      We’ll give it a slightly larger width and position it above the chat area. */
#video-chat {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;                /* a bit wider so two videos can sit comfortably */
  background: none;
  border-radius: 8px;
  padding: 8px;
  z-index: 1000;
  pointer-events: auto;        /* ensure clicks pass through to children (videos & controls) */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 2) The flex container that holds both videos should let them sit side-by-side,
      with equal width and a small gap. */
.video-container {
  display: flex;
  width: 100%;
  gap: 8px;
  justify-content: center;
  align-items: center;
  position: relative;          /* so absolute children (if any) are relative to this box */
  margin-bottom: 8px;          /* space between videos and controls */
}

/* 3) Each <video> (“video-box”) should flex to half the container,
      maintain a 4:3 aspect ratio, have a dark background, and allow dragging. */
.video-box {
  flex: 1 1 0;
  max-width: 50%;
  aspect-ratio: 4/3;
  background: #000;
  border: 2px solid limegreen;
  border-radius: 4px;
  object-fit: cover;           /* preserve aspect ratio, crop if necessary */
  cursor: grab;                /* visually indicate you can drag */
  user-select: none;           /* prevent accidental text selection while dragging */
}
.video-box:active {
  cursor: grabbing;
}

/* 4) Make sure the “localVideo” (the smaller preview) sits on top of the remote feed,
      but we’re now allowing both <video> elements to use flex instead of absolute. If you
      still want a tiny preview overlay, uncomment the block below. */
/*
#localVideo {
  position: absolute;
  width: 100px;
  height: auto;
  bottom: 12px;
  right: 12px;
  z-index: 1001;
  border: 2px solid white;
  border-radius: 4px;
  object-fit: cover;
}
*/

/* 5) The controls bar (“Stop Video” button) should appear immediately beneath the videos,
      centered, with a small margin. It must also be clickable. */
.controls-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
#video-controls {
  /* Remove any “hidden” behavior, we'll toggle it via JavaScript */
  display: flex !important;
  margin-top: 4px;
}

/* 6) Style for the “Stop Video” button so it’s clearly legible on a dark background. */
#stop-video-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* 7) Ensure that, if the chat area itself is overlapping, the video box appears on top. */
.chat-area {
  position: relative; /* so video-chat can sit above it via z-index */
  /* …existing rules… */
}

/* 8) (Optional) If you’d like to be able to drag the video‐box around inside #video-chat */
.video-box {
  position: relative; /* base for dragging transform */
}

/* 9) If you have any JavaScript that calls `makeDraggable(localVideo)` and `makeDraggable(remoteVideo)`,
      it will now work on these .video-box elements. */
/* ────────────────────────────────────────────────────────────────────
   FORCE CHAT ACTIONS (Block / Start Video) TO STAY VISIBLE
   ──────────────────────────────────────────────────────────────────── */
.chat-area {
  /* Make sure the chat‐area can scroll its own contents if needed,
     instead of hiding the chat header off the top */
  position: relative;
  overflow-y: auto;
}

/* Pin the .chat-actions row so it never scrolls out of view,
   and place it above any overlapping video/chat layers */
.chat-actions {
  position: sticky;
  top: 0;
  z-index: 1001;        /* higher than the video and message layers */
  background: white;    /* match your existing background */
  padding: 0.8rem;      /* same padding you already had */
  display: flex;
  gap: 0.8rem;
  border-bottom: 1px solid #e0e0e0;
}

/* Ensure the individual buttons inside .chat-actions also stay clickable */
.chat-actions button {
  z-index: 1002;
}
/* ────────────────────────────────────────────────────────────────────
   PIN “Block” / “Start Video Chat” ABSOLUTELY AT TOP OF CHAT COLUMN
   ──────────────────────────────────────────────────────────────────── */

/* 1) Make .chat-area the positioning context */
.chat-area {
  position: relative;     /* now any 'position:absolute' inside refers to this box */
}

/* 2) Absolutely‐pin .chat-actions at the top, full‐width of .chat-area */
.chat-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: white;            /* same as before */
  padding: 0.8rem;              /* keep your existing padding */
  display: flex;
  gap: 0.8rem;
  border-bottom: 1px solid #e0e0e0;
  z-index: 1001;                /* ensure it floats above video/messages */
}

/* 3) Everything else inside .chat-area (video, header, messages, input)
      needs to sit *below* .chat-actions.  We give it a top‐margin
      equal to the height of the .chat-actions bar (≈48px). */
.chat-area > *:not(.chat-actions) {
  margin-top: calc(0.8rem + 1px + /* roughly button height */ 32px);
}

/*
   Explanation of that calc():
   - 0.8rem             → your .chat-actions vertical padding
   - + 1px              → the 1px border‐bottom
   - + 32px (≈2rem)      → roughly the line‐height (button height) of those two buttons
   You can tweak “32px” up/down until the spacing looks perfect, but it should be around 2rem (32px) if your buttons are ~2rem tall.
*/

/* 4) On narrow screens, when the sidebar hides/shows, .chat-actions still
      sits flush to the left edge of .chat-area (no change needed). */
@media (max-width: 768px) {
  .chat-actions {
    /* no extra left margin: it automatically starts at the left of the chat‐column */
  }
  .chat-area > *:not(.chat-actions) {
    /* same top‐margin so content never runs under the pinned buttons */
    margin-top: calc(0.8rem + 1px + 32px);
  }
}
@media (max-width: 768px) {
  /* Mobile layout root fixes */
  body {
    height: 100vh;
    height: -webkit-fill-available;
    overflow: hidden;
  }
  
  #chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* Chat area adjustments */
  .chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px; /* Space for input only */
  }

  /* Compact action buttons */
  .chat-actions {
    position: fixed;
    bottom: 60px; /* Sit directly above input */
    left: 0;
    right: 0;
    background: white;
    padding: 5px 10px;
    display: flex;
    gap: 5px;
    z-index: 1000;
    border-top: 1px solid #e0e0e0;
    height: 40px; /* Fixed height */
  }

  /* Button styles */
  .block-button,
  .video-button {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
  }

  /* Message input area */
  .message-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 8px 10px;
    z-index: 1001;
    border-top: 1px solid #e0e0e0;
    height: 60px; /* Fixed height */
  }

  /* Messages container */
  .chat-messages {
    padding-bottom: 100px; /* Space for buttons + input */
    padding-top: 10px;
  }

  /* Video chat position */
  #video-chat {
    bottom: 100px !important;
  }

  /* Hamburger menu adjustment */
  .sidebar-toggle {
    top: 20px;
    left: 10px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}
/* ────────────────────────────────────────────────────────────────────
   SHOW/HIDE THE SIDEBAR‐TOGGLE (Hamburger) BASED ON SCREEN WIDTH
   ──────────────────────────────────────────────────────────────────── */

/* 1) Hide by default (desktop) */
.sidebar-toggle {
  display: none;
}

/* 2) On mobile (≤768px), show it as a flex‐container so you can click it */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
    position: fixed;      /* ensure it floats above other content */
    top: 20px;
    left: 20px;
    background: #114777;  /* same color as your sidebar, for consistency */
    color: white;
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 1001;;         /* above sidebar and chat content */
  }
}
@media (max-width: 768px) {
  /* Adjust the chat-actions container */
  .chat-actions {
    left: 60px; /* Space for hamburger */
    right: 10px; /* Add right margin */
    padding: 5px 0; /* Reduce horizontal padding */
  }

  /* Make buttons slightly narrower */
  .block-button,
  .video-button {
    flex: 0.9; /* Instead of 1 - makes them take 90% of space */
    margin: 0 2px; /* Small horizontal gap */
    min-width: auto; /* Allow natural width */
  }

  /* Optional: Adjust font size if needed */
  .block-button,
  .video-button {
    font-size: 11px; /* Slightly smaller text */
    padding: 5px 6px; /* Tighter padding */
  }
}
/* Add this to your styles.css file */

/* Remove overflow restrictions from html/body */
html, body {
  overflow-x: hidden; /* Keep this to prevent horizontal scroll */
  overflow-y: auto; /* Allow vertical scrolling */
}

/* Ensure marketing wrapper allows scrolling */
.marketing-wrapper {
  overflow-y: visible; /* Allow content to flow naturally */
  min-height: 100vh; /* Ensure it takes at least full viewport height */
}

/* Make sure hero and other sections don't restrict height */
#hero, #features, #how-it-works, #testimonials {
  min-height: auto; /* Don't restrict height */
  overflow: visible; /* Allow content to flow */
}

/* ──────────────────────────────────────────────────────────────────────────
   (A) Mobile: sidebar slides in/out from left and floats above chat
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;               /* same width you already had */
    height: 100vh;
    transform: translateX(-100%); /* off‐canvas initially */
    z-index: 1000;               /* above chat‐area */
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }

  /* When sidebar is hidden (no .open), chat‐area takes full width */
  .chat-area {
    flex: 1 1 100%;
  }

  /* Keep the hamburger visible on mobile */
  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: 20px;
    left: 20px;
    background: #114777;
    color: white;
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 1001;  /* above the sidebar */
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   (B) Desktop: sidebar is part of the flex layout, NOT fixed
   ────────────────────────────────────────────────────────────────────────── */
@media (min-width: 769px) {
  .sidebar {
    position: relative;  /* let #chat-container flex place it beside .chat-area */
    transform: none;     /* no translateX on desktop */
    z-index: auto;       /* reset to default stacking */
    width: 280px;        /* same width as before */
    height: 100vh;       /* full height of viewport */
    transition: none;    /* no slide-in/slide-out needed on desktop */
  }

  /* Hide hamburger on desktop */
  .sidebar-toggle {
    display: none;
  }

  /* Ensure chat‐area simply lives to the right of the sidebar */
  .chat-area {
    flex: 1;             /* fill remaining width */
    position: relative;  /* as before */
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 2000;           /* ↑ make sure this exceeds any chat/action/input z-index */
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }

  /* (your existing .sidebar-toggle stays at z-index:2001 or similar) */
  .sidebar-toggle {
    z-index: 2001;
  }
}
/* ─────────────────────────────────────────────────────────────────────────────
   0) CORE LAYOUT & EXISTING SITE STYLES
   (Leave all of your other site‐wide CSS untouched)
   ───────────────────────────────────────────────────────────────────────────── */


/* ─────────────────────────────────────────────────────────────────────────────
   0) #video-chat hidden by default
   ───────────────────────────────────────────────────────────────────────────── */
#video-chat {
  display: none; /* entire container remains hidden until JS calls show() */
}

/* ─────────────────────────────────────────────────────────────────────────────
   VIDEO-CHAT CONTAINER (bumped up so it doesn’t overlap the chat input)
   ───────────────────────────────────────────────────────────────────────────── */
#video-chat {
  position: fixed;
  top: 20px;     /* ← bump it down 20px from the top edge */
  right: 20px;   /* ← keep it 20px from the right edge */
  z-index: 2000;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: auto;
  height: auto;
  overflow: visible;
  resize: none;
}
 


/* ─────────────────────────────────────────────────────────────────────────────
   2) .video-container & .video-box (each camera)
   ───────────────────────────────────────────────────────────────────────────── */
.video-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0;
}

.video-box {
  flex: none;
  width: 45%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: visible;
  min-width: 160px;
  min-height: 120px;
  background: #000;
  border: 2px solid limegreen;
  border-radius: 4px;
  resize: none;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  cursor: grab;
  user-select: none;
}

.video-box:active video {
  cursor: grabbing;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3) .resize-handle-video (each box’s 12×12 striped corner)
   ───────────────────────────────────────────────────────────────────────────── */
.video-box .resize-handle-video {
  position: absolute;
  width: 12px;
  height: 12px;
  right: 0;
  bottom: 0;
  cursor: se-resize;
  z-index: 1002;
  background-color: rgba(255, 255, 255, 0.8);
  background-image:
    repeating-linear-gradient(
      135deg,
      #000 0px,
      #000 2px,
      transparent 2px,
      transparent 4px
    );
  border-top: 1px solid #aaa;
  border-left: 1px solid #aaa;
  border-bottom: none;
  border-right: none;
  border-top-left-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4) Video Controls container (Stop Video button)
   ───────────────────────────────────────────────────────────────────────────── */
.controls-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

/* #video-controls will be set to display: block by JS show() */
#video-controls {
  display: flex !important;
}

/* Stop Video button styling */
#stop-video-btn {
  background: #ff0044;
  border: none;
  color: #FFF;
  padding: 0.5em 1em;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
}
#stop-video-btn:hover {
  background: #e6003f;
}
/* ─────────────────────────────────────────────────────────────────────────────
   On mobile (≤768px), keep #video-chat hidden until JS explicitly shows it
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #video-chat {
    display: none !important;
  }
}
/* Emoji Picker Styles */
.emoji-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  color: #666;
}

.emoji-picker {
  position: absolute;
  bottom: 60px;
  right: 20px;
  width: 300px;
  height: 300px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow-y: scroll;
  z-index: 1000;
  display: none;
  padding: 10px;
}

.emoji-picker.open {
  display: block;
}

.emoji-picker span {
  display: inline-block;
  font-size: 1.5rem;
  padding: 5px;
  cursor: pointer;
}

.emoji-picker span:hover {
  transform: scale(1.2);
}
/* Status dot styles */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.online {
    background-color: #4CAF50;
    box-shadow: 0 0 5px #4CAF50;
}

.status-dot.offline {
    background-color: #F44336;
}



/* Add these to your existing CSS */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    transition: background-color 0.3s ease;
}

.status-dot.online {
    background-color: #4CAF50;
    box-shadow: 0 0 5px #4CAF50;
}

.status-dot.offline {
    background-color: #F44336;
}

.inactive-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-left: 5px;
}


/* Animated hamburger to X */
#sidebar-toggle {
  transition: transform 0.3s ease, color 0.3s ease;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  color: #000;
}

#sidebar-toggle:hover {
  color: #ffcc00;
  transform: scale(1.2);
}


#advanced-search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  background-color: white;
  overflow-y: auto;
  padding: 1em;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  #advanced-search-panel {
    padding: 0.5em;
  }
}


/* Improved spacing for search results */


/* Boxed button-style results */


/* Enhanced user-entry style for better tapping and spacing */
.user-entry {
  display: flex;
  align-items: center;
  gap: 0.75em;
  background: #f0f8ff;
  border: 1px solid #ccc;
  padding: 0.75em 1em;
  border-radius: 8px;
  margin-bottom: 0.75em;
  width: 100%;
  font-size: 1rem;
  color: #114777;
  font-weight: bold;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  cursor: pointer;
  text-align: left;
}

.user-entry:hover {
  background: #e6f2ff;
}

.user-entry i {
  color: #007bff;
  font-size: 1.2em;
}
/* Add this to your styles.css file */
.sidebar-footer {
  padding: 0.5rem 1rem; /* Reduced padding */
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  margin-top: auto; /* Pushes footer to bottom */
  min-height: auto; /* Remove fixed height */
}

.sidebar-footer .app-info {
  font-size: 0.7rem; /* Smaller text */
  color: rgba(255,255,255,0.5); /* Lighter color */
  margin: 0.25rem 0; /* Reduced margin */
  line-height: 1.2;
}

.sidebar-footer .footer-note {
  font-size: 0.65rem; /* Smaller text */
  color: rgba(255,255,255,0.4); /* Even lighter color */
  margin: 0.25rem 0 0; /* Reduced margin */
}

.logout-button {
  padding: 0.3rem 0.6rem; /* Smaller button */
  font-size: 0.8rem; /* Smaller text */
  margin-bottom: 0.5rem; /* Reduced margin */
}

/* Ensure the online list takes up remaining space */
.online-section {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.user-list {
  flex: 1;
  overflow-y: auto;
}

/* Adjust the info message */
.info-messages {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.user-list {
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}
/* ─────────────────────────────────────────────────────────────────────────────
   VIDEO CHAT IMPROVEMENTS - CLEAN VERSION
   ───────────────────────────────────────────────────────────────────────────── */

#video-chat {
  position: fixed;
  bottom: 80px; /* Position above input bar */
  right: 20px;
  width: 360px;
  max-width: 90%; /* Prevent being too wide on large screens */
  background: transparent; /* Removed gray background */
  border-radius: 8px;
  padding: 0; /* Removed padding since we don't need the container background */
  z-index: 1000;
  display: none; /* Hidden by default */
}

.video-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.video-box {
  flex: 1 1 160px; /* Flexible but minimum 160px */
  max-width: calc(50% - 4px); /* Two boxes with gap */
  aspect-ratio: 4/3;
  background: #000; /* Black background for video elements */
  border: 2px solid limegreen;
  border-radius: 4px;
  overflow: hidden;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.controls-container {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

#stop-video-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

#stop-video-btn:hover {
  background: #c0392b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #video-chat {
    bottom: 120px; /* Higher up on mobile to avoid keyboard */
    width: 280px;
  }
  
  .video-box {
    min-width: 120px;
  }
}

@media (min-width: 1200px) {
  #video-chat {
    width: 400px; /* Slightly larger on very big screens */
  }
  
  .video-box {
    max-width: 190px; /* Limit growth on large screens */
  }
}