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

:root {
  --magenta: #E00065;
  --purple: #3c1147;
  --purple-light: #f3eef6;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --bg: #f7f4fa;
  --card-bg: #ffffff;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(60, 17, 71, 0.08);
  --shadow-hover: 0 6px 24px rgba(60, 17, 71, 0.16);
}

html, body {
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

#app {
  padding: 32px 16px 48px;
  max-width: 700px;
  margin: 0 auto;
}

/* ── State messages ──────────────────────────────── */
.state-message {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.state-message.error {
  color: var(--magenta);
}

/* ── Loading spinner ─────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e0d6e8;
  border-top-color: var(--magenta);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Events list ─────────────────────────────────── */
#events-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Event card ──────────────────────────────────── */
.event-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--magenta);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.promo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
}

.event-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.event-card-inner {
  padding: 20px 24px;
}

/* ── Group badge ─────────────────────────────────── */
.event-group-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  background: var(--purple);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.promo-card-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 8px;
  line-height: 1.35;
}

.promo-card-copy {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}

.promo-card:hover .promo-card-title {
  color: var(--magenta);
}

/* ── Event title ─────────────────────────────────── */
.event-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  margin-bottom: 10px;
  line-height: 1.35;
  word-break: break-word;
}

.event-title:hover {
  color: var(--magenta);
}

/* ── Date ────────────────────────────────────────── */
.event-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--magenta);
}

.event-date::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: var(--magenta);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5C3.9 4 3 4.9 3 6v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM5 7V6h14v1H5z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5C3.9 4 3 4.9 3 6v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM5 7V6h14v1H5z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
}

/* ── Attending ───────────────────────────────────── */
.event-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 480px) {
  #app {
    padding: 20px 12px 40px;
  }
  .event-card-inner {
    padding: 16px 18px;
  }
  .event-title {
    font-size: 15px;
  }
}
