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

body { overflow-x: hidden; }

.gradient-bg {
  background: linear-gradient(135deg, #0a0f1a 0%, #1a1040 30%, #2d1b69 60%, #1a1040 100%);
}

.auth-gradient {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
  min-height: 100vh;
}

.btn-gradient {
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  transition: all 0.3s ease;
}
.btn-gradient:hover {
  background: linear-gradient(135deg, #6D28D9, #DB2777);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}
.btn-gradient:active { transform: translateY(0); }

.card-hover {
  transition: all 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.sidebar-item {
  transition: all 0.2s ease;
}
.sidebar-item:hover {
  background: rgba(124, 58, 237, 0.15);
}
.sidebar-item.active {
  background: rgba(124, 58, 237, 0.25);
  border-right: 3px solid #7C3AED;
}

/* ---- Pill Toggle ---- */
.pill-toggle-container {
  overflow: hidden;
}
.pill-toggle-indicator {
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}
.pill-toggle-btn {
  cursor: pointer;
  user-select: none;
}

/* ---- Toast ---- */
.toast-enter {
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- Sparkle ---- */
@keyframes sparkle {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.5) rotate(180deg); opacity: 0.8; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}
.sparkle-anim {
  animation: sparkle 0.7s ease forwards;
}

/* ---- Confetti ---- */
@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(80px) rotate(720deg); opacity: 0; }
}
.confetti-piece {
  animation: confetti-fall 1.2s ease forwards;
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* ---- Bell Pulse ---- */
@keyframes pulse-bell {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(12deg); }
  75% { transform: rotate(-12deg); }
}
.bell-pulse {
  animation: pulse-bell 0.5s ease infinite;
}

/* ---- Skeleton ---- */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-card {
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}

/* ---- Frosted Backdrop ---- */
.frosted-backdrop {
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.7);
}

/* ---- Modal Enter ---- */
@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-enter {
  animation: modalPop 0.25s ease forwards;
}

/* ---- Auth Card Enter ---- */
@keyframes authSlide {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.auth-card-enter {
  animation: authSlide 0.5s ease forwards;
}

/* ---- Logo Float ---- */
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.logo-float {
  animation: logoFloat 3s ease-in-out infinite;
}

/* ---- Staggered Card Animation ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-stagger {
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}

/* ---- FAB Bounce ---- */
@keyframes fabBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.fab-bounce {
  animation: fabBounce 2s ease-in-out infinite;
}
.fab-bounce:hover {
  animation: none;
}

/* ---- Search Spinner ---- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.search-spinner {
  animation: spin 0.6s linear infinite;
}

/* ---- Add Friend Button Ripple ---- */
.add-friend-btn:active {
  transform: scale(0.95);
}

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

@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
  }
}

/* ---- Profile Pic Hover ---- */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

/* ---- Selection color ---- */
::selection {
  background: rgba(124, 58, 237, 0.4);
  color: white;
}