:root {
  color-scheme: dark;
  --bg: #07090c;
  --bg-elevated: #0d1117;
  --bg-soft: #121820;
  --line: #26313d;
  --line-strong: #324250;
  --text: #f4f7fb;
  --muted: #9fb0bf;
  --muted-2: #728291;
  --teal: #a78bfa;
  --teal-soft: rgba(167, 139, 250, 0.16);
  --amber: #f472b6;
  --rose: #ff6f91;
  --green: #c084fc;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(7, 9, 12, 0.82), rgba(7, 9, 12, 0.92)),
    url("/assets/wwwhintergrund.png") center top / cover fixed no-repeat,
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(167, 139, 250, 0.13), transparent 32%),
    linear-gradient(245deg, rgba(242, 184, 75, 0.1), transparent 35%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 34%);
  opacity: 0.65;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 12, 0.78);
  backdrop-filter: blur(18px);
  transition: background 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(7, 9, 12, 0.94);
  border-color: rgba(255, 255, 255, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.98), rgba(244, 114, 182, 0.95)),
    #15201f;
  box-shadow: 0 10px 34px rgba(167, 139, 250, 0.28);
  animation: markGlow 5.4s ease-in-out infinite;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.05;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 27, 0.74);
  border-radius: 8px;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover,
.nav-button:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.admin-link {
  color: var(--teal);
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px;
  color: var(--text);
}

.nav-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(18, 24, 32, 0.86);
  cursor: pointer;
}

.menu-button {
  display: none;
  gap: 4px;
  align-content: center;
  justify-items: center;
  grid-template-rows: repeat(3, 2px);
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(0, 0, 0, 0.58);
}

.mobile-drawer.is-open {
  display: block;
}

.drawer-panel {
  margin-left: auto;
  width: min(360px, 88vw);
  height: 100%;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: #0b0f14;
  box-shadow: var(--shadow);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  color: var(--muted);
}

.drawer-nav {
  display: grid;
  gap: 8px;
}

.drawer-nav .nav-link,
.drawer-nav .nav-button,
.drawer-nav .nav-user {
  justify-content: flex-start;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

main {
  position: relative;
  z-index: 1;
}

section {
  scroll-margin-top: 90px;
}

.section-band {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  min-height: 92vh;
  padding: 132px clamp(18px, 5vw, 72px) 78px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.88), rgba(16, 8, 34, 0.5) 44%, rgba(7, 9, 12, 0.84)),
    linear-gradient(180deg, rgba(10, 4, 22, 0.1), rgba(7, 9, 12, 0.92) 92%),
    url("/assets/vibestube-banner.png") center / cover no-repeat;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-art {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(7, 9, 12, 1), rgba(7, 9, 12, 0)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 120px);
  opacity: 0.62;
  animation: gridSlide 12s linear infinite;
}

.hero-copy,
.discord-widget-card {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-title > span {
  display: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.92;
}

.hero-subtitle {
  max-width: 700px;
  color: #c7d3df;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.65;
}

.hero-actions,
.discord-card-actions,
.admin-actions,
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.discord-card-actions a,
.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.discord-card-actions a:hover,
.admin-button:hover {
  transform: translateY(-2px);
}

.button.primary,
.admin-button.primary {
  color: #05120f;
  background: var(--teal);
  box-shadow: 0 14px 38px rgba(167, 139, 250, 0.26);
}

.button.ghost,
.admin-button,
.discord-card-actions a {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.discord-widget-card {
  justify-self: end;
  position: relative;
  display: grid;
  gap: 22px;
  width: min(100%, 430px);
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(34, 20, 62, 0.86), rgba(8, 7, 13, 0.92)),
    rgba(9, 13, 18, 0.74);
  box-shadow: var(--shadow);
  animation: widgetFloat 7.2s ease-in-out infinite;
  overflow: hidden;
}

.widget-glow {
  position: absolute;
  inset: -40% -25% auto auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.34);
  filter: blur(36px);
  opacity: 0.78;
  animation: widgetGlow 5.8s ease-in-out infinite alternate;
}

.widget-topline,
.widget-stats,
.widget-join {
  position: relative;
  z-index: 1;
}

.widget-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e9ddff;
  font-weight: 900;
}

.widget-live-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #c084fc;
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.95);
  animation: statusPulse 1.7s ease-in-out infinite;
}

.widget-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.widget-stat {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.widget-stat strong {
  display: block;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.widget-stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.widget-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #160a24;
  background: linear-gradient(135deg, #c4b5fd, #f0abfc 55%, #f472b6);
  box-shadow: 0 18px 50px rgba(167, 139, 250, 0.32);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 950;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.widget-join:hover {
  transform: translateY(-3px) scale(1.01);
  filter: saturate(1.14);
  box-shadow: 0 24px 68px rgba(244, 114, 182, 0.34);
}

.section-grid,
.content-section,
.learn-section,
.reviews-section,
.apply-section,
.admin-section {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 82px 0;
}

.section-title {
  margin-bottom: 30px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1;
}

.highlight-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
}

.list-head h3 {
  margin: 0;
  color: var(--text);
}

.card-grid,
.review-grid {
  display: grid;
  gap: 14px;
}

.item-card,
.review-card {
  position: relative;
  min-height: 160px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(19, 25, 33, 0.92), rgba(12, 16, 22, 0.94));
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.item-card:hover,
.review-card:hover {
  transform: translateY(-5px);
  border-color: rgba(167, 139, 250, 0.42);
  background: linear-gradient(160deg, rgba(27, 22, 42, 0.94), rgba(12, 16, 22, 0.96));
}

.item-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.item-card time {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  margin-bottom: 14px;
  border-radius: 6px;
  color: var(--amber);
  background: rgba(242, 184, 75, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.item-card h3 {
  margin-bottom: 9px;
}

.item-card p,
.review-card p,
.text-panel,
.learn-content,
.apply-card p {
  color: var(--muted);
  line-height: 1.75;
}

.text-panel,
.learn-shell,
.apply-card,
.admin-shell {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.76);
  box-shadow: var(--shadow);
}

.text-panel {
  max-width: 860px;
  padding: clamp(22px, 4vw, 42px);
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.rich-text a {
  color: var(--teal);
}

.learn-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
}

.learn-tabs {
  display: grid;
  align-content: start;
  padding: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.learn-tab {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 74px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.learn-tab strong {
  color: var(--text);
}

.learn-tab.is-active {
  border-color: rgba(167, 139, 250, 0.48);
  background: rgba(167, 139, 250, 0.13);
}

.learn-tab:hover {
  transform: translateX(4px);
  border-color: rgba(167, 139, 250, 0.34);
}

.learn-content {
  min-height: 310px;
  padding: clamp(22px, 4vw, 42px);
}

.review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-card {
  min-height: 130px;
}

.review-card strong {
  display: block;
  margin-bottom: 10px;
}

.review-button {
  margin-top: 18px;
}

.review-compose {
  margin-top: 20px;
}

.review-login-panel,
.review-form {
  display: grid;
  gap: 12px;
  max-width: 720px;
  padding: 20px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.76);
  box-shadow: var(--shadow);
}

.review-login-panel p {
  margin: 0;
  color: var(--muted);
}

.review-form label {
  color: var(--text);
  font-weight: 800;
}

.review-form textarea {
  min-height: 130px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  outline: none;
}

.review-form textarea:focus {
  border-color: rgba(167, 139, 250, 0.78);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.16);
}

.review-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.apply-section {
  padding-top: 36px;
}

.apply-card {
  max-width: 900px;
  padding: clamp(26px, 5vw, 54px);
}

.apply-card h2 {
  margin: 14px 0;
  font-size: clamp(30px, 4vw, 52px);
}

.admin-section {
  padding-top: 96px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
}

.admin-menu {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-menu button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.admin-menu button.is-active {
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.42);
  background: rgba(167, 139, 250, 0.13);
}

.admin-main {
  min-width: 0;
  padding: 20px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-form-grid {
  display: grid;
  gap: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.editor {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.field input,
.field textarea {
  min-height: 42px;
  padding: 10px 12px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.editor-wrap {
  display: grid;
  gap: 8px;
}

.editor-toolbar button {
  min-width: 42px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 900;
}

.editor {
  min-height: 150px;
  padding: 14px;
  line-height: 1.7;
}

.editor:focus,
.field input:focus,
.field textarea:focus {
  border-color: rgba(167, 139, 250, 0.78);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.16);
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.danger {
  color: #21040a;
  background: var(--rose);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: rgba(13, 17, 23, 0.95);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 760ms cubic-bezier(0.2, 0.72, 0.18, 1), transform 760ms cubic-bezier(0.2, 0.72, 0.18, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes markGlow {
  0%,
  100% {
    filter: saturate(1);
    transform: translateY(0);
  }
  50% {
    filter: saturate(1.35);
    transform: translateY(-1px);
  }
}

@keyframes heroDrift {
  from {
    background-position: center center;
  }
  to {
    background-position: 55% 48%;
  }
}

@keyframes gridSlide {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 0, 120px 0;
  }
}

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

@keyframes widgetFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(-0.35deg);
  }
}

@keyframes widgetGlow {
  from {
    transform: translate3d(0, 0, 0) scale(0.96);
    opacity: 0.55;
  }
  to {
    transform: translate3d(-26px, 28px, 0) scale(1.08);
    opacity: 0.9;
  }
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding-top: 116px;
  }

  h1 {
    max-width: 10ch;
  }

  .discord-widget-card {
    width: min(100%, 460px);
    justify-self: start;
  }

  .highlight-layout,
  .review-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .learn-shell,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .learn-tabs,
  .admin-menu {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .learn-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 12px;
  }

  .hero {
    padding: 104px 18px 52px;
  }

  h1 {
    font-size: clamp(44px, 14vw, 68px);
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .section-grid,
  .content-section,
  .learn-section,
  .reviews-section,
  .apply-section,
  .admin-section {
    width: calc(100% - 28px);
    padding: 58px 0;
  }

  .learn-tabs {
    grid-template-columns: 1fr;
  }

  .admin-top {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-button,
  .button {
    width: 100%;
  }

  .review-form-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
