/* ==========================================================================
   EDURADAR CATALOG — HIGH-CONVERTING EDTECH STYLES
   ========================================================================== */

:root {
  --primary-blue: #3b82f6;
  --primary-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --bg-dark: #070b14;
  --bg-card: #0f172a;
}

/* Background Gradients & Mesh */
body {
  background-color: var(--bg-dark);
  color: #f1f5f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

.mesh-bg {
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(244, 63, 94, 0.08) 0px, transparent 50%);
}

.grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Glass Panels */
.glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.2s ease, 
              box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 
              0 0 20px -5px rgba(99, 102, 241, 0.2);
}

.glass-nav {
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #070b14;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Category Filter Chips */
.cat-chip {
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}
.cat-chip.active {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

/* Pulsing Discount Badge */
@keyframes pulseSubtle {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px rgba(244, 63, 94, 0);
  }
}
.badge-discount-hot {
  animation: pulseSubtle 2.5s infinite ease-in-out;
}

/* Image Fallback Container */
.course-img-wrapper {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.course-img-wrapper img {
  transition: transform 0.3s ease;
}
.glass-card:hover .course-img-wrapper img {
  transform: scale(1.04);
}

/* Custom Touch Range Sliders */
input[type=range] {
  -webkit-appearance: none;
  background: #1e293b;
  border-radius: 8px;
  height: 6px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  border: 2px solid #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover,
input[type=range]::-webkit-slider-thumb:active {
  transform: scale(1.15);
  background: #0ea5e9;
}

/* Toast Notification */
#appToast {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
#appToast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Ticker Animation */
@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerSlide 35s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}

/* Mobile & Touch Optimizations */
@media (max-width: 768px) {
  body {
    padding-bottom: 74px; /* Space for sticky bottom tab bar */
  }
  .mobile-touch-target {
    min-height: 44px;
    min-width: 44px;
  }
}

.safe-area-bottom {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
