:root {
  --glass-blur: 18px;
  --glass-radius: 1.25rem;
  --bg-page-light: #edf2fa;
  --bg-page-dark: #060a14;
  --accent-1: #3b82f6;
  --accent-2: #06b6d4;
  --accent-3: #6366f1;
}

html {
  scroll-behavior: smooth;
}

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body,
.site-body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.site-body {
  position: relative;
  color: #1e293b;
  background-color: var(--bg-page-light);
  min-height: 100vh;
}

.dark .site-body {
  color: #e2e8f0;
  background-color: var(--bg-page-dark);
}

.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(42rem 42rem at 12% -8%, rgba(59, 130, 246, 0.20), transparent 60%),
    radial-gradient(38rem 38rem at 92% 4%, rgba(6, 182, 212, 0.16), transparent 58%),
    radial-gradient(46rem 46rem at 78% 96%, rgba(99, 102, 241, 0.14), transparent 60%),
    linear-gradient(160deg, #eef3fb 0%, #e6eef9 45%, #edf2fa 100%);
}

.dark .site-body::before {
  background:
    radial-gradient(44rem 44rem at 10% -10%, rgba(59, 130, 246, 0.34), transparent 60%),
    radial-gradient(40rem 40rem at 94% 2%, rgba(6, 182, 212, 0.20), transparent 58%),
    radial-gradient(48rem 48rem at 82% 98%, rgba(99, 102, 241, 0.24), transparent 60%),
    linear-gradient(160deg, #060a14 0%, #0a1120 48%, #070d18 100%);
}

.site-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}

.dark .site-body::after {
  background-image: radial-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  opacity: 0.6;
}

.glass {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.10);
}

.dark .glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);
}

.glass-card {
  position: relative;
  border-radius: var(--glass-radius);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dark .glass-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.40);
}

.glass-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
}

.dark .glass-card-hover:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 20px 46px rgba(30, 58, 138, 0.5);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.dark .glass-nav {
  background: rgba(6, 11, 22, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
}

.dark .glass-panel {
  background: rgba(11, 17, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-input {
  background-color: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  color: #0f172a !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.glass-input::placeholder {
  color: rgba(71, 85, 105, 0.7) !important;
}

.dark .glass-input {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #e2e8f0 !important;
}

.dark .glass-input::placeholder {
  color: rgba(148, 163, 184, 0.75) !important;
}

.glass-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.glass-input option {
  background-color: #ffffff;
  color: #0f172a;
}

.dark .glass-input option {
  background-color: #0f1a2e;
  color: #e2e8f0;
}

select.glass-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.39a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.15rem;
  padding-right: 2.5rem;
}

.btn-gradient {
  background-image: linear-gradient(135deg, var(--accent-1), #2563eb 52%, var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.45);
}

.text-gradient {
  background-image: linear-gradient(120deg, #3b82f6, #06b6d4 55%, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  white-space: nowrap;
  color: #475569;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dark .filter-tab {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.filter-tab:hover {
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.5);
}

.dark .filter-tab:hover {
  color: #ffffff;
}

.filter-tab.active {
  background-image: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-buy {
  background-image: linear-gradient(135deg, #10b981, #059669 60%, #047857);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-buy:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.42);
}

.product-media {
  position: relative;
}

.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 20, 0.35), transparent 42%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.group:hover .product-media::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .btn-buy {
    transition: none;
  }
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.bento-feature {
  grid-column: span 1 / span 1;
}

@media (min-width: 640px) {
  .bento-feature {
    grid-column: span 2 / span 2;
  }
}

@media (min-width: 1024px) {
  .bento-feature {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
  }
}

@media (min-width: 1024px) {
  .bento-tall {
    grid-row: span 2 / span 2;
  }
  .bento-wide {
    grid-column: span 2 / span 2;
  }
}

.glass-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: inline-block;
}

.dark .theme-toggle .icon-sun {
  display: inline-block;
}

.dark .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .glass-card,
  .btn-gradient {
    transition: none;
  }
}
