/**
 * Shared custom CSS for "BuyLens" static frontend.
 * Tailwind (via CDN) handles utility classes; this file holds everything
 * Tailwind can't express directly: glassmorphism, animations, gradients,
 * and the light/dark theme-transition wipe.
 *
 * Light mode here is a deliberate refinement over a literal 1:1 inversion
 * of the dark mode file the Stitch export shipped with -- dark-tuned
 * translucent panels tend to look washed out and shadow-less on a light
 * background if you just flip the opacity. Light mode uses slightly more
 * opaque surfaces, a crisper 1px border, and soft multi-layer "ambient"
 * shadows (per DESIGN.md's elevation guidance) so cards read as physically
 * separated from the page rather than flat rectangles.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.fill-icon {
  font-variation-settings: 'FILL' 1;
}

/* ------------------------------------------------------------------ */
/* Glass panels                                                        */
/* ------------------------------------------------------------------ */

.glass-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(122, 117, 130, 0.14);
  box-shadow:
    0 1px 2px rgba(31, 25, 45, 0.03),
    0 8px 24px -8px rgba(31, 25, 45, 0.06),
    0 24px 48px -24px rgba(31, 25, 45, 0.05);
}

.dark .glass-panel {
  background: rgba(29, 27, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 24px -8px rgba(0, 0, 0, 0.35);
}

.rim-light {
  box-shadow: inset 0 0 0 1px rgba(103, 80, 164, 0.08), 0 8px 32px -8px rgba(31, 25, 45, 0.12);
}
.dark .rim-light {
  box-shadow: inset 0 0 0 1px rgba(207, 188, 255, 0.1), 0 8px 32px -8px rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------------------------------ */
/* Backgrounds                                                         */
/* ------------------------------------------------------------------ */

.hero-gradient {
  background: radial-gradient(circle at top right, rgba(79, 55, 138, 0.06), transparent),
              radial-gradient(circle at bottom left, rgba(103, 80, 164, 0.04), transparent);
}
.dark .hero-gradient {
  background: radial-gradient(circle at top right, rgba(79, 55, 138, 0.15), transparent),
              radial-gradient(circle at bottom left, rgba(103, 80, 164, 0.1), transparent);
}

/* ------------------------------------------------------------------ */
/* Verdict gradients -- BUY / WAIT / SKIP                               */
/* ------------------------------------------------------------------ */

.buy-gradient {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.3);
}
.wait-gradient {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}
.skip-gradient {
  background: linear-gradient(135deg, #f87171 0%, #ba1a1a 100%);
  box-shadow: 0 0 30px rgba(248, 113, 113, 0.3);
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: rotate(45deg);
  animation: shimmerMove 8s infinite linear;
}
.dark .shimmer::after {
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
}
@keyframes shimmerMove {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.shimmer-text {
  background: linear-gradient(90deg, rgba(103, 80, 164, 0.2), rgba(103, 80, 164, 1), rgba(103, 80, 164, 0.2));
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dark .shimmer-text {
  background: linear-gradient(90deg, rgba(207, 188, 255, 0.2), rgba(207, 188, 255, 1), rgba(207, 188, 255, 0.2));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.pulse-glow {
  animation: pulse-glow 2s infinite ease-in-out;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.pipeline-line {
  background: linear-gradient(to bottom, #4f378a 0%, #cfbcff 50%, transparent 100%);
}

.progress-bar-fill {
  width: 0%;
  animation: progress-load 12s infinite ease-in-out;
}
@keyframes progress-load {
  0% { width: 0%; }
  15% { width: 12%; }
  30% { width: 28%; }
  50% { width: 45%; }
  70% { width: 72%; }
  90% { width: 95%; }
  100% { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* Tabs                                                                 */
/* ------------------------------------------------------------------ */

.active-tab-indicator {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
}

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

/* ------------------------------------------------------------------ */
/* Theme transition wipe                                                */
/* ------------------------------------------------------------------ */

#theme-wipe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  background: #4f378a;
  transform: translateX(-100%);
}
.wipe-active {
  animation: themeWipeAnim 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes themeWipeAnim {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ------------------------------------------------------------------ */
/* Inputs -- minimalist, border+glow on focus, no fill                 */
/* ------------------------------------------------------------------ */

.input-minimal {
  background: transparent;
  border: 1px solid rgba(122, 117, 130, 0.3);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-minimal:focus {
  outline: none;
  border-color: #4f378a;
  box-shadow: 0 0 0 4px rgba(79, 55, 138, 0.12);
}
.dark .input-minimal {
  border-color: rgba(203, 196, 210, 0.2);
}
.dark .input-minimal:focus {
  border-color: #cfbcff;
  box-shadow: 0 0 0 4px rgba(207, 188, 255, 0.12);
}

/* ------------------------------------------------------------------ */
/* Chips                                                                */
/* ------------------------------------------------------------------ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(79, 55, 138, 0.08);
  color: #4f378a;
  border: 1px solid rgba(79, 55, 138, 0.15);
  cursor: pointer;
  transition: all 150ms ease;
}
.chip:hover {
  background: rgba(79, 55, 138, 0.14);
}
.chip.selected {
  background: #4f378a;
  color: #ffffff;
  border-color: #4f378a;
}
.dark .chip {
  background: rgba(207, 188, 255, 0.08);
  color: #cfbcff;
  border-color: rgba(207, 188, 255, 0.15);
}
.dark .chip:hover {
  background: rgba(207, 188, 255, 0.14);
}
.dark .chip.selected {
  background: #cfbcff;
  color: #22005d;
  border-color: #cfbcff;
}
