/* Critical layout -- works even if the pinned Tailwind runtime is slow to load */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; transition: background-color 0.3s ease, color 0.3s ease; }
img, video, svg { max-width: 100%; height: auto; }

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Responsive card grid: stacks at 400px, fills as the panel widens */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

/* Table wrapper for horizontal scroll when needed */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Custom transitions and glassmorphism styles */
.glass-nav {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.dark .glass-nav {
  background-color: rgba(15, 23, 42, 0.85);
}

.glass-card {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dark .glass-card {
  background-color: rgba(30, 41, 59, 0.7);
}

/* Custom active class for navigation */
.nav-active {
  color: #f59e0b !important; /* Amber-500 */
  border-bottom-color: #f59e0b !important;
}

/* Scale animations */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-scale:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}
.dark .hover-scale:hover {
  box-shadow: 0 12px 24px -10px rgba(245, 158, 11, 0.1);
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Price Card Gradient Border */
.premium-border {
  position: relative;
  border-radius: 1rem;
  background: linear-gradient(to right, #f59e0b, #d97706);
  padding: 1px;
}
.premium-bg {
  border-radius: 0.95rem;
}
