:root {
  --primary: #00f2ff;
  --primary-glow: rgba(0, 242, 255, 0.4);
  --secondary: #7000ff;
  --secondary-glow: rgba(112, 0, 255, 0.4);
  --bg-dark: #030308;
  --card-bg: rgba(20, 20, 30, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --glass: blur(20px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Ambient Background Animation */
.ambient-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
  background: 
    radial-gradient(circle at 0% 0%, rgba(112,0,255,0.15), transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(0,242,255,0.15), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(112,0,255,0.15), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(0,242,255,0.15), transparent 50%);
  animation: pulseBg 15s ease-in-out infinite alternate;
}

/* Film Grain Overlay */
.noise-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes pulseBg {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

.container {
  max-width: 1400px; margin: 0 auto; padding: 2rem;
}

/* Header */
header { text-align: center; margin-bottom: 3rem; position: relative; }
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 30%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px var(--primary-glow);
}
.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Controls Area */
.controls-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
}
.controls-wrapper {
  transition: transform 0.35s var(--ease);
}
.controls {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1rem;
  background: rgba(10,10,15,0.7);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: var(--glass);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transition: transform 0.3s var(--ease);
}
.search-bar { position: relative; width: 100%; }
.search-bar input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 12px;
  color: #fff; font-size: 1rem;
  transition: all 0.3s ease;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0,242,255,0.05);
  box-shadow: 0 0 20px var(--primary-glow);
}
.search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* Category Pills */
.category-list {
  display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 5px;
  -webkit-overflow-scrolling: touch;
}
.category-list::-webkit-scrollbar {
 width: 6px;
  height: 6px;  }
.pill {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap; user-select: none;
}
.pill:hover {
  background: rgba(255,255,255,0.1);
  color: #fff; transform: translateY(-1px);
}
.pill.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  perspective: 1000px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: all 0.4s var(--ease);
  animation: fadeUp 0.5s var(--ease) backwards;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 16px; padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  background: rgba(30,30,45,0.7);
}
.card:hover h2 { color: var(--primary); }

.card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1rem;
}
.vendor {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem; font-weight: 700;
  color: #fff; transition: color 0.3s;
}
.tag-group { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.tag {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
  background: rgba(0,242,255,0.08); color: var(--primary);
  border: 1px solid rgba(0,242,255,0.2);
  font-family: 'JetBrains Mono', monospace; text-transform: uppercase;
}
.models-list { display: flex; flex-direction: column; gap: 0.75rem; flex-grow: 1; }
.model-item {
  border-left: 2px solid rgba(255,255,255,0.1);
  padding-left: 0.75rem;
  transition: border-color 0.3s;
}
.card:hover .model-item { border-left-color: rgba(255,255,255,0.2); }
.model-name {
  font-size: 0.95rem; font-weight: 600; color: #e2e8f0; margin-bottom: 2px; display: block;
}
.model-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

.card-footer {
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.btn-visit {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.75rem;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #fff;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.btn-visit:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 4rem;
  background: rgba(255,255,255,0.02);
  border-radius: 20px; border: 1px dashed var(--card-border);
  color: var(--text-muted);
}

/* Footer */
footer {
  text-align: center; margin-top: 4rem; padding: 2rem;
  border-top: 1px solid var(--card-border);
  color: rgba(255,255,255,0.3); font-size: 0.9rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .container { padding: 1rem; }
  .controls { top: 0; border-radius: 0 0 20px 20px; border-top: none; }
  .grid { grid-template-columns: 1fr; }
}
