/* OPC.events — Luma-inspired event discovery (中文) */
:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --ink: #1a1a1e;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-soft: #f4f4f5;
  --accent: #5b5bd6;
  --accent-hover: #4b4bc4;
  --accent-soft: #eef0ff;
  --opc: #0d9488;
  --opc-soft: #ccfbf1;
  --aigc: #7c3aed;
  --aigc-soft: #ede9fe;
  --both: #db2777;
  --both-soft: #fce7f3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
  --shadow-md: 0 2px 8px rgb(0 0 0 / 0.06), 0 12px 32px rgb(0 0 0 / 0.06);
  --nav-h: 60px;
  --max: 1080px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Header (Luma-like) —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #5b5bd6, #7c3aed 55%, #0d9488);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.brand span {
  font-size: 1.05rem;
}

.brand em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 0.9rem 0 2.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--line-soft);
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.nav-search input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(91 91 214 / 0.15);
}

.nav-search .icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  background: transparent;
  color: var(--ink);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--line-soft);
}

.btn-outline {
  border-color: var(--line);
  background: var(--surface);
}

.btn-outline:hover {
  border-color: #d4d4d8;
  background: var(--line-soft);
}

.btn-lg {
  height: 44px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

/* —— Hero —— */
.page-hero {
  padding: 2rem 0 0.5rem;
}

.page-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.04em;
  font-weight: 750;
  line-height: 1.15;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 40rem;
}

/* —— Filters bar —— */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 1.15rem 0 1rem;
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  background: linear-gradient(var(--bg) 70%, transparent);
  padding-bottom: 1.1rem;
}

.filter-chip,
.filter-select {
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--ink-2);
  cursor: pointer;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.85rem;
  font-weight: 500;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.filter-chip.active {
  font-weight: 600;
}

.filter-select {
  padding: 0 2rem 0 0.85rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  font-weight: 500;
  max-width: 180px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(91 91 214 / 0.12);
}

.filter-meta {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
}

/* —— Event list (Luma list style) —— */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 3rem;
}

.event-card {
  display: grid;
  grid-template-columns: 64px 1fr 168px;
  gap: 1rem;
  align-items: stretch;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}

.event-card:hover {
  border-color: #d4d4d8;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  background: var(--line-soft);
  text-align: center;
  min-height: 72px;
}

.event-date .month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.event-date .day {
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.event-date .weekday {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.event-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.15rem 0;
}

.event-body h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-2);
}

.tag-opc {
  background: var(--opc-soft);
  color: #0f766e;
}

.tag-aigc {
  background: var(--aigc-soft);
  color: #6d28d9;
}

.tag-both {
  background: var(--both-soft);
  color: #be185d;
}

.event-cover {
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e7ff, #fce7f3);
  aspect-ratio: 16 / 10;
  align-self: center;
}

.event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty h3 {
  margin: 0 0 0.4rem;
  color: var(--ink);
}

/* —— Detail —— */
.detail-wrap {
  padding: 1.5rem 0 3.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.detail-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-hero-img {
  aspect-ratio: 2 / 1;
  background: linear-gradient(135deg, #5b5bd6, #7c3aed 50%, #0d9488);
}

.detail-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content {
  padding: 1.35rem 1.5rem 1.75rem;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.detail-content h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.detail-content .lead {
  color: var(--ink-2);
  font-size: 0.98rem;
  margin: 0 0 1.25rem;
  line-height: 1.7;
}

.detail-section h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.detail-section p,
.detail-section li {
  color: var(--ink-2);
  font-size: 0.92rem;
}

.detail-side {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.side-card .when {
  font-size: 0.95rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.side-card .where {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.side-facts {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.side-facts li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.88rem;
}

.side-facts span {
  color: var(--muted);
}

.side-facts strong {
  font-weight: 600;
  text-align: right;
}

.going-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.avatars {
  display: flex;
}

.avatars i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -6px;
  background: linear-gradient(135deg, #a5b4fc, #c4b5fd);
}

.avatars i:first-child {
  margin-left: 0;
}

.avatars i:nth-child(2) {
  background: linear-gradient(135deg, #5eead4, #99f6e4);
}

.avatars i:nth-child(3) {
  background: linear-gradient(135deg, #f9a8d4, #fbcfe8);
}

.side-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.75rem 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.footer-inner a {
  color: var(--accent);
  font-weight: 500;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* —— Location modal-ish panel —— */
.loc-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, 90vw);
  max-height: 360px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  padding: 0.4rem;
}

.loc-wrap {
  position: relative;
}

.loc-panel.open {
  display: block;
}

.loc-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.5rem 0.65rem 0.25rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.loc-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}

.loc-item:hover,
.loc-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* —— Mobile —— */
@media (max-width: 800px) {
  .event-card {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
  }

  .event-cover {
    grid-column: 1 / -1;
    grid-row: 2;
    aspect-ratio: 2 / 1;
    max-height: 160px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .nav-search {
    display: none;
  }

  .filter-meta {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .brand em {
    display: none;
  }

  .page-hero {
    padding-top: 1.25rem;
  }
}
