/* ============================================================
   StreakSync - Global Styles
   ============================================================ */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Light mode scrollbar */
.light ::-webkit-scrollbar-thumb { background: #cbd5e1; }
.light ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Custom Scrollbar for Chat/Modals - High Visibility */
.custom-scrollbar::-webkit-scrollbar {
  width: 10px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
  border: 1px solid transparent;
}
.light .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #3b82f6;
}
.light .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Selection */
::selection { background: rgba(59, 130, 246, 0.3); }

/* Transitions */
* { transition-property: background-color, border-color, color, fill, stroke; transition-duration: 200ms; }

/* Toast animations */
.toast-enter { animation: slideInRight 0.3s ease-out; }
.toast-exit { animation: fadeOut 0.3s ease-in forwards; }

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* WhatsApp Pro Animations */
@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.animate-pulse-red {
  animation: pulse-red 2s infinite;
}

/* Custom Mini Scrollbar for Emoji Picker */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.animate-scale-in {
  animation: scale-in 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes scale-in {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Chat bubbles - Professional Style */
.chat-bubble-sent {
  background: #3b82f6;
  border-radius: 12px 12px 0px 12px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.chat-bubble-received {
  background: #1e293b;
  border-radius: 12px 12px 12px 0px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.light .chat-bubble-sent {
  background: #bfdbfe;
  color: #1e3a8a;
}

.light .chat-bubble-received {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

/* Chat Search Bar */
.chat-search-input {
  background: #202c33;
  border: 1px solid transparent;
}
.light .chat-search-input {
  background: #f0f2f5;
}

/* Streak fire glow */
.streak-glow {
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.5), 0 0 20px rgba(249, 115, 22, 0.3);
}

/* Card hover effect */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Light mode card hover */
.light .card-hover:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Streak counter animation */
.streak-counter {
  font-variant-numeric: tabular-nums;
}

/* Gradient text - Now Solid for professional look */
.gradient-text {
  color: #3b82f6;
}

/* Input focus ring */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Avatar */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
  background: #3b82f6;
  color: white;
  font-weight: 600;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.light .skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile bottom nav */
.bottom-nav-item.active {
  color: #3b82f6;
}
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #3b82f6;
  border-radius: 3px;
}

/* Notification badge pulse */
.badge-pulse {
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Page transitions */
.page-enter { animation: fadeIn 0.3s ease-out; }

/* Typing indicator dots */
.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  margin: 0 1px;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Progress bar */
.progress-bar {
  background: #3b82f6;
  transition: width 0.5s ease;
}

/* Online status indicator */
.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid;
  position: absolute;
  bottom: 0;
  right: 0;
}
.dark .online-dot { border-color: #0f172a; }
.light .online-dot { border-color: #ffffff; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Light mode overrides */
.light body, .light { background-color: #f8fafc; color: #0f172a; }
.light .bg-dark-900 { background-color: #f8fafc; }
.light .bg-dark-800 { background-color: #ffffff; }
.light .bg-dark-700 { background-color: #f1f5f9; }
.light .text-dark-100 { color: #0f172a; }
.light .text-dark-300 { color: #334155; }
.light .text-dark-400 { color: #475569; }
.light .text-dark-500 { color: #64748b; }
.light .border-dark-700 { border-color: #e2e8f0; }
.light .border-dark-800 { border-color: #f1f5f9; }
