:root {
  --bg: #0f0f13;
  --bg-card: #1a1a24;
  --bg-card-hover: #22223a;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --text: #e4e4ef;
  --text-muted: #8888a0;
  --border: #2a2a3e;
  --stammtisch: #f59e0b;
  --csd: #ec4899;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Lucide Icons ── */
.ic { width: 1em; height: 1em; vertical-align: -0.125em; display: inline-block; }
.ic-xs { width: .6em; height: .6em; }
.nav-icon { width: 1.4rem; height: 1.4rem; vertical-align: -0.2em; }
.heading-icon { width: 1.6rem; height: 1.6rem; vertical-align: -0.2em; }
.btn-icon { width: .95em; height: .95em; vertical-align: -0.125em; }
.feature-icon i { width: 2rem; height: 2rem; }
.city-icon i { width: 1.1rem; height: 1.1rem; }
.detail-icon i { width: .85rem; height: .85rem; }
.calendar-nav button i { width: 1rem; height: 1rem; vertical-align: -0.15em; }

/* ── Navigation ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15,15,19,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-brand span { font-size: 1.6rem; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent-light);
  text-decoration: none;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  background: linear-gradient(180deg, rgba(124,92,252,.08) 0%, transparent 100%);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-light), var(--csd));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-cta {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124,92,252,.4);
  text-decoration: none;
}

/* ── Feature Cards ── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .2s, border-color .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.feature-card p {
  color: var(--text-muted);
  font-size: .95rem;
}

/* ── Calendar Page ── */
.page-header {
  text-align: center;
  padding: 3rem 2rem 1rem;
}
.page-header h1 { font-size: 2.2rem; font-weight: 700; }

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: 1.5rem 0;
}
.tab-btn {
  padding: .6rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: transparent;
  color: var(--text-muted);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tab-btn.stammtisch.active { background: var(--stammtisch); border-color: var(--stammtisch); }
.tab-btn.csd.active { background: var(--csd); border-color: var(--csd); }

/* View Toggle */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.view-btn {
  padding: .4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  transition: all .2s;
}
.view-btn:hover { border-color: var(--accent); }
.view-btn.active { background: var(--bg-card); border-color: var(--accent); color: var(--text); }

/* ── Card List View ── */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.event-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow);
}
.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.event-card.stammtisch::before {
  background: linear-gradient(90deg, var(--stammtisch), #fbbf24);
}
.event-card.stammtisch:hover {
  border-color: var(--stammtisch);
  box-shadow: 0 8px 32px rgba(245,158,11,.15);
}
.event-card.csd::before {
  background: linear-gradient(90deg, var(--csd), #a855f7);
}
.event-card.csd:hover {
  border-color: var(--csd);
  box-shadow: 0 8px 32px rgba(236,72,153,.15);
}

.card-body { padding: 1.25rem 1.5rem 1rem; flex: 1; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.card-header .city {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-header .city-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stammtisch .city-icon {
  background: rgba(245,158,11,.12);
}
.csd .city-icon {
  background: rgba(236,72,153,.12);
}

.event-card .badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge.stammtisch { background: rgba(245,158,11,.12); color: var(--stammtisch); }
.badge.csd { background: rgba(236,72,153,.12); color: var(--csd); }

.card-details {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: .75rem;
}
.card-detail {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  color: var(--text-muted);
}
.card-detail .detail-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: .85rem;
}
.card-detail strong { color: var(--text); font-weight: 600; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  margin-top: auto;
}
.card-countdown {
  font-size: .8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.card-countdown.soon { color: #22c55e; }
.card-countdown.upcoming { color: var(--stammtisch); }
.card-countdown.later { color: var(--text-muted); }
.card-countdown.past { color: #ef4444; }
.card-arrow {
  color: var(--text-muted);
  font-size: .9rem;
  transition: transform .2s;
}
.event-card:hover .card-arrow { transform: translateX(3px); }

/* ── Upcoming Dates in Cards ── */
.upcoming-dates {
  margin-top: .5rem;
}
.upcoming-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.upcoming-date {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  padding: .2rem 0;
  color: var(--text);
}
.upcoming-date .detail-icon {
  color: var(--text-muted);
  font-size: .6rem;
}
.upcoming-more {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: .2rem 0;
}

/* ── Modal Grouped Styles ── */
.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.modal-section-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.modal-date-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.modal-date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
}
.modal-event-item {
  display: flex;
  gap: .75rem;
  padding: .75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.modal-event-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .3rem;
}
.modal-event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.modal-event-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .3rem;
}
.modal-event-link {
  margin-top: .4rem;
  font-size: .85rem;
}

/* ── Calendar Grid View ── */
.calendar-grid-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.calendar-nav button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .4rem .8rem;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color .2s;
}
.calendar-nav button:hover { border-color: var(--accent); }
.calendar-nav .month-label { font-size: 1.2rem; font-weight: 600; min-width: 200px; text-align: center; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-grid .day-header {
  background: var(--bg-card);
  text-align: center;
  padding: .5rem;
  font-weight: 600;
  font-size: .85rem;
  color: var(--text-muted);
}
.calendar-grid .day-cell {
  background: var(--bg);
  min-height: 90px;
  padding: .4rem;
  position: relative;
}
.calendar-grid .day-cell.other-month { opacity: .3; }
.calendar-grid .day-cell.today { background: rgba(124,92,252,.1); }
.day-cell .day-num {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .25rem;
}
.day-cell .day-event {
  font-size: .7rem;
  padding: .15rem .35rem;
  border-radius: 4px;
  margin-bottom: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .2s;
}
.day-cell .day-event:hover { opacity: .8; }
.day-event.stammtisch { background: rgba(245,158,11,.2); color: var(--stammtisch); }
.day-event.csd { background: rgba(236,72,153,.2); color: var(--csd); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  transition: transform .25s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: rgba(0,0,0,.7); color: #fff; }
.modal h2 { font-size: 1.4rem; margin-bottom: 1rem; padding-right: 2rem; }
.modal .detail-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.modal .detail-label {
  color: var(--text-muted);
  font-size: .85rem;
  min-width: 80px;
  flex-shrink: 0;
}
.modal .detail-value { font-size: .95rem; }
.modal .detail-value a { word-break: break-all; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}
.empty-state span { font-size: 2.5rem; display: block; margin-bottom: .75rem; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Responsive ── */

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: .25rem;
  line-height: 1;
}

/* ── Tablet ≤ 768px ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.05rem; }
  .hero { padding: 3.5rem 1.5rem 2rem; }
  .features { grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem; }
  .card-list { grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0 1.5rem 2rem; }
  .server-grid { grid-template-columns: 1fr; padding: 0 1.5rem 2rem; }
  .staff-grid { grid-template-columns: 1fr 1fr; padding: 0 1.5rem 2rem; }
  .calendar-grid-container { padding: 0 1rem 2rem; }
  .calendar-grid .day-cell { min-height: 70px; }
  .page-header { padding: 2rem 1.5rem .75rem; }
  .page-header h1 { font-size: 1.8rem; }
  .modal { max-width: 94%; padding: 1.5rem; }
  .modal-hero { height: 200px; margin: -1.5rem -1.5rem 1.25rem -1.5rem; }
  .modal-info-grid { grid-template-columns: 1fr 1fr; }
  .commands-overview { grid-template-columns: 1fr 1fr; }
  .search-bar { padding: 0 1.5rem; }
}

/* ── Mobile ≤ 640px ── */
@media (max-width: 640px) {
  /* Navigation → hamburger */
  .nav { padding: .75rem 1rem; }
  .nav-brand { font-size: 1.15rem; }
  .nav-brand span { font-size: 1.3rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15,15,19,.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1rem;
    gap: 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: .65rem .5rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-discord { justify-content: center; margin-top: .25rem; }
  .nav { position: sticky; top: 0; z-index: 100; } /* ensure sticky still works */

  /* Hero */
  .hero { padding: 2.5rem 1rem 1.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: .95rem; margin-bottom: 1.5rem; }
  .hero-cta { padding: .65rem 1.5rem; font-size: .95rem; }

  /* Sections */
  .features { grid-template-columns: 1fr; gap: .75rem; padding: 1rem; }
  .page-header { padding: 1.5rem 1rem .5rem; }
  .page-header h1 { font-size: 1.5rem; }

  /* Tabs & view toggle */
  .tabs { gap: .35rem; margin: 1rem 0; flex-wrap: wrap; justify-content: center; }
  .tab-btn { padding: .5rem 1rem; font-size: .85rem; }
  .view-toggle { gap: .35rem; margin-bottom: 1rem; }
  .view-btn { padding: .35rem .75rem; font-size: .8rem; }
  .stats-bar { gap: .5rem; }
  .stats-badge { padding: .3rem .75rem; font-size: .8rem; }

  /* Search */
  .search-bar { padding: 0 1rem; max-width: 100%; }
  .search-bar input { font-size: .9rem; }

  /* Cards */
  .card-list { grid-template-columns: 1fr; gap: 1rem; padding: 0 1rem 2rem; }
  .card-body { padding: 1rem 1.25rem .75rem; }
  .card-header .city { font-size: 1.05rem; }
  .card-image { height: 140px; }

  /* Calendar grid */
  .calendar-grid-container { padding: 0 .5rem 2rem; }
  .calendar-grid .day-cell { min-height: 55px; padding: .25rem; }
  .calendar-grid .day-header { padding: .35rem; font-size: .75rem; }
  .day-cell .day-num { font-size: .7rem; }
  .day-cell .day-event { font-size: .6rem; padding: .1rem .2rem; }
  .calendar-nav .month-label { font-size: 1rem; min-width: 160px; }
  .calendar-nav { gap: 1rem; }

  /* Server & Staff grids */
  .server-grid { grid-template-columns: 1fr; padding: 0 1rem 2rem; }
  .staff-grid { grid-template-columns: 1fr; padding: 0 1rem 2rem; }

  /* Modal */
  .modal { max-width: 100%; width: 96%; padding: 1.25rem; border-radius: 12px; }
  .modal h2 { font-size: 1.2rem; padding-right: 2.5rem; }
  .modal-close { top: .5rem; right: .5rem; width: 2.2rem; height: 2.2rem; font-size: 1.3rem; }
  .modal-hero { height: 180px; margin: -1.25rem -1.25rem 1rem -1.25rem; }
  .modal-hero-overlay { padding: 2rem 1rem 1rem; }
  .modal-hero-overlay h2 { font-size: 1.3rem; }
  .paw-deco { font-size: .9rem; }
  .modal-info-grid { grid-template-columns: 1fr; gap: .5rem; }
  .modal-date-item { padding: .4rem .6rem; font-size: .85rem; flex-wrap: wrap; gap: .25rem; }
  .modal-event-item { padding: .6rem; }
  .modal-event-meta { flex-direction: column; gap: .2rem; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); }

  /* Lightbox */
  .lightbox-nav { width: 36px; height: 36px; }
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
  .lightbox-close { font-size: 1.5rem; top: .75rem; right: .75rem; }

  /* Commands overview */
  .commands-overview { grid-template-columns: 1fr; }

  /* Footer */
  .footer { padding: 1.5rem 1rem; }
}

/* ── Small phones ≤ 400px ── */
@media (max-width: 400px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: .88rem; }
  .page-header h1 { font-size: 1.3rem; }
  .tabs { gap: .25rem; }
  .tab-btn { padding: .4rem .7rem; font-size: .78rem; }
  .card-header .city { font-size: .95rem; }
  .card-header .city-icon { width: 30px; height: 30px; font-size: .9rem; }
  .modal { width: 100%; border-radius: 12px 12px 0 0; max-height: 90vh; }
  .modal-hero { height: 150px; }
  .modal-hero-overlay h2 { font-size: 1.1rem; }
  .calendar-grid .day-cell { min-height: 45px; }
  .day-cell .day-event { font-size: .55rem; }
}

/* ── Search Bar ── */
.search-bar {
  max-width: 440px;
  margin: 0 auto 1.5rem;
  padding: 0 2rem;
  position: relative;
}
.search-bar .search-icon {
  position: absolute;
  left: calc(2rem + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: .65rem 1rem .65rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--bg-card);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus { border-color: var(--accent); }

/* ── Discord Nav Link ── */
.nav-discord {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .85rem;
  background: #5865F2;
  color: #fff !important;
  border-radius: 99px;
  font-weight: 600;
  font-size: .85rem;
  transition: background .2s, transform .2s;
}
.nav-discord:hover {
  background: #4752c4;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Page Subtitle ── */
.page-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: .5rem;
}

/* ── Stats Bar ── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Server Grid ── */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform .2s, border-color .2s;
}
.server-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.server-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.server-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.server-icon-placeholder i { width: 1.5rem; height: 1.5rem; }
.server-info { min-width: 0; }
.server-name {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.server-members {
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .25rem;
}

/* ── Main Server Card ── */
.server-card.main-server {
  border-color: var(--stammtisch);
  background: linear-gradient(135deg, rgba(245,158,11,.06) 0%, var(--bg-card) 100%);
  grid-column: 1 / -1;
}
.server-card.main-server:hover {
  border-color: var(--stammtisch);
  box-shadow: 0 8px 32px rgba(245,158,11,.15);
}
.main-server-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(245,158,11,.15);
  color: var(--stammtisch);
  flex-shrink: 0;
}

/* ── Event Title Link ── */
.event-title-link {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: color .2s;
}
.event-title-link:hover {
  color: var(--accent-light);
  text-decoration: underline;
}
.event-title-link .ic {
  width: .7em;
  height: .7em;
  opacity: .5;
}

/* ── Staff Grid ── */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.staff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform .2s, border-color .2s;
}
.staff-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.staff-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.staff-info { min-width: 0; }
.staff-name {
  font-size: 1.1rem;
  font-weight: 700;
}
.staff-username {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.staff-roles {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.role-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: color-mix(in srgb, var(--role-color) 15%, transparent);
  color: var(--role-color);
  border: 1px solid color-mix(in srgb, var(--role-color) 30%, transparent);
}

/* ── Setup Guide ── */
.guide-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.guide-step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  position: relative;
}
.guide-step.full-width {
  display: block;
}
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .15rem;
}
.step-content {
  flex: 1;
  min-width: 0;
}
.step-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.step-icon { width: 1.2rem; height: 1.2rem; }
.step-content p {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: .75rem;
  line-height: 1.6;
}
.step-content code {
  background: rgba(124,92,252,.12);
  color: var(--accent-light);
  padding: .15rem .45rem;
  border-radius: 5px;
  font-size: .88rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}
.guide-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.guide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124,92,252,.4);
  text-decoration: none;
  color: #fff;
}

/* Settings Grid */
.setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .75rem;
  margin-top: .5rem;
}
.setting-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.setting-header {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .35rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.setting-item p {
  color: var(--text-muted);
  font-size: .82rem;
  margin: 0;
  line-height: 1.5;
}

/* Command Blocks */
.command-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: .75rem;
}
.command-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
}
.command-row:last-child { border-bottom: none; }
.command-row code {
  background: rgba(124,92,252,.12);
  color: var(--accent-light);
  padding: .2rem .5rem;
  border-radius: 5px;
  font-size: .85rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  white-space: nowrap;
}
.command-desc {
  color: var(--text-muted);
  font-size: .85rem;
}

/* Guide Tip */
.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem 1rem;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: .5rem;
}
.guide-tip .ic {
  color: var(--stammtisch);
  flex-shrink: 0;
  margin-top: .1rem;
}
.text-muted { color: var(--text-muted); font-size: .88rem; }

/* ══════════════════════════════════
   Card Image & Redesign
   ══════════════════════════════════ */

/* Card image hero */
.card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.event-card:hover .card-image img {
  transform: scale(1.05);
}
.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15,15,19,.85) 100%);
}

/* Badge row */
.card-badges {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.badge.photo-badge {
  background: rgba(124,92,252,.12);
  color: var(--accent-light);
}

/* Upcoming date pills (redesigned) */
.upcoming-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .7rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: .35rem;
  transition: background .2s, border-color .2s;
}
.upcoming-pill:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}
.csd-pill {
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
}
.pill-main {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
}
.pill-date {
  font-size: .8rem;
  color: var(--text-muted);
  padding-left: 1.5rem;
}

/* ══════════════════════════════════
   Modal Redesign
   ══════════════════════════════════ */

/* Hero image in modal */
.modal-hero {
  margin: -2rem -2rem 1.5rem -2rem;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
}
.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.5rem 1.2rem;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.65) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}
.modal-hero-overlay h2 {
  color: #fff;
  font-size: 1.6rem;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,.7), 0 1px 3px rgba(0,0,0,.5);
  letter-spacing: .3px;
}

/* Paw decorations */
.paw-deco {
  font-size: 1.1rem;
  display: inline-block;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.5));
}
.paw-left {
  animation: pawWagLeft 2.5s ease-in-out infinite;
}
.paw-right {
  animation: pawWagRight 2.5s ease-in-out infinite;
  animation-delay: .4s;
}
@keyframes pawWagLeft {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .85; }
  25% { transform: translateY(-5px) rotate(-12deg); opacity: 1; }
  50% { transform: translateY(-2px) rotate(5deg); opacity: .9; }
}
@keyframes pawWagRight {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .85; }
  25% { transform: translateY(-5px) rotate(12deg); opacity: 1; }
  50% { transform: translateY(-2px) rotate(-5deg); opacity: .9; }
}

/* Info grid (replaces detail-row for Stammtisch) */
.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .5rem;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .6rem .75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.info-icon {
  color: var(--accent-light);
  flex-shrink: 0;
  margin-top: .1rem;
}
.info-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: .1rem;
}
.info-value {
  font-size: .92rem;
  color: var(--text);
}

/* CSD event item with thumbnail */
.modal-event-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.modal-event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-event-content {
  flex: 1;
  min-width: 0;
}
.modal-event-time {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .3rem;
}

/* ══════════════════════════════════
   Gallery Grid
   ══════════════════════════════════ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem;
}
.gallery-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, transform .2s;
}
.gallery-thumb:hover {
  border-color: var(--accent-light);
  transform: scale(1.04);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ══════════════════════════════════
   Lightbox
   ══════════════════════════════════ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  transition: opacity .2s;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s;
  z-index: 310;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background .2s;
  z-index: 310;
}
.lightbox-nav:hover { background: rgba(255,255,255,.2); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-weight: 600;
}

/* (mobile overrides moved to main responsive block above) */

/* Commands Overview */
.commands-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
  margin-top: .75rem;
}
.cmd-category h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.badge-inline {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 99px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(124,92,252,.15);
  color: var(--accent-light);
  vertical-align: middle;
}
