:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --glass: rgba(30, 41, 59, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
}

.header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 4rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  color: var(--text-muted);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: -2rem auto 4rem;
  padding: 0 1.5rem;
}

/* Search Section */
.search-container {
  position: sticky;
  top: 2rem;
  z-index: 100;
  margin-bottom: 3rem;
}

.ais-SearchBox-form {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.ais-SearchBox-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.ais-SearchBox-input {
  background: transparent;
  border: none;
  color: white;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  width: 100%;
  outline: none;
}

.ais-SearchBox-submit,
.ais-SearchBox-reset {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 1rem;
  fill: var(--text-muted);
}

/* Hits Grid */
.ais-Hits-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  list-style: none;
}

.event-card {
  background: var(--card-bg);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  border-color: rgba(99, 102, 241, 0.3);
}

.event-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.event-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-meta {
  margin-bottom: 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-more {
  margin-top: auto;
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  text-align: center;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-more:hover {
  background: var(--primary-dark);
}

/* Empty State */
.ais-Hits--empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

/* Pagination */
.ais-Pagination-list {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
  list-style: none;
}

.ais-Pagination-item {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.2s;
}

.ais-Pagination-item--selected {
  background: var(--primary);
  font-weight: bold;
}

.ais-Pagination-link {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 640px) {
  .header h1 {
    font-size: 2rem;
  }

  .container {
    margin-top: 0;
  }
}