/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f7f7f7;
  color: #333;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input { font: inherit; }

/* ===== Layout ===== */
.page-wrapper { min-height: 100vh; }
.container {margin: 0 auto;}
.banner-container { max-width: 1400px; margin: 0 auto; padding: 0; }

/* ===== Banner Carousel ===== */
.banner-section { background: #fff; padding: 50px 0; }
.banner-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
}
@media (min-width: 768px) { .banner-wrap { min-height: 350px; } }
.banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}
@media (min-width: 768px) { .banner-wrap img { min-height: 350px; } }

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, background 0.3s;
}
.banner-wrap:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: rgba(0,0,0,0.5); }
.banner-arrow.prev { left: 12px; }
.banner-arrow.next { right: 12px; }

.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.banner-dot.active { background: #fff; width: 24px; border-radius: 5px; }

/* ===== Events Section ===== */
.events-section { padding: 40px 0; }
.events-layout { display: flex; gap: 24px; }

/* ===== Filter Panel ===== */
.filter-panel { width: 280px; flex-shrink: 0; }
.filter-search {
  position: relative;
  margin-bottom: 16px;
}
.filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
}
.filter-search input {
  width: 100%;
  padding: 10px 40px 10px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-search input:focus {
  border-color: #007EFF;
  box-shadow: 0 0 0 3px rgba(0,126,255,0.15);
}
.filter-search .clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  display: none;
}
.filter-search .clear-btn.visible { display: block; }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}
.filter-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  background: none;
}
.filter-tab:hover { color: #374151; }
.filter-tab.active { color: #007EFF; border-bottom-color: #007EFF; }

/* Filter Section */
.filter-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.filter-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9fafb;
  transition: background 0.2s;
}
.filter-section-header:hover { background: #f3f4f6; }
.filter-section-header h4 { font-size: 14px; font-weight: 600; color: #333; }
.filter-section-header svg { width: 16px; height: 16px; color: #6b7280; transition: transform 0.2s; }
.filter-section-header.open svg { transform: rotate(180deg); }
.filter-section-body { padding: 8px 16px; }
.filter-section-body li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.filter-section-body input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #007EFF;
  border-radius: 4px;
}
.filter-section-body label {
  flex: 1;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.filter-section-body .count {
  font-size: 12px;
  color: #9ca3af;
}
.year-list { max-height: 200px; overflow-y: auto; }

/* ===== Events Grid ===== */
.events-grid { flex: 1; min-width: 0; }
.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.events-header h3 { font-size: 20px; font-weight: 700; color: #333; }
.events-header .count { font-size: 14px; color: #6b7280; }

/* ===== Event Card - Upcoming ===== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.event-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s, transform 0.15s;
}
.event-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.event-card.accent-blue:hover { box-shadow: 0 4px 16px rgba(59,130,246,0.12); }
.event-card.accent-amber:hover { box-shadow: 0 4px 16px rgba(245,158,11,0.12); }
.event-card.accent-emerald:hover { box-shadow: 0 4px 16px rgba(16,185,129,0.12); }
.event-card.accent-rose:hover { box-shadow: 0 4px 16px rgba(244,63,94,0.12); }
.event-card.accent-violet:hover { box-shadow: 0 4px 16px rgba(139,92,246,0.12); }

.event-card.user-conf { background: #FFFBE6; }

.card-top-bar { height: 1px; }
.card-top-bar.blue { background: #3b82f6; }
.card-top-bar.amber { background: #f59e0b; }
.card-top-bar.emerald { background: #10b981; }
.card-top-bar.rose { background: #f43f5e; }
.card-top-bar.violet { background: #8b5cf6; }

.card-body { flex: 1; padding: 20px; display: flex; flex-direction: column; }

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.card-type-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card-type-dot.blue { background: #3b82f6; }
.card-type-dot.amber { background: #f59e0b; }
.card-type-dot.emerald { background: #10b981; }
.card-type-dot.rose { background: #f43f5e; }
.card-type-dot.violet { background: #8b5cf6; }

.card-type-label { font-size: 10px; font-weight: 600; }
.card-type-label.blue { color: #2563eb; }
.card-type-label.amber { color: #b45309; }
.card-type-label.emerald { color: #059669; }
.card-type-label.rose { color: #e11d48; }
.card-type-label.violet { color: #7c3aed; }

.card-year { font-size: 12px; color: #d1d5db; margin-left: auto; }

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.event-card:hover .card-title { color: #007EFF; }
.card-title a:hover { text-decoration: underline; }

.card-meta { margin-bottom: 12px; }
.card-meta p {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.card-meta svg { width: 14px; height: 14px; color: #9ca3af; flex-shrink: 0; }

.card-desc {
  flex: 1;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(243,244,246,0.7);
}
.card-region { font-size: 12px; color: #d1d5db; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #007EFF;
  transition: color 0.2s;
}
.card-link:hover { color: #1d4ed8; }
.card-link svg { width: 14px; height: 14px; transition: transform 0.2s; }
.card-link:hover svg { transform: translateX(2px); }

/* ===== Event Card - Past (Timeline) ===== */
.past-list { display: flex; flex-direction: column; gap: 8px; }

.past-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  transition: background 0.2s;
}
.past-card:hover { background: #f9fafb; }
.past-card.user-conf { background: #FFF9E6; }
.past-card.user-conf:hover { background: #FFF5CC; }

.past-dot-line { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.past-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.past-dot.blue { background: #3b82f6; }
.past-dot.amber { background: #f59e0b; }
.past-dot.emerald { background: #10b981; }
.past-dot.rose { background: #f43f5e; }
.past-dot.violet { background: #8b5cf6; }
.past-line { width: 1px; height: 16px; background: #e5e7eb; margin-top: 4px; }

.past-date { flex-shrink: 0; width: 80px; font-size: 12px; color: #9ca3af; }

.past-type-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f9fafb;
}
.past-type-tag.blue { color: #2563eb; }
.past-type-tag.amber { color: #b45309; background: rgba(245,158,11,0.1); }
.past-type-tag.emerald { color: #059669; }
.past-type-tag.rose { color: #e11d48; }
.past-type-tag.violet { color: #7c3aed; }

.past-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.past-card:hover .past-title { color: #007EFF; }

.past-location {
  flex-shrink: 0;
  font-size: 12px;
  color: #9ca3af;
}
@media (max-width: 639px) { .past-location { display: none; } }

.past-arrow {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #d1d5db;
  transition: all 0.2s;
}
.past-card:hover .past-arrow { color: #007EFF; transform: translateX(2px); }

/* ===== Older Year Toggle ===== */
.older-toggle {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  width: 100%;
  transition: border-color 0.2s, color 0.2s;
}
.older-toggle:hover { border-color: #007EFF; color: #007EFF; }
.older-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.older-toggle.open svg { transform: rotate(90deg); }
.older-toggle .older-count { font-size: 12px; color: #9ca3af; margin-left: 4px; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 64px 0; }
.empty-state svg { width: 64px; height: 64px; color: #d1d5db; margin: 0 auto 16px; }
.empty-state .empty-title { font-size: 18px; font-weight: 600; color: #B30B0E; margin-bottom: 8px; }
.empty-state .empty-desc { font-size: 14px; color: #6b7280; }

/* ===== Mobile Filter ===== */
.mobile-search-bar {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.mobile-search-bar .search-input-wrap {
  position: relative;
  flex: 1;
}
.mobile-search-bar .search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
}
.mobile-search-bar input {
  width: 100%;
  padding: 10px 16px 10px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.mobile-search-bar input:focus { border-color: #007EFF; box-shadow: 0 0 0 3px rgba(0,126,255,0.15); }
.mobile-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background: #fff;
  transition: background 0.2s;
}
.mobile-filter-btn:hover { background: #f9fafb; }
.mobile-filter-btn svg { width: 16px; height: 16px; }

.mobile-tabs {
  display: none;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

/* ===== Drawer ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.4);
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: #fff;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0,0,0,0.1);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.drawer-header h3 { font-weight: 600; color: #333; }
.drawer-header button svg { width: 20px; height: 20px; color: #6b7280; }
.drawer-body { padding: 16px; }

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .filter-panel { display: none; }
  .mobile-search-bar { display: flex; }
  .mobile-tabs { display: flex; }
  .banner-section { padding: 0;}
}