/* SearchToday — Architectural Design System & Motion Craft */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Warm Architectural Canvas Palette */
  --bg-canvas: #f7f5f0;
  --bg-canvas-subtle: #f0ece1;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.84);
  --bg-card-hover: rgba(255, 255, 255, 0.96);
  
  /* Ink & Typography */
  --text-primary: #18181b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Frosted Glass Borders & Sheen */
  --border-glass: rgba(255, 255, 255, 0.95);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(0, 0, 0, 0.18);
  --glass-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 20px 25px -5px rgba(0, 0, 0, 0.02);
  --glass-shadow-hover: 0 18px 38px -5px rgba(0, 0, 0, 0.09), 0 25px 30px -5px rgba(0, 0, 0, 0.04);
  
  /* Indian Financial Vibrant Accents */
  --accent-saffron: #ea580c;
  --accent-saffron-light: #ffedd5;
  --accent-emerald: #059669;
  --accent-emerald-light: #d1fae5;
  --accent-cobalt: #2563eb;
  --accent-cobalt-light: #dbeafe;
  --accent-violet: #7c3aed;
  --accent-violet-light: #ede9fe;
  --accent-rose: #e11d48;
  --accent-rose-light: #ffe4e6;
  --accent-amber: #d97706;
  --accent-amber-light: #fef3c7;

  /* Spring Physics & Motion (Emil Kowalski style) */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-tactile: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Canvas Background with Subtle Tactile Grid Pattern */
body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-image: radial-gradient(rgba(0, 0, 0, 0.055) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, .font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-sans-ui {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* Minimal Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* Accessible Focus Ring */
:focus-visible {
  outline: 2px solid var(--accent-saffron);
  outline-offset: 2px;
}

/* Pearlescent Frosted Glass Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), border-color 0.25s ease;
}

.glass-panel-hover:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 1);
}

.glass-panel-interactive {
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}
.glass-panel-interactive:active {
  transform: scale(0.985);
}

/* Floating Pill Navigation Bar */
.floating-pill-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  padding: 6px 14px;
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  transition: all 0.3s var(--ease-spring);
}

/* Tactile Pill Buttons (Emil Kowalski Style) */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  transition: transform 0.16s var(--ease-spring), background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-pill:active {
  transform: scale(0.96);
}

.btn-pill-primary {
  background-color: var(--accent-saffron);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-pill-primary:hover {
  background-color: #c2410c;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.btn-pill-secondary {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.07);
}
.btn-pill-secondary:hover {
  background-color: rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.14);
}

.btn-pill-emerald {
  background-color: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}
.btn-pill-emerald:hover {
  background-color: #047857;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.38);
}

/* Playback Control HUD */
.playback-hud {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 40px;
  padding: 4px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.playback-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s var(--ease-spring);
}
.playback-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.08);
}
.playback-btn:active {
  transform: scale(0.92);
}
.playback-btn-active {
  background: var(--text-primary) !important;
  color: #ffffff !important;
}

/* Tactile Range Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s ease;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-saffron);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16), 0 0 0 3px rgba(234, 88, 12, 0.15);
  cursor: grab;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 0 0 5px rgba(234, 88, 12, 0.25);
}

/* Editorial Metric Badge */
.metric-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Accordion Component */
.accordion-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s ease;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 8px;
  cursor: pointer;
  user-select: none;
}
.accordion-icon {
  transition: transform 0.3s var(--ease-spring);
  font-size: 1.25rem;
  color: var(--text-muted);
}
.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent-saffron);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}
.accordion-item.active .accordion-body {
  max-height: 500px;
  padding-bottom: 18px;
}

/* Live Pulse Ring */
.live-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}
.live-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent-emerald);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Responsive Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  animation: slide-down 0.24s var(--ease-spring) forwards;
}
.mobile-nav-drawer.open {
  display: block;
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* GATE CSE Specialized Interactive Elements */
.bit-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s var(--ease-spring);
}
.bit-segment:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.pipeline-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: -0.02em;
}

.pipeline-if { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.pipeline-id { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pipeline-ex { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.pipeline-mem { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.pipeline-wb { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.pipeline-stall { background: #f1f5f9; color: #94a3b8; border: 1px dashed #cbd5e1; }

.trap-card {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 16px;
}

.formula-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(19, 42, 30, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 14px -2px rgba(19, 42, 30, 0.04);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, border-color 0.2s ease;
}

.formula-card:hover {
  border-color: rgba(19, 42, 30, 0.22);
  box-shadow: 0 8px 24px -4px rgba(19, 42, 30, 0.08);
}

.copy-formula-btn {
  user-select: none;
  transition: transform 0.15s var(--ease-spring), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-formula-btn:active {
  transform: scale(0.92);
}

/* Concept Reader Modal & Mobile Drawer Physics */
.concept-modal-backdrop {
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: opacity 0.3s var(--ease-spring);
}

.modal-drawer-spring {
  will-change: transform, opacity;
  animation: modal-enter-desktop 0.36s var(--ease-spring) forwards;
}

@media (max-width: 639px) {
  .modal-drawer-spring {
    animation: modal-drawer-mobile 0.38s var(--ease-spring) forwards;
  }
}

@keyframes modal-enter-desktop {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(14px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modal-drawer-mobile {
  0% {
    opacity: 0.6;
    transform: translateY(100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Touch Scrolling with physics momentum */
.touch-scroll-container {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

/* Toast Floating Notification */
.toast-bounce {
  animation: toast-in 0.35s var(--ease-spring) forwards;
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.code-terminal {
  background: #18181b;
  color: #f4f4f5;
  border-radius: 16px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}


