:root {
  --bg: #050607;
  --bg2: #0a110e;
  --panel: #0f1713;
  --panel2: #121e18;
  --line: #2b4a3a;
  --text: #eefaf5;
  --muted: #a8c1b8;
  --green: #49f2a3;
  --green2: #22bf7b;
  --glow: rgba(73, 242, 163, 0.2);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 8%, rgba(73, 242, 163, 0.17), transparent 35%),
    radial-gradient(circle at 92% 18%, rgba(34, 191, 123, 0.14), transparent 38%),
    linear-gradient(140deg, var(--bg), var(--bg2));
  min-height: 100vh;
}

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

.layout {
  width: min(1280px, calc(100% - 2rem));
  margin: 1rem auto;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 1rem;
}

.sidebar {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(9, 16, 12, 0.95), rgba(11, 20, 15, 0.76));
  border-radius: 22px;
  padding: 1rem;
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.brand {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.9rem;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 1rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.nav-title {
  margin: 0.8rem 0 0.45rem;
  color: var(--green);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.nav-links {
  display: grid;
  gap: 0.42rem;
}

.nav-link {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.58rem 0.65rem;
  color: var(--muted);
  background: transparent;
  transition: 0.2s ease;
  font-size: 0.94rem;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(46, 109, 79, 0.22);
}

.nav-link.active {
  color: #0b1d14;
  border-color: transparent;
  background: linear-gradient(120deg, var(--green), var(--green2));
  font-weight: 700;
}

.join-box {
  margin-top: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(14, 24, 18, 0.78);
}

.join-box p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn.primary {
  border: none;
  color: #082113;
  background: linear-gradient(120deg, var(--green), var(--green2));
  box-shadow: 0 10px 22px var(--glow);
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn:hover { transform: translateY(-1px); }

.main {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(9, 14, 11, 0.9), rgba(11, 20, 15, 0.8));
  overflow: hidden;
}

.topbar {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.topbar h1 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9f8e9;
  background: linear-gradient(120deg, rgba(34, 191, 123, 0.2), rgba(73, 242, 163, 0.12));
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.content {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  animation: fadeLift 520ms ease both;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem;
  background:
    linear-gradient(125deg, rgba(7, 14, 10, 0.88), rgba(15, 29, 21, 0.68)),
    url("bilder/BBS-Plot.png") center center / cover no-repeat;
}

.hero .kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hero h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.7rem, 4.8vw, 3.2rem);
  line-height: 1.05;
}

.hero h2 span { color: var(--green); }

.hero p {
  margin: 0.8rem 0 0;
  max-width: 72ch;
  color: var(--muted);
}


.actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.86rem;
  background: linear-gradient(160deg, rgba(14, 24, 18, 0.9), rgba(10, 18, 14, 0.76));
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  animation: fadeLift 520ms ease both;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
}

.card p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #3a6a52;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(73, 242, 163, 0.12) inset;
}

.num {
  margin: 0;
  color: var(--green);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.small {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer {
  border-top: 1px solid var(--line);
  color: #93bda9;
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.84rem;
}

.mobile-toggle {
  display: none;
  width: 100%;
  margin-bottom: 0.6rem;
}

@media (max-width: 1050px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .mobile-toggle {
    display: inline-flex;
    justify-content: center;
  }
  .sidebar.collapsed .nav-wrap { display: none; }
}

@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.plot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.plot-card-modern {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(14, 26, 20, 0.9), rgba(10, 18, 14, 0.7));
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.plot-card-modern:hover {
  transform: translateY(-3px);
  border-color: #3e6d57;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.25);
}

.plot-card-modern img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.plot-info {
  padding: 0.85rem;
}

.plot-info h3 {
  margin: 0;
  font-size: 1rem;
}

.plot-info p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .plot-grid { grid-template-columns: 1fr; }
  .plot-card-modern img { height: 210px; }
}

.plot-image-btn {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: transparent;
}

.plot-image-btn img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.plot-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
}

.plot-lightbox.open {
  display: flex;
}

.lb-stage {
  width: min(94vw, 1400px);
  max-height: 90vh;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}

.lb-stage img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.lb-btn {
  position: fixed;
  border: 1px solid #3f6a55;
  background: rgba(10, 18, 13, 0.92);
  color: #e6fbf2;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
}

.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 760px) {
  .lb-stage { width: 96vw; max-height: 88vh; }
  .lb-prev, .lb-next { width: 40px; height: 40px; }
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.member-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: linear-gradient(160deg, rgba(14, 26, 20, 0.9), rgba(10, 18, 14, 0.7));
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  animation: memberIn 500ms ease forwards;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
  transform: translateY(-3px);
  border-color: #3f6a55;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.member-head-wrap {
  width: 64px;
  height: 64px;
  border: 1px solid #3f6552;
  border-radius: 10px;
  overflow: hidden;
  background: #101a14;
}

.member-head {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}

.member-text h3 {
  margin: 0;
  font-size: 1rem;
}

.member-text p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.member-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.86);
}

.member-modal.open {
  display: flex;
}

.member-modal-box {
  width: min(920px, 95vw);
  border: 1px solid #3f6a55;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(10, 15, 11, 0.98), rgba(13, 22, 16, 0.95));
  padding: 1rem;
  position: relative;
}

.member-modal-box .lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.member-modal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 1rem;
  align-items: center;
}

.member-skin-wrap {
  border: 1px solid #3f6a55;
  border-radius: 12px;
  background: #0f1712;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#memberModalSkin {
  width: 100%;
  max-width: 260px;
  height: auto;
  image-rendering: pixelated;
  animation: floatSkin 2.2s ease-in-out infinite;
}

.member-meta h3 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.member-meta .badge {
  display: inline-block;
  margin-top: 0.6rem;
}

.member-meta .small {
  margin-top: 0.8rem;
}

@keyframes memberIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatSkin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 980px) {
  .members-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .members-grid { grid-template-columns: 1fr; }
  .member-modal-layout { grid-template-columns: 1fr; }
  #memberModalSkin { max-width: 210px; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
  display: grid;
  gap: 0.45rem;
  background:
    radial-gradient(circle at 90% 20%, rgba(55, 255, 157, 0.16), transparent 34%),
    linear-gradient(165deg, rgba(14, 26, 20, 0.9), rgba(10, 18, 14, 0.7));
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #3f6a55;
  color: var(--green);
  font-size: 0.86rem;
  background: rgba(15, 33, 21, 0.62);
}

.small-strong {
  color: #c6ebd2;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: linear-gradient(160deg, rgba(14, 26, 20, 0.9), rgba(10, 18, 14, 0.7));
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 80px;
  background: radial-gradient(circle, rgba(55, 255, 157, 0.14), transparent 70%);
  pointer-events: none;
}

.feature-title {
  margin: 0;
  font-size: 1.02rem;
}

.feature-text {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes fadeLift {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* force members hero background (cache-safe override) */
body[data-page="mitglieder"] .hero {
  background:
    linear-gradient(125deg, rgba(7, 16, 11, 0.84), rgba(18, 35, 26, 0.62)),
    url("bilder/BBS-Plot.png") center center / cover no-repeat !important;
}
