:root {
  --bg-dark: #07090e;
  --bg-dark-accent: #0f131f;
  --card-bg: rgba(15, 22, 38, 0.6);
  --card-border: rgba(255, 255, 255, 0.06);
  
  --primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --primary-glow: rgba(0, 242, 254, 0.45);
  --primary-solid: #00f2fe;
  
  --secondary: #4facfe;
  
  --vip-gradient: linear-gradient(135deg, #ffe066 0%, #f59e0b 50%, #d97706 100%);
  --vip-glow: rgba(245, 158, 11, 0.5);
  
  --danger: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --danger-glow: rgba(244, 63, 94, 0.4);
  
  --success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --success-glow: rgba(16, 185, 129, 0.4);
  
  --warning: #f59e0b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

/* Target ONLY index.html body to prevent scrolling and viewport jumping */
html.chat-page-html, body.chat-page-body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* يمنع التمرير والاهتزاز بالكامل */
}

body.chat-page-body {
  display: flex;
  flex-direction: column;
  position: fixed; /* يمنع اهتزاز الشاشة على هواتف الايفون والاندرويد */
  width: 100%;
  height: 100%;
}


/* Background animated glow balls */
.bg-glow-1, .bg-glow-2 {
  position: absolute;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
  animation: glowMove 25s infinite alternate ease-in-out;
}

.bg-glow-1 {
  background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
  top: -10%;
  right: -5%;
}

.bg-glow-2 {
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  bottom: -10%;
  left: -5%;
  animation-delay: -10s;
}

@keyframes glowMove {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 10%) scale(1.15); }
  100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Navbar */
.navbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(7, 9, 14, 0.75);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 70px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.logo-icon {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-highlight {
  color: var(--primary-solid);
  text-shadow: 0 0 10px var(--primary-glow);
}

.premium-badge-text {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: var(--vip-gradient);
  color: var(--text-dark);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 5px;
  box-shadow: 0 0 8px var(--vip-glow);
  display: inline-block;
  vertical-align: middle;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning, .btn-vip-upgrade {
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-dark);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: var(--text-main);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--danger-glow);
}
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-success {
  background: var(--success);
  color: var(--text-main);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--success-glow);
}

.btn-warning {
  background: #f59e0b;
  color: var(--text-dark);
}
.btn-warning:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}
.btn-warning:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.1rem;
  border-radius: 12px;
}

.btn-glow {
  animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 242, 254, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.btn-admin {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: var(--text-main);
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-admin:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* User profile display */
.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
}

.username {
  font-weight: 600;
  color: var(--text-main);
}

.vip-badge {
  background: var(--vip-gradient);
  color: var(--text-dark);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px var(--vip-glow);
  animation: vipPulse 1.5s infinite alternate;
}

@keyframes vipPulse {
  0% { transform: scale(1); box-shadow: 0 0 8px var(--vip-glow); }
  100% { transform: scale(1.05); box-shadow: 0 0 15px var(--vip-glow); }
}

/* Main Content Layout */
.main-content {
  flex: 1;
  width: 100%;
  height: calc(100vh - 70px);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Video Section */
.video-section {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
  height: 100%;
  width: 100%;
}

.video-card {
  position: relative;
  background: #000;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.local-card video {
  transform: scaleX(-1); /* Mirror local video */
}

/* Glowing border for active video cards */
.video-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  pointer-events: none;
  border: 2px solid transparent;
  transition: all 0.3s;
  z-index: 5;
}

.remote-card.connected::after {
  border-color: var(--primary-solid);
  box-shadow: inset 0 0 30px rgba(0, 242, 254, 0.2);
}

.local-card.connected::after {
  border-color: #a855f7;
  box-shadow: inset 0 0 30px rgba(168, 85, 247, 0.2);
}

/* Floating Overlays */
.floating-chat {
  position: absolute;
  bottom: 100px;
  left: 20px;
  width: 350px;
  height: 320px;
  z-index: 50;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

.floating-filters {
  position: absolute;
  bottom: 100px;
  right: 20px;
  width: 340px;
  z-index: 50;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

.floating-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 15px;
  padding: 0;
  background: transparent;
  width: auto;
}

/* Toggle Buttons for Mobile Overlays */
.floating-toggle-btn {
  display: none; /* Hidden on desktop */
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 70;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.9rem;
}

.floating-toggle-btn:active {
  transform: scale(0.9);
  background: rgba(0, 242, 254, 0.3);
}

.chat-toggle {
  left: 10px;
  bottom: 75px;
  top: auto;
}

.filter-toggle {
  right: 10px;
  bottom: 75px;
  top: auto;
}

/* Responsive Overrides for Mobile screen split layout */
@media (max-width: 768px) {
  .floating-toggle-btn {
    display: flex !important; /* Visible on mobile */
  }

  .video-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  
  /* ===== CHAT: مخفي افتراضياً ===== */
  .floating-chat {
    display: none !important;
    position: absolute;
    width: 94%;
    left: 3%;
    bottom: 60px;
    height: auto;
    max-height: 290px;
    background: rgba(7, 9, 14, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    z-index: 80;
    flex-direction: column;
  }

  .floating-chat.open {
    display: flex !important;
    animation: mobileSlideUp 0.25s ease-out both;
  }

  .floating-chat .card-header {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .floating-chat .card-header h3 {
    font-size: 0.85rem;
  }

  .floating-chat .chat-messages {
    flex: 1;
    min-height: 110px;
    max-height: 160px;
    overflow-y: auto;
    padding: 8px 10px;
  }

  .floating-chat .chat-input-area {
    padding: 8px 10px;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .floating-chat .chat-input-area input {
    font-size: 16px; /* يمنع iOS من عمل zoom تلقائي عند الكتابة */
    padding: 10px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
  }

  .floating-chat .btn-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  
  /* ===== FILTERS: مخفي افتراضياً ===== */
  .floating-filters {
    display: none !important;
    position: absolute;
    top: 55px;
    bottom: auto;
    right: 3%;
    width: 94%;
    height: auto;
    max-height: 220px;
    background: rgba(7, 9, 14, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    z-index: 80;
    overflow-y: auto;
  }

  .floating-filters.open {
    display: flex !important;
    animation: mobileSlideDown 0.25s ease-out both;
  }
  
  .floating-filters .vip-promo-banner {
    padding: 6px;
    margin-bottom: 4px;
  }
  
  .floating-filters .vip-promo-banner p,
  .floating-filters .vip-promo-banner button {
    display: none !important;
  }
  
  .floating-filters .filter-group {
    margin-bottom: 6px;
  }
  
  .floating-filters .card-header {
    padding: 8px 12px;
  }

  .floating-filters .card-header h3 {
    font-size: 0.85rem;
  }
  
  /* ===== CONTROLS: أزرار أصغر ===== */
  .floating-controls {
    bottom: 12px;
    width: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 6px;
  }
  
  .btn-large {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 20px;
  }

  /* ===== NAVBAR: مضغوط ===== */
  .navbar {
    height: 42px;
  }
  
  .nav-container {
    padding: 0 8px;
  }
  
  .logo {
    font-size: 0.95rem;
  }

  .logo-icon {
    font-size: 0.85rem;
  }
  
  .premium-badge-text {
    display: none !important;
  }

  /* إخفاء نصوص الأزرار في navbar وإبقاء الأيقونات فقط */
  .nav-actions .btn-admin,
  .nav-actions .btn-secondary {
    padding: 6px 10px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .nav-actions .btn-admin span,
  .nav-actions .btn-secondary span {
    display: none;
  }

  .username {
    font-size: 0.75rem;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vip-badge {
    font-size: 0.6rem;
    padding: 2px 5px;
  }
  
  .main-content {
    height: calc(100vh - 42px);
    height: calc(100dvh - 42px);
  }

  /* تحسين عرض البحث */
  .video-overlay {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .searching-loader .loader-text {
    font-size: 0.8rem;
  }

  /* زر الإغلاق يظهر على الموبايل فقط */
  .panel-close-btn {
    display: flex !important;
  }

  /* أزرار الميك والكاميرا على الموبايل */
  .media-toggles {
    top: 10px !important;
    left: 10px !important;
    bottom: auto !important;
    transform: none !important;
    gap: 8px;
    z-index: 65;
  }

  .media-btn {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
}


@keyframes mobileSlideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes mobileSlideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


.video-overlay {
  position: absolute;
  z-index: 10;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-overlay.top-right {
  top: 15px;
  right: 15px;
}

.video-overlay.top-left {
  top: 15px;
  left: 15px;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
}

.flag-icon {
  font-size: 1.1rem;
}

.vip-tag-small {
  background: var(--vip-gradient);
  color: var(--text-dark);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}


/* Local Video controls toggles overlay */
.media-toggles {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 12px;
  z-index: 20;
}

.media-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.media-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.08);
}

.media-btn.muted {
  background: var(--danger);
  color: var(--text-main);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

/* Radar Search Loader */
.searching-loader {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  text-align: center;
  padding: 20px;
  z-index: 2;
}

.radar {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary-solid);
  border-radius: 50%;
  opacity: 0;
  animation: radarPulse 2.5s infinite linear;
}

.ring:nth-child(2) {
  animation-delay: 0.8s;
}

.ring:nth-child(3) {
  animation-delay: 1.6s;
}

.search-icon {
  font-size: 2.2rem;
  color: var(--primary-solid);
  filter: drop-shadow(0 0 10px var(--primary-glow));
  animation: astronautFloat 3s infinite ease-in-out;
}

@keyframes radarPulse {
  0% { transform: scale(0.3); opacity: 0; }
  10% { opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes astronautFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.loader-text {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 250px;
  line-height: 1.5;
}

/* Action Controls Bar */
.controls-bar {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding: 10px 0;
}

.w-full {
  width: 100%;
}
.mt-4 {
  margin-top: 1rem;
}

/* Cards & Sidebar */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Panel close button (X) */
.panel-close-btn {
  display: none; /* Hidden on desktop */
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.panel-close-btn:active {
  background: rgba(244, 63, 94, 0.4);
  color: white;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.card-body {
  padding: 20px;
}

/* VIP Promo Banner */
.vip-promo-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.vip-promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: rotate(45deg);
  animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
  0% { transform: translate(-30%, -30%) rotate(45deg); }
  100% { transform: translate(30%, 30%) rotate(45deg); }
}

.vip-promo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  margin-bottom: 6px;
}

.vip-gem-icon {
  animation: float 2s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.vip-promo-banner p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-vip-upgrade {
  background: var(--vip-gradient);
  color: var(--text-dark);
  font-size: 0.8rem;
  padding: 8px 12px;
  width: 100%;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
}
.btn-vip-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px var(--vip-glow);
}

/* Filters */
.filter-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.gender-selector-container, .country-selector-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.vip-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f59e0b;
  font-size: 0.85rem;
  font-weight: 700;
  backdrop-filter: blur(2px);
}

.gender-options {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 4px;
  width: 100%;
}

.gender-options input[type="radio"] {
  display: none;
}

.gender-options label {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.gender-options input[type="radio"]:checked + label {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.select-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 10px;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.select-input option {
  background: var(--bg-dark-accent);
  color: var(--text-main);
}

/* Chat Card */
.chat-card {
  flex: 1;
  min-height: 250px;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
  min-height: 180px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  animation: bubbleSlide 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes bubbleSlide {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.chat-bubble.local {
  align-self: flex-start;
  background: rgba(0, 242, 254, 0.08);
  color: #a5f3fc;
  border: 1px solid rgba(0, 242, 254, 0.15);
  border-bottom-right-radius: 2px;
}

.chat-bubble.remote {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 2px;
}

.bubble-sender {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: block;
}

.system-message {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 12px;
  border-radius: 10px;
  align-self: center;
  max-width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.01);
}

.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-input-area input:focus {
  border-color: var(--secondary);
}

.chat-input-area input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-send {
  background: var(--primary);
  color: var(--text-dark);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #0d121f;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  padding: 30px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 25px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.auth-tab.active {
  color: var(--text-main);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-solid);
  box-shadow: 0 0 8px var(--primary-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  outline: none;
  font-size: 0.9rem;
}

.form-input:focus {
  border-color: var(--secondary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.error-msg {
  color: #f43f5e;
  font-size: 0.8rem;
  text-align: center;
  min-height: 18px;
}

/* Report Modal Options */
.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-opt-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  text-align: right;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.report-opt-btn:hover {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
  transform: translateX(-4px);
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.text-warning {
  color: var(--warning);
}

/* PWA Install Modal Design */
.pwa-modal {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 360px;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  animation: pwaSlideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes pwaSlideIn {
  from { transform: translateY(40px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.pwa-modal.hidden {
  display: none !important;
}

.pwa-modal-content {
  padding: 20px;
}

.pwa-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.pwa-app-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 242, 254, 0.2);
}

.pwa-info h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}

.pwa-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ios-instruction-text {
  font-size: 0.8rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ios-instruction-text i {
  color: var(--primary-solid);
  font-size: 0.95rem;
}

.pwa-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
}

.btn-pwa-install {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-pwa-close {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.btn-pwa-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

@media (max-width: 500px) {
  .pwa-modal {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
  }
}

/* VIP Star Badge Active styling */
.vip-badge.star-active, .vip-tag-small.star-active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  animation: vipPulse 1.2s infinite alternate !important;
}

