/* Classic Omegle-style layout — mobile-first */

/* === Mobile: videos side-by-side on top, chat panel below === */
.omegle-video-area {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
}

.omegle-video-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  flex-shrink: 0 !important;
  background: #000;
  gap: 0 !important;
}

.omegle-video-grid > div {
  border-radius: 0 !important;
  min-height: 0 !important;
  height: 180px !important;
  border-right: 1px solid #444;
}

.omegle-video-grid > div:last-child {
  border-right: none;
}

/* === Classic Omegle Chat Panel — shown on all screen sizes === */
#omegle-classic-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  overflow: hidden;
  border-top: 2px solid #888;
}

#omegle-chat-banner {
  background: #d0dce8;
  border-bottom: 1px solid #b0bcc8;
  padding: 6px 10px;
  font-size: 12px;
  color: #333;
  font-weight: bold;
  flex-shrink: 0;
  line-height: 1.4;
}

#omegle-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.omegle-sys-msg {
  color: #888;
  font-style: italic;
  font-size: 12px;
  padding: 2px 0;
}

.omegle-user-msg {
  font-size: 14px;
  padding: 2px 0;
  color: #222;
  word-break: break-word;
}

.omegle-msg-label {
  font-weight: bold;
  color: #1a4a8a;
}

.omegle-stranger-msg .omegle-msg-label {
  color: #c00;
}

#omegle-chat-controls {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  border-top: 1px solid #ccc;
  background: #f5f5f5;
  padding: 6px;
  gap: 6px;
  align-items: flex-end;
}

#omegle-chat-input {
  flex: 1;
  resize: none;
  height: 44px;
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 6px 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #222;
  line-height: 1.4;
  -webkit-appearance: none;
}

#omegle-chat-input:focus {
  border-color: #4a90d9;
}

#omegle-chat-send-btn {
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0 16px;
  height: 44px;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-appearance: none;
}

#omegle-chat-send-btn:hover {
  background: #357abd;
}

#omegle-chat-send-btn:active {
  background: #2868a0;
}

/* === Desktop overrides (900px+): videos on left, chat on right === */
@media (min-width: 900px) {
  .omegle-video-area {
    flex-direction: row !important;
    background: #dadada;
  }

  .omegle-video-grid {
    width: 400px !important;
    min-width: 400px !important;
    max-width: 400px !important;
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
    align-self: center;
    grid-template-columns: 1fr !important;
    grid-template-rows: 300px 300px !important;
    border: 2px solid #999;
    flex-shrink: 0;
  }

  .omegle-video-grid > div {
    height: 300px !important;
    border-right: none;
    border-bottom: 1px solid #888;
  }

  .omegle-video-grid > div:last-child {
    border-bottom: none;
  }

  #omegle-classic-chat {
    font-size: 13px;
    border-top: none;
    border-left: 1px solid #ccc;
  }

  #omegle-chat-input {
    height: 56px;
    font-size: 13px;
  }

  #omegle-chat-send-btn {
    height: 56px;
    font-size: 13px;
    padding: 0 18px;
  }

  .omegle-user-msg {
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════════
   HOMEPAGE ENHANCEMENTS
   ═══════════════════════════════════════════════ */

/* Sharper font rendering site-wide */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero section polish ── */
/* Add subtle animated gradient overlay */
@keyframes hue-shift {
  0%   { filter: hue-rotate(0deg); }
  50%  { filter: hue-rotate(15deg); }
  100% { filter: hue-rotate(0deg); }
}

/* Pulse the "online" indicator dot */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* Animate the green dot already in the hero badge */
[class*="online"] .h-2, [class*="online"] [class*="w-2"],
span[class*="rounded-full"][class*="bg-green"],
span[class*="h-2"][class*="w-2"] {
  animation: pulse-dot 1.8s ease-in-out infinite;
}

/* Start Chat CTA button — add glow */
a[href="/chat"] > button,
button[class*="bg-white"],
a[href="/chat"] {
  transition: transform .15s ease, box-shadow .15s ease !important;
}
a[href="/chat"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,.25) !important;
}

/* ── Feature / stats cards — lift on hover ── */
@media (min-width: 768px) {
  [class*="rounded"][class*="bg-white\/"],
  [class*="rounded"][class*="backdrop"] {
    transition: transform .18s ease, box-shadow .18s ease !important;
  }
  [class*="rounded"][class*="bg-white\/"]:hover,
  [class*="rounded"][class*="backdrop"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,.18) !important;
  }
}

/* ── Navbar — add a subtle blur backdrop on scroll ── */
nav, header {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* ── Smooth scroll for anchor links ── */
html {
  scroll-behavior: smooth;
}

/* ── FAQ section — smooth accordion ── */
[data-radix-accordion-content],
details summary ~ * {
  transition: height .25s ease, opacity .25s ease;
}

/* ── Footer links hover ── */
footer a:hover {
  opacity: 1 !important;
  text-decoration: underline;
}

/* ── Hide mute + camera-off buttons ── */
button[title="Mute"],
button[title="Unmute"],
button[title="Camera on"],
button[title="Camera off"] {
  display: none !important;
}

/* ── Chat input — disabled (not connected) state ── */
#omegle-chat-input:disabled {
  background: #f0f0f0 !important;
  color: #aaa !important;
  cursor: not-allowed !important;
  border-color: #ddd !important;
}

#omegle-chat-send-btn:disabled {
  background: #b0c4d8 !important;
  cursor: not-allowed !important;
  opacity: 0.55 !important;
}
