/* ============================================================================
   Fitness Community – Theme "Premium Dark Glow"
   Dunkler Grundton mit Rot→Magenta-Glow, Gradient-Typo, Glas-Karten, Tiefe.
   ============================================================================ */
:root {
  --bg: #0a0a0c;
  --bg-2: #101014;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f6f8;
  --muted: #9698a6;
  --accent: #ff2d55;
  --accent-2: #ff5e3a;
  --accent-glow: rgba(255, 45, 85, 0.45);
  --accent-soft: rgba(255, 45, 85, 0.12);
  --accent-ink: #ffffff;
  --ok: #35e08a;
  --warn: #ffb020;
  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
/* Ambient glow – die Signatur des Looks */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 18% -8%, rgba(255, 45, 85, 0.22), transparent 60%),
    radial-gradient(50vw 50vw at 92% 4%, rgba(255, 94, 58, 0.14), transparent 55%),
    radial-gradient(60vw 40vw at 50% 108%, rgba(255, 45, 85, 0.10), transparent 60%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ff6b88; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 21px; letter-spacing: -0.6px; color: var(--text); }
.brand span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* --- Typo ------------------------------------------------------------------ */
h1 {
  font-size: clamp(38px, 9vw, 68px); line-height: 1.02; letter-spacing: -2px; font-weight: 800;
  margin: 0 0 18px;
  background: linear-gradient(180deg, #ffffff 30%, #ffb9c6 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h2 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -1px; font-weight: 800; margin: 0 0 14px; }
h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.3px; }
.muted { color: var(--muted); }
.lead { font-size: clamp(16px, 3.4vw, 20px); color: var(--muted); max-width: 580px; }
.accent-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--grad); color: var(--accent-ink);
  box-shadow: 0 8px 26px -6px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 12px 34px -6px var(--accent-glow); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--border-strong); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* --- Hero (Vollbild-Motiv) ------------------------------------------------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%;
  display: block;
  transform: scaleX(-1); /* gespiegelt: Kerem rückt nach rechts & schaut Richtung Text */
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0.72) 34%, rgba(10,10,12,0.25) 66%, rgba(10,10,12,0.5) 100%),
    linear-gradient(0deg, rgba(10,10,12,1) 3%, rgba(10,10,12,0.15) 46%, rgba(10,10,12,0.35) 100%),
    radial-gradient(70vw 40vw at 20% 100%, rgba(255,45,85,0.18), transparent 60%);
}
.hero__content { position: relative; z-index: 2; width: 100%; padding-top: 40px; padding-bottom: 64px; }
.hero__content .lead, .hero__content .hero-cta, .hero__content .hero-stats { max-width: 640px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: #ff7b95;
  font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
  border: 1px solid rgba(255, 45, 85, 0.25);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,45,85,.55); }
  70% { box-shadow: 0 0 0 8px rgba(255,45,85,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,45,85,0); }
}
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat .n { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.hero-stats .stat .n span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat .l { font-size: 13px; color: var(--muted); }

/* --- Sections / Cards ------------------------------------------------------ */
.section { padding: 56px 0; }
.section-head { margin-bottom: 30px; }
.grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  /* Bewusst OHNE backdrop-filter: verursacht über dem fixierten Glow auf
     manchen GPUs/Headless schwarze Flächen. Glas-Look kommt über Transparenz. */
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { border-color: var(--border-strong); }
.card.accent {
  border-color: rgba(255, 45, 85, 0.5);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 45, 85, 0.10), transparent 55%),
    var(--surface);
  box-shadow: 0 24px 60px -28px var(--accent-glow);
}

/* --- Pricing --------------------------------------------------------------- */
.price { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.features { list-style: none; padding: 0; margin: 18px 0 24px; }
.features li { padding: 8px 0 8px 30px; position: relative; color: var(--text); }
.features li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; font-size: 11px; display: grid; place-items: center;
}
.tier-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* --- Forms ----------------------------------------------------------------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #5f6170; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-card { max-width: 440px; margin: 40px auto; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; background: rgba(0,0,0,.25); padding: 5px; border-radius: 12px; }
.auth-tabs button {
  flex: 1; padding: 11px; border-radius: 9px; border: none;
  background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.auth-tabs button.active { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -6px var(--accent-glow); }

/* --- Alerts ---------------------------------------------------------------- */
.alert { padding: 12px 15px; border-radius: 11px; font-size: 14px; margin-bottom: 15px; display: none; }
.alert.show { display: block; }
.alert-error { background: rgba(255,45,85,.12); color: #ff8199; border: 1px solid rgba(255,45,85,.3); }
.alert-ok { background: rgba(53,224,138,.12); color: var(--ok); border: 1px solid rgba(53,224,138,.3); }

/* --- Badges / status ------------------------------------------------------- */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.tag-live { background: var(--grad); color: #fff; box-shadow: 0 4px 14px -4px var(--accent-glow); }
.tag-tier { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag-ok { background: rgba(53,224,138,.15); color: var(--ok); }
.tag-warn { background: rgba(255,176,32,.15); color: var(--warn); }
.tag-off { background: var(--surface-2); color: var(--muted); }

/* --- Event list ------------------------------------------------------------ */
.event { display: flex; flex-direction: column; gap: 10px; }
.event .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.event .when { font-size: 13px; color: var(--muted); }
.event .locked { color: var(--muted); font-size: 13px; }

/* --- Tables (admin) -------------------------------------------------------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 70px; padding: 34px 0; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }

/* --- Community-Chat -------------------------------------------------------- */
.chat {
  display: flex; flex-direction: column;
  height: calc(100vh - 64px - 40px);
  max-height: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat__head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.chat__head h2 { margin: 0; font-size: 18px; }
.chat__online { font-size: 12px; color: var(--muted); }
.chat__body {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.msg__meta { font-size: 11px; color: var(--muted); padding: 0 4px; }
.msg__bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.4;
  background: var(--surface-2); border: 1px solid var(--border);
  word-break: break-word; white-space: pre-wrap;
}
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .msg__bubble { background: var(--grad); border-color: transparent; color: #fff; }
.msg.mine .msg__meta { text-align: right; }
.chat__foot {
  padding: 12px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: flex-end;
}
.chat__foot textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 15px;
}
.chat__foot textarea:focus { outline: none; border-color: var(--accent); }
.chat__empty { margin: auto; text-align: center; color: var(--muted); }

/* --- Profil ---------------------------------------------------------------- */
.profile-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .profile-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); font-size: 14px; }
.kv .v { font-weight: 600; text-align: right; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 26px; letter-spacing: -1px;
}

/* --- Utility --------------------------------------------------------------- */
.stack > * + * { margin-top: 18px; }
.center { text-align: center; }
.hidden { display: none !important; }
.spacer { height: 24px; }
.small { font-size: 13px; }
.pointer { cursor: pointer; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 8px 0; }
