/* ===== RESET & BASE — HALLOWEEN SPOOKY STYLE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 🎃 Halloween Palette */
  --bg: #0f0a1a;
  --bg-soft: #160e24;
  --bg-muted: #1f1430;
  --card: #1a1228;
  --card-hover: #231735;

  --ink: #f0e6d2;
  --ink-soft: #d4c5a9;
  --ink-muted: #9b8ba8;
  --ink-faint: #6b5b78;

  --pumpkin: #ff7518;
  --pumpkin-soft: #3a1e0a;
  --pumpkin-hover: #ff9a4d;

  --witch: #9d4edd;
  --witch-soft: #2a1440;
  --witch-hover: #b96ef5;

  --poison: #39ff14;

  --border: #3d2a5c;
  --border-strong: #523a7a;

  --success: #4ade80;
  --danger: #e63946;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow: 0 4px 12px rgba(0,0,0,0.6);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.7);

  --glow-pumpkin: 0 0 20px rgba(255, 117, 24, 0.4);
  --glow-witch: 0 0 20px rgba(157, 78, 221, 0.4);

  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(157, 78, 221, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(255, 117, 24, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(57, 255, 20, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 26, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 2px solid var(--border);
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.logo {
  font-size: 20px;
  background: linear-gradient(135deg, var(--pumpkin) 0%, var(--witch) 100%);
  color: #fff;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  transition: all var(--transition);
  box-shadow: var(--glow-pumpkin);
  animation: pumpkinPulse 3s ease-in-out infinite;
}

@keyframes pumpkinPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 117, 24, 0.3); }
  50% { box-shadow: 0 0 24px rgba(255, 117, 24, 0.6); }
}

.logo:hover { transform: scale(1.1) rotate(-8deg); }

.brand h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--ink);
  font-family: 'Creepster', 'Nunito', cursive;
  letter-spacing: 0.02em;
}

.brand h1 span {
  background: linear-gradient(90deg, var(--pumpkin) 0%, var(--witch) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 2px;
}

.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
  background: var(--card);
  color: var(--ink);
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--card-hover);
  border-color: var(--pumpkin);
  transform: translateY(-1px);
  box-shadow: var(--shadow), var(--glow-pumpkin);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--pumpkin) 0%, #c94510 100%);
  color: #fff;
  border-color: var(--pumpkin);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--pumpkin-hover) 0%, var(--pumpkin) 100%);
  box-shadow: var(--shadow-md), var(--glow-pumpkin);
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--witch-soft);
  border-color: var(--witch);
  color: var(--witch-hover);
  box-shadow: var(--shadow), var(--glow-witch);
}

.btn.active {
  background: var(--pumpkin-soft);
  color: var(--pumpkin-hover);
  border-color: var(--pumpkin);
}

.btn-discord {
  background: linear-gradient(135deg, var(--witch) 0%, #6a1b9a 100%);
  color: #fff;
  border-color: var(--witch);
}

.btn-discord:hover {
  background: linear-gradient(135deg, var(--witch-hover) 0%, var(--witch) 100%);
  box-shadow: var(--shadow-md), var(--glow-witch);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #9d1d2a 100%) !important;
  color: #fff !important;
  border-color: var(--danger) !important;
}

.btn-danger:hover {
  box-shadow: var(--shadow-md), 0 0 20px rgba(230, 57, 70, 0.5);
}

/* ===== HERO ===== */
.hero {
  padding: 64px 0 40px;
  border-bottom: 2px dashed var(--border);
  position: relative;
}

.hero::after {
  content: "🦇";
  position: absolute;
  right: 40px;
  top: 50px;
  font-size: 36px;
  opacity: 0.6;
  animation: batFloat 5s ease-in-out infinite;
}

@keyframes batFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--card);
  padding: 24px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  text-align: left;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--pumpkin) 0%, var(--witch) 100%);
}

.stat::after {
  content: "🎃";
  position: absolute;
  bottom: 8px; right: 12px;
  font-size: 20px;
  opacity: 0.15;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--glow-pumpkin);
  border-color: var(--pumpkin);
}

.stat-num {
  display: block;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--pumpkin) 0%, var(--witch) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* ===== FILTERS ===== */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 32px 24px;
}

.filters input,
.filters select {
  background: var(--card);
  border: 2px solid var(--border-strong);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.filters input { flex: 1; min-width: 220px; }

.filters input::placeholder { color: var(--ink-faint); }

.filters input:focus,
.filters select:focus {
  border-color: var(--pumpkin);
  box-shadow: 0 0 0 3px rgba(255, 117, 24, 0.2), var(--glow-pumpkin);
  background: var(--card-hover);
}

.filters select {
  cursor: pointer;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff7518' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ===== GRID ===== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding-bottom: 80px;
}

.event-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.event-card:hover {
  border-color: var(--pumpkin);
  box-shadow: var(--shadow-md), var(--glow-pumpkin);
  transform: translateY(-4px);
}

.event-card.is-today {
  border-color: var(--pumpkin);
  background: linear-gradient(180deg, var(--pumpkin-soft) 0%, var(--card) 40%);
  animation: todayGlow 2.5s ease-in-out infinite;
}

@keyframes todayGlow {
  0%, 100% { box-shadow: var(--shadow-sm), 0 0 12px rgba(255, 117, 24, 0.3); }
  50% { box-shadow: var(--shadow-md), 0 0 24px rgba(255, 117, 24, 0.6); }
}

.event-card.is-today::before {
  content: "🎃 HARI INI 🎃";
  position: absolute;
  top: 12px; right: 12px;
  background: linear-gradient(135deg, var(--pumpkin) 0%, #c94510 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 2;
  border: 1px solid var(--pumpkin-hover);
  box-shadow: var(--glow-pumpkin);
}

.event-thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--witch-soft) 0%, var(--pumpkin-soft) 100%);
  display: grid;
  place-items: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--border);
}

.event-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.event-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.event-card:hover .event-thumb img { transform: scale(1.06); }

.event-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--witch-soft);
  color: var(--witch-hover);
  width: fit-content;
  border: 1px solid var(--witch);
}

.event-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.event-desc {
  font-size: 13px;
  color: var(--ink-muted);
  flex: 1;
  line-height: 1.6;
  font-weight: 500;
}

.event-date {
  font-size: 12.5px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-weight: 500;
}

.event-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.event-actions a,
.event-actions button {
  flex: 1;
  text-align: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  border: 2px solid var(--border-strong);
  line-height: 1.4;
}

.event-actions a {
  background: linear-gradient(135deg, var(--pumpkin) 0%, #c94510 100%);
  color: #fff;
  border-color: var(--pumpkin);
}

.event-actions a:hover {
  background: linear-gradient(135deg, var(--pumpkin-hover) 0%, var(--pumpkin) 100%);
  transform: translateY(-1px);
  box-shadow: var(--glow-pumpkin);
}

.event-actions button {
  background: var(--card);
  color: var(--ink);
}

.event-actions button:hover {
  background: var(--witch-soft);
  border-color: var(--witch);
  color: var(--witch-hover);
  box-shadow: var(--glow-witch);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-muted);
  font-size: 14.5px;
  font-weight: 500;
}

.empty-state::before {
  content: "👻";
  display: block;
  font-size: 52px;
  margin-bottom: 16px;
  opacity: 0.6;
  animation: ghostFloat 3s ease-in-out infinite;
}

@keyframes ghostFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hidden { display: none !important; }

/* ===== FOOTER ===== */
.footer {
  border-top: 2px dashed var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  background: var(--bg-soft);
  font-weight: 500;
}

.footer strong { color: var(--pumpkin); font-weight: 800; }
.footer .small { font-size: 12px; margin-top: 6px; color: var(--ink-faint); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: linear-gradient(135deg, var(--pumpkin) 0%, var(--witch) 100%);
  border: 2px solid var(--pumpkin-hover);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md), var(--glow-pumpkin);
  font-weight: 700;
  font-size: 13px;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--pumpkin) 0%, var(--witch) 100%);
  border-radius: 8px;
  border: 3px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--pumpkin-hover) 0%, var(--witch-hover) 100%);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.event-card {
  animation: fadeInUp 0.5s ease backwards;
}

.event-card:nth-child(1) { animation-delay: 0.03s; }
.event-card:nth-child(2) { animation-delay: 0.06s; }
.event-card:nth-child(3) { animation-delay: 0.09s; }
.event-card:nth-child(4) { animation-delay: 0.12s; }
.event-card:nth-child(5) { animation-delay: 0.15s; }
.event-card:nth-child(6) { animation-delay: 0.18s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  .header { padding: 10px 0; }
  .header-inner { gap: 10px; }
  .brand { gap: 10px; }
  .brand h1 { font-size: 16px; }
  .logo { width: 36px; height: 36px; font-size: 17px; }
  .tagline { font-size: 11px; }

  /* header actions lama tidak dipakai lagi, tapi kalau ada sisa */
  .header-actions { display: none; }

  .menu-toggle { width: 40px; height: 40px; }
  .menu-toggle svg { width: 20px; height: 20px; }

  .header-dropdown {
    width: calc(100vw - 32px);
    max-width: 320px;
    right: -8px;
  }

  /* hero, filters, grid, footer, toast tetap seperti sebelumnya */
  .hero { padding: 40px 0 28px; }
  .hero::after { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 18px 14px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 11.5px; }

  .filters { padding: 20px 16px; flex-direction: column; }
  .filters input, .filters select { width: 100%; }

  .event-grid { grid-template-columns: 1fr; gap: 16px; padding-bottom: 48px; }
  .event-thumb { height: 160px; font-size: 44px; }
  .event-title { font-size: 15px; }
  .event-actions { flex-direction: column; }
  .event-actions a, .event-actions button { width: 100%; }

  .footer { padding: 32px 0; font-size: 12.5px; }

  .toast {
    bottom: 16px;
    padding: 10px 16px;
    font-size: 12.5px;
    max-width: calc(100vw - 32px);
  }
}

@media (max-width: 380px) {
  .hero-stats { grid-template-columns: 1fr; }
  .stat-num { font-size: 24px; }
  .event-thumb { height: 140px; font-size: 40px; }
  .header-dropdown { width: calc(100vw - 24px); right: -4px; }
}


/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 26, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 2px solid var(--border);
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.logo {
  font-size: 20px;
  background: linear-gradient(135deg, var(--pumpkin) 0%, var(--witch) 100%);
  color: #fff;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  transition: all var(--transition);
  box-shadow: var(--glow-pumpkin);
  animation: pumpkinPulse 3s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pumpkinPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 117, 24, 0.3); }
  50% { box-shadow: 0 0 24px rgba(255, 117, 24, 0.6); }
}

.logo:hover { transform: scale(1.1) rotate(-8deg); }

.brand h1 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  font-family: 'Creepster', 'Nunito', cursive;
  letter-spacing: 0.02em;
}

.brand h1 span {
  background: linear-gradient(90deg, var(--pumpkin) 0%, var(--witch) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ===== HEADER MENU (DROPDOWN) ===== */
.header-menu {
  position: relative;
  flex-shrink: 0;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
  background: var(--card-hover);
  border-color: var(--pumpkin);
  color: var(--pumpkin-hover);
  box-shadow: var(--shadow), var(--glow-pumpkin);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
  transition: transform var(--transition);
}

.menu-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

/* Dropdown panel */
.header-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: var(--card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), var(--glow-pumpkin);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}

.header-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Ganti ::before lama — panah lebih kecil & posisi aman */
.header-dropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: var(--card);
  border-left: 2px solid var(--border-strong);
  border-top: 2px solid var(--border-strong);
  transform: rotate(45deg);
  border-top-left-radius: 2px;
  z-index: -1; /* biar tidak nutupin item pertama */
}

/* Section label — pemisah visual antar grup */
.dropdown-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 8px 12px 4px;
  margin-top: 2px;
}

.dropdown-label:first-child { margin-top: 0; padding-top: 6px; }

/* Divider lebih tipis & rapi */
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
  border: none;
  opacity: 0.6;
}

/* Scroll shadow di mobile — indikator ada konten di bawah */
@media (max-width: 768px) {
  .header-dropdown {
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* shadow bawah kalau masih bisa scroll */
    background-image: linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(100% - 24px),
      rgba(15, 10, 26, 0.9) 100%
    );
    background-attachment: local, scroll;
  }
}

/* Item lebih lega & teks tidak terpotong */
.dropdown-item {
  min-height: 48px;
}

.dropdown-item .di-text {
  min-width: 0;
}

.dropdown-item .di-title,
.dropdown-item .di-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--transition);
  line-height: 1.4;
  width: 100%;
}

.dropdown-item:hover {
  background: var(--pumpkin-soft);
  color: var(--pumpkin-hover);
}

.dropdown-item .di-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.dropdown-item:hover .di-icon {
  background: var(--pumpkin);
  border-color: var(--pumpkin);
}

.dropdown-item .di-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.dropdown-item .di-title { font-weight: 700; }

.dropdown-item .di-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
}

.dropdown-item:hover .di-sub { color: var(--pumpkin-hover); opacity: 0.85; }

.dropdown-item.di-primary {
  background: linear-gradient(135deg, var(--pumpkin) 0%, #c94510 100%);
  color: #fff;
  border: 2px solid var(--pumpkin);
}

.dropdown-item.di-primary:hover {
  background: linear-gradient(135deg, var(--pumpkin-hover) 0%, var(--pumpkin) 100%);
  color: #fff;
  box-shadow: var(--glow-pumpkin);
}

.dropdown-item.di-primary .di-icon {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.dropdown-item.di-discord {
  background: linear-gradient(135deg, var(--witch) 0%, #6a1b9a 100%);
  color: #fff;
  border: 2px solid var(--witch);
}

.dropdown-item.di-discord:hover {
  background: linear-gradient(135deg, var(--witch-hover) 0%, var(--witch) 100%);
  color: #fff;
  box-shadow: var(--glow-witch);
}

.dropdown-item.di-discord .di-icon {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
  border: none;
}

/* Active state */
.dropdown-item.is-active {
  background: var(--witch-soft);
  color: var(--witch-hover);
  border: 1px solid var(--witch);
}
.dropdown-item.is-active .di-icon {
  background: var(--witch);
  border-color: var(--witch);
}

/* Backdrop for mobile close */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 150;
  display: none;
}
.menu-backdrop.show { display: block; }


/* ===== WARNA BADGE PER TIPE EVENT ===== */
/* Default */
.event-type, .badge-type {
  background: var(--bg-muted);
  color: var(--ink);
  border-color: var(--border-strong);
}

/* Games - Biru */
[data-type="games"] .event-type, .badge-type.type-games {
  background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: #3b82f6;
}

/* Competition - Emas/Kuning */
[data-type="competition"] .event-type, .badge-type.type-competition {
  background: rgba(234, 179, 8, 0.15); color: #facc15; border-color: #eab308;
}

/* Party - Pink */
[data-type="party"] .event-type, .badge-type.type-party {
  background: rgba(236, 72, 153, 0.15); color: #f472b6; border-color: #ec4899;
}

/* Roleplay - Hijau */
[data-type="roleplay"] .event-type, .badge-type.type-roleplay {
  background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: #22c55e;
}

/* Special - Ungu */
[data-type="special"] .event-type, .badge-type.type-special {
  background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: #a855f7;
}


/* =========================================================
   DROPDOWN IMPROVEMENTS — tambahan
   ========================================================= */

/* Ganti transition lama ke versi lebih halus */
.header-dropdown {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
}

/* Fokus visible untuk keyboard user */
.dropdown-item:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--pumpkin);
  outline-offset: 2px;
  background: var(--card-hover);
}

/* Item aktif (halaman sekarang) */
.dropdown-item.is-active {
  background: var(--witch-soft);
  color: var(--witch-hover);
  border: 1px solid var(--witch);
}
.dropdown-item.is-active .di-icon {
  background: var(--witch);
  border-color: var(--witch);
}
.dropdown-item.is-active .di-sub {
  color: var(--witch-hover);
  opacity: 0.85;
}

/* Notif button active state lebih jelas */
.dropdown-item.active {
  background: var(--pumpkin-soft);
  border: 1px solid var(--pumpkin);
}
.dropdown-item.active .di-title { color: var(--pumpkin-hover); }
.dropdown-item.active .di-sub   { color: var(--pumpkin-hover); opacity: 0.85; }
.dropdown-item.active .di-icon {
  background: var(--pumpkin);
  border-color: var(--pumpkin);
}

/* Mobile: dropdown bisa scroll kalau kepanjangan */
@media (max-width: 768px) {
  .header-dropdown {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Hormati preferensi reduced motion */
@media (prefers-reduced-motion: reduce) {
  .header-dropdown,
  .menu-toggle svg,
  .logo,
  .event-card {
    transition: none !important;
    animation: none !important;
  }
}


/* =========================================================
   MOBILE SAFETY NET — cegah overflow horizontal
   ========================================================= */

/* Cegah scroll horizontal di seluruh halaman */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Container tidak boleh overflow */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Header: brand tidak boleh mendorong menu keluar */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.brand > div {
  min-width: 0;
  overflow: hidden;
}

.brand h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tagline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-menu {
  flex: 0 0 auto;
}

/* Toast jangan overflow */
.toast {
  max-width: calc(100vw - 32px);
  word-break: break-word;
  text-align: center;
}

/* Filter di mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .filters {
    padding: 20px 16px;
    flex-direction: column;
    gap: 8px;
  }

  .filters input,
  .filters select {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 0 12px;
  }

  .brand h1 {
    font-size: 15px;
  }

  .logo {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }
}


/* =========================================================
   HEADER DROPDOWN — tambahan indikator aktif
   ========================================================= */

/* Bullet penanda halaman aktif */
.dropdown-item.is-active::after {
  content: "●";
  margin-left: auto;
  color: var(--witch);
  font-size: 10px;
  line-height: 1;
  flex-shrink: 0;
  padding-left: 8px;
}

/* Pastikan teks tidak mendorong bullet keluar */
.dropdown-item.is-active .di-text {
  flex: 1;
  min-width: 0;
}

/* Desktop: dropdown bisa scroll kalau viewport pendek */
@media (min-width: 769px) {
  .header-dropdown {
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}