/* ══════════════════════════════════════════════════════════════════
   4ever1 PK-Board — Design
   Dunkles, modernes Bigo-Feeling: tiefes Nachtblau + Neon-Verlauf.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #0B0B12;
  --bg-2:      #12121C;
  --card:      #171723;
  --card-2:    #1E1E2D;
  --line:      #2A2A3C;
  --line-soft: #23233340;
  --text:      #ECECF3;
  --muted:     #9A9AB0;
  --muted-2:   #6E6E85;

  --brand:     #B14BFF;   /* Violett */
  --brand-2:   #FF4D9D;   /* Pink   */
  --accent:    #37E0C8;   /* Türkis */
  --grad:      linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);

  --ok:        #2ED47A;
  --warn:      #FFB020;
  --danger:    #FF5A5A;

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 8px 30px rgba(0,0,0,.45);
  --shadow-sm: 0 3px 12px rgba(0,0,0,.35);

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-h:    56px;
  --nav-h:       62px;
  --maxw:        640px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
.boot { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
[hidden] { display: none !important; }

/* ── App-Gerüst ─────────────────────────────────────────────────── */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex; align-items: center; gap: 10px;
  padding-left: 16px; padding-right: 12px;
  background: rgba(11,11,18,.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .2px; }
.topbar .brand .dot {
  width: 26px; height: 26px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; font-size: 14px; box-shadow: 0 4px 14px rgba(177,75,255,.4);
}
.topbar .brand b { font-size: 17px; }
.topbar .brand span { color: var(--muted); font-weight: 600; font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 18px; display: grid; place-items: center;
}
.topbar .avatar-btn { padding: 0; overflow: hidden; }

.main {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 14px 16px calc(var(--safe-bottom) + 28px);
}

/* ── Bottom-Nav ─────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; justify-content: space-around; align-items: stretch;
  background: rgba(15,15,24,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted-2); font-size: 10.5px; font-weight: 600; position: relative;
}
.bottom-nav a .ic { font-size: 21px; line-height: 1; transition: transform .15s; }
.bottom-nav a.active { color: var(--text); }
.bottom-nav a.active .ic { transform: translateY(-1px) scale(1.06); }
.bottom-nav a.active::before {
  content: ''; position: absolute; top: 8px; width: 30px; height: 30px; border-radius: 10px;
  background: radial-gradient(circle, rgba(177,75,255,.28), transparent 70%);
}
.bottom-nav a .badge-dot {
  position: absolute; top: 8px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--brand-2); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg-2);
}

/* ── Karten / Sektionen ─────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .6px; margin: 22px 4px 10px; }
.section-title:first-child { margin-top: 6px; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.center { text-align: center; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 40px; margin-bottom: 10px; opacity: .8; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  padding: 12px 16px; border-radius: 13px; font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn.block { display: flex; width: 100%; }
.btn.primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 18px rgba(177,75,255,.35); }
.btn.ghost { background: transparent; }
.btn.ok { background: rgba(46,212,122,.14); border-color: rgba(46,212,122,.4); color: #7EF0AE; }
.btn.danger { background: rgba(255,90,90,.12); border-color: rgba(255,90,90,.4); color: #FF8A8A; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.pill { border-radius: 999px; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

/* ── Formulare ──────────────────────────────────────────────────── */
label.field { display: block; margin-top: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  padding: 13px 14px; border-radius: 12px; font-size: 16px; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(177,75,255,.18); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.hint { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Auth ───────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 24px); max-width: 460px; margin: 0 auto; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo .mark { width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 12px; background: var(--grad);
  display: grid; place-items: center; font-size: 30px; box-shadow: 0 10px 30px rgba(177,75,255,.45); }
.auth-logo h1 { margin: 0; font-size: 23px; letter-spacing: .3px; }
.auth-logo p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth-switch b { color: var(--brand-2); cursor: pointer; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; cursor: pointer; margin-bottom: 6px; }

/* Landing: Feature-Highlights */
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feat { display: flex; align-items: center; gap: 13px; padding: 14px 16px; }
.feat .fic { font-size: 24px; width: 30px; text-align: center; flex: none; }
.feat b { font-size: 15px; }

/* Übergang Startseite ⇄ Login/Registrieren (richtungsabhängig, mit Blur+Scale) */
#authbox { will-change: transform, opacity, filter; }
.auth-leave-fwd  { animation: authLeaveL .22s ease forwards; }
.auth-leave-back { animation: authLeaveR .22s ease forwards; }
.auth-enter-fwd  { animation: authEnterR .40s cubic-bezier(.16,.8,.24,1) both; }
.auth-enter-back { animation: authEnterL .40s cubic-bezier(.16,.8,.24,1) both; }
@keyframes authLeaveL { to { opacity: 0; transform: translateX(-30px) scale(.94); filter: blur(6px); } }
@keyframes authLeaveR { to { opacity: 0; transform: translateX(30px) scale(.94); filter: blur(6px); } }
@keyframes authEnterR { from { opacity: 0; transform: translateX(38px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes authEnterL { from { opacity: 0; transform: translateX(-38px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
/* Logo gibt beim Wechsel einen kleinen Puls (Anker-Gefühl) */
.auth-logo.switching .mark { animation: markPulse .5s ease; }
@keyframes markPulse { 30% { transform: scale(1.12) rotate(-4deg); } 60% { transform: scale(.96); } }

/* ── Avatare ────────────────────────────────────────────────────── */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--card-2); flex: none; }
.avatar.lg { width: 84px; height: 84px; }
.avatar.sm { width: 34px; height: 34px; }
.avatar.ph { display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); }

/* ── Badges / Chips ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.in   { background: rgba(46,212,122,.14); color: #7EF0AE; border-color: rgba(46,212,122,.35); }
.badge.out  { background: rgba(255,90,90,.12); color: #FF9A9A; border-color: rgba(255,90,90,.3); }
.badge.open { background: rgba(55,224,200,.12); color: var(--accent); border-color: rgba(55,224,200,.3); }
.badge.locked { background: rgba(255,176,32,.12); color: var(--warn); border-color: rgba(255,176,32,.3); }
.badge.admin { background: var(--grad); color: #fff; border: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── PK-Event-Karten ────────────────────────────────────────────── */
.pk-card { position: relative; overflow: hidden; }
.pk-card .date-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line);
  flex: none; line-height: 1;
}
.pk-card .date-tab .d { font-size: 21px; font-weight: 800; }
.pk-card .date-tab .m { font-size: 11px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.pk-head { display: flex; gap: 13px; align-items: center; }
.pk-head .title { font-weight: 800; font-size: 16.5px; }
.pk-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pk-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--accent); }
.countdown.soon { color: var(--warn); }
.countdown.closed { color: var(--muted-2); }
.pk-desc { color: #C9C9D8; font-size: 14.5px; margin-top: 10px; white-space: pre-wrap; }

/* Slot-Liste (wer wann dran ist) */
.slot { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.slot:first-child { border-top: none; }
.slot .time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; }
.slot .who { flex: 1; }
.slot .who .n { font-weight: 700; }
.slot .who .vs { color: var(--muted); font-size: 13px; }
.slot.mine { background: linear-gradient(90deg, rgba(177,75,255,.10), transparent); margin: 0 -16px; padding: 11px 16px; border-radius: 12px; }

/* ── Timeline-Beiträge ──────────────────────────────────────────── */
.post .top { display: flex; align-items: center; gap: 11px; }
.post .top .n { font-weight: 700; }
.post .top .id { color: var(--muted-2); font-size: 12px; font-weight: 600; }
.post .top .t { margin-left: auto; color: var(--muted-2); font-size: 12px; }
.post .body { margin-top: 10px; white-space: pre-wrap; font-size: 15.5px; line-height: 1.5; }
.post .photo { margin-top: 11px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-soft); }
.post .photo img { width: 100%; }
.post .actions { display: flex; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.post .actions button { background: none; border: none; color: inherit; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.post .actions button.liked { color: var(--brand-2); }

/* Composer */
.composer .row { display: flex; gap: 11px; align-items: flex-start; }
.composer textarea { border: none; background: transparent; padding: 8px 0; min-height: 46px; }
.composer .foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.composer .preview { margin-top: 10px; position: relative; border-radius: 12px; overflow: hidden; }
.composer .preview button { position: absolute; top: 8px; right: 8px; }

/* ── Profil ─────────────────────────────────────────────────────── */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-top: 6px; }
.profile-head .name { font-size: 21px; font-weight: 800; margin-top: 10px; }
.profile-head .id { color: var(--muted-2); font-size: 13px; font-weight: 600; }
.profile-head .mood { color: var(--accent); margin-top: 8px; font-size: 14.5px; }
.profile-head .facts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.avatar-edit { position: relative; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); border: 3px solid var(--bg); display: grid; place-items: center; font-size: 14px; }

/* Geburtstage */
.bday { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.bday:first-child { border-top: none; }
.bday .when { margin-left: auto; text-align: right; }
.bday .when .d { font-weight: 800; }
.bday .when .s { color: var(--muted); font-size: 12px; }
.bday.today { background: linear-gradient(90deg, rgba(255,77,157,.12), transparent); margin: 0 -16px; padding: 12px 16px; border-radius: 12px; }

/* ── Admin: Slot-Editor ─────────────────────────────────────────── */
.slot-edit { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.slot-edit:first-child { border-top: none; }
.slot-edit .who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.slot-edit .inputs { display: grid; grid-template-columns: 116px 1fr; gap: 8px; }
.slot-edit input { padding: 9px 11px; font-size: 14px; }

/* ── Modal / Sheet ──────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.sheet { background: var(--bg-2); width: 100%; max-width: var(--maxw); border-radius: 22px 22px 0 0;
  border: 1px solid var(--line); border-bottom: none; padding: 20px 18px calc(var(--safe-bottom) + 22px);
  max-height: 88dvh; overflow-y: auto; box-shadow: var(--shadow); animation: sheet-up .22s ease; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -6px auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 18px; }

/* Kopierbares ID-Feld */
.copybox { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  font-family: ui-monospace, Menlo, monospace; font-size: 14px; white-space: pre-wrap; max-height: 220px; overflow-y: auto; }

/* ── Toast ──────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 22px); transform: translateX(-50%);
  z-index: 80; background: #23233A; color: #fff; border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px;
  font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow); max-width: 90%; text-align: center;
  animation: toast-in .2s ease; }
.toast.err { background: #3A2030; border-color: rgba(255,90,90,.5); }
.toast.ok  { background: #1E3A2C; border-color: rgba(46,212,122,.5); }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ── Diverses ───────────────────────────────────────────────────── */
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--brand-2); font-weight: 600; cursor: pointer; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.install-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 16px);
  z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); max-width: var(--maxw); margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════════
   Bewegung & Effekte — dynamisch, aber performant (nur transform/opacity)
   ══════════════════════════════════════════════════════════════════ */

/* Animierter Aurora-Hintergrund (drei driftende Neon-Blobs) */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .30; will-change: transform; }
.aurora .a1 { width: 62vmax; height: 62vmax; top: -22%; left: -14%;
  background: radial-gradient(circle, var(--brand), transparent 62%); animation: drift1 20s ease-in-out infinite; }
.aurora .a2 { width: 55vmax; height: 55vmax; bottom: -20%; right: -16%;
  background: radial-gradient(circle, var(--brand-2), transparent 62%); animation: drift2 26s ease-in-out infinite; }
.aurora .a3 { width: 40vmax; height: 40vmax; top: 32%; right: 8%;
  background: radial-gradient(circle, var(--accent), transparent 65%); opacity: .16; animation: drift3 32s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(-7vw, -5vh) scale(.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-6vw, 8vh); } }

/* Gestaffeltes Einblenden von Inhalten */
.reveal { opacity: 0; animation: reveal .5s cubic-bezier(.2,.75,.25,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Karten & Links reagieren auf Druck */
.card, a.card, .btn, .bottom-nav a, .slot, .bday { transition: transform .12s ease, box-shadow .2s ease, filter .2s ease; }
a.card:active, .pk-card:active { transform: scale(.985); }
.card.tap { animation: cardtap .3s ease; }
@keyframes cardtap { 50% { transform: scale(.97); } }

/* Ripple auf Buttons */
.btn { position: relative; overflow: hidden; }
.rip { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0);
  pointer-events: none; animation: rip .6s ease-out forwards; mix-blend-mode: overlay; }
@keyframes rip { to { transform: scale(2.6); opacity: 0; } }

/* Primär-Button: leiser Glanz-Sweep beim Hover */
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%); }
.btn.primary:hover::after { animation: sheen .8s ease; }
@keyframes sheen { to { transform: translateX(120%); } }

/* Like: Herz-Pop + aufsteigende Herzen */
.post .actions button.liked .hz { animation: heartpop .45s ease; display: inline-block; }
@keyframes heartpop { 0% { transform: scale(1); } 30% { transform: scale(1.5); } 55% { transform: scale(.85); } 100% { transform: scale(1); } }
.float-heart { position: fixed; z-index: 85; pointer-events: none; font-size: 18px; animation: floatup .9s ease-out forwards; }
@keyframes floatup { to { transform: translateY(-46px) scale(1.4); opacity: 0; } }

/* Bottom-Nav Tap-Hüpfer */
.bottom-nav a.tap .ic { animation: navpop .4s ease; }
@keyframes navpop { 40% { transform: translateY(-5px) scale(1.2); } }

/* Countdown „bald" pulsiert; LIVE-Badge pulsiert */
.countdown.soon { animation: softpulse 1.4s ease-in-out infinite; }
@keyframes softpulse { 50% { opacity: .5; } }
.badge.live { background: rgba(255,90,90,.16); color: #FF9A9A; border-color: rgba(255,90,90,.5); animation: livepulse 1.8s ease-out infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,90,.5); } 70% { box-shadow: 0 0 0 9px rgba(255,90,90,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,90,0); } }
.pk-card .date-tab { position: relative; overflow: hidden; }
.pk-card .date-tab::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.12) 50%, transparent 60%);
  transform: translateX(-100%); animation: shine 5s ease-in-out infinite; }
@keyframes shine { 0%, 70% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }

/* Logo schwebt (Login) */
.auth-logo .mark { animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-7px); } }

/* Rotierender Verlaufs-Ring ums Profilbild */
.avatar-edit { padding: 3px; }
.avatar-edit::before { content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 0deg, var(--brand), var(--brand-2), var(--accent), var(--brand));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }

/* Skeleton-Ladeanimation */
.skel { position: relative; overflow: hidden; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line { height: 12px; border-radius: 6px; background: var(--card-2); margin: 8px 0; }
.skel-line.w40 { width: 40%; } .skel-line.w60 { width: 60%; } .skel-line.w80 { width: 80%; }
.skel-av { width: 44px; height: 44px; border-radius: 50%; background: var(--card-2); flex: none; }

/* Konfetti */
.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -24px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(112vh) rotate(760deg); } }

/* Rücksicht auf Nutzer, die wenig Bewegung wollen */
@media (prefers-reduced-motion: reduce) {
  .aurora { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ══════════════════════════════════════════════════════════════════
   Edge-Menüs im Samsung-Galaxy-Edge-Stil (links = Navigation, rechts = Konto)
   ══════════════════════════════════════════════════════════════════ */
.edge-handle {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 46;
  width: 6px; height: 96px; cursor: pointer; opacity: .85;
  transition: width .15s, opacity .15s;
}
.edge-handle::after { content: ''; position: absolute; inset: 0; border-radius: inherit; animation: edgeGlow 2.8s ease-in-out infinite; }
.edge-handle:active { width: 10px; opacity: 1; }
.edge-handle.left  { left: 0;  border-radius: 0 9px 9px 0; background: linear-gradient(180deg, var(--brand), var(--brand-2)); box-shadow: 0 0 16px rgba(177,75,255,.6); }
.edge-handle.right { right: 0; border-radius: 9px 0 0 9px; background: linear-gradient(180deg, var(--brand-2), var(--accent)); box-shadow: 0 0 16px rgba(255,77,157,.55); }
@keyframes edgeGlow { 50% { opacity: .45; } }

.edge-backdrop { position: fixed; inset: 0; z-index: 47; background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .3s; }
.edge-backdrop.show { opacity: 1; pointer-events: auto; }

.edge-panel {
  position: fixed; top: 0; bottom: 0; z-index: 48; width: min(80vw, 312px);
  display: flex; flex-direction: column; gap: 6px;
  padding: calc(var(--safe-top) + 20px) 14px calc(var(--safe-bottom) + 20px);
  background: rgba(18,18,28,.86); backdrop-filter: saturate(150%) blur(22px); -webkit-backdrop-filter: saturate(150%) blur(22px);
  box-shadow: 0 0 60px rgba(0,0,0,.65);
  transition: transform .36s cubic-bezier(.16,.84,.24,1);
}
.edge-panel.left  { left: 0;  transform: translateX(-105%); border-right: 1px solid var(--line); border-radius: 0 28px 28px 0; }
.edge-panel.right { right: 0; transform: translateX(105%);  border-left: 1px solid var(--line);  border-radius: 28px 0 0 28px; }
.edge-panel.open { transform: translateX(0); }
.edge-panel .ep-head { display: flex; align-items: center; gap: 11px; padding: 4px 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.edge-panel .ep-head .n { font-weight: 800; font-size: 16px; }
.edge-panel .ep-dot { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 15px; flex: none; }
.edge-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px;
  color: var(--text); font-weight: 700; font-size: 15.5px; cursor: pointer; transition: background .15s, transform .08s; }
.edge-item .ei { font-size: 21px; width: 26px; text-align: center; flex: none; }
.edge-item:active { transform: scale(.98); background: var(--card-2); }
.edge-item.active { background: linear-gradient(90deg, rgba(177,75,255,.20), transparent); }
.edge-panel.right .edge-item.active { background: linear-gradient(90deg, rgba(255,77,157,.20), transparent); }
.edge-item.danger { color: #FF8A8A; }

/* ══════════════════════════════════════════════════════════════════
   Premium-Metallic: Ränge Bronze · Silber · Gold · Platin
   ══════════════════════════════════════════════════════════════════ */
:root {
  --bronze-1: #E8A56B; --bronze-2: #94551F;
  --silber-1: #F5F7F9; --silber-2: #A3ACB7;
  --gold-1:   #FFE486; --gold-2:   #C99A1E;
  --platin-1: #F3F8FB; --platin-2: #9BB3C0;
}
.tier-badge {
  display: inline-flex; align-items: center; gap: 4px; position: relative; overflow: hidden;
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 9px 3px 8px; border-radius: 999px; color: #2a1e0e;
  border: 1px solid rgba(255,255,255,.4); box-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.tier-badge::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 36%, rgba(255,255,255,.7) 50%, transparent 64%);
  transform: translateX(-120%); animation: tierShine 4.8s ease-in-out infinite; }
@keyframes tierShine { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
.tier-bronze { background: linear-gradient(135deg, var(--bronze-1), var(--bronze-2)); }
.tier-silber { background: linear-gradient(135deg, var(--silber-1), var(--silber-2)); color: #1c232b; }
.tier-gold   { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); }
.tier-platin { background: linear-gradient(135deg, var(--platin-1), var(--platin-2)); color: #1a2329; }
.tier-badge.sm { font-size: 9.5px; padding: 2px 7px; }

/* Metallic-Ring ums Profilbild je Rang (überschreibt den bunten Standardring) */
.avatar-edit.tier-bronze::before { background: conic-gradient(from 0deg, var(--bronze-1), var(--bronze-2), var(--bronze-1)); }
.avatar-edit.tier-silber::before { background: conic-gradient(from 0deg, var(--silber-1), var(--silber-2), var(--silber-1)); }
.avatar-edit.tier-gold::before   { background: conic-gradient(from 0deg, var(--gold-1), var(--gold-2), var(--gold-1)); }
.avatar-edit.tier-platin::before { background: conic-gradient(from 0deg, var(--platin-1), var(--platin-2), var(--platin-1)); }

/* Rang-Auswahl im Kontrollraum */
.tier-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tier-opt { flex: 1; min-width: 66px; text-align: center; padding: 10px 6px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); font-weight: 800; font-size: 12px; color: var(--muted); }
.tier-opt.sel { color: #1a1a1a; border-color: transparent; box-shadow: 0 0 0 2px var(--brand); }
.tier-opt.sel.tier-bronze, .tier-opt.b { background: linear-gradient(135deg, var(--bronze-1), var(--bronze-2)); color: #2a1e0e; }
.tier-opt.s { background: linear-gradient(135deg, var(--silber-1), var(--silber-2)); color: #1c232b; }
.tier-opt.g { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); color: #2a1e0e; }
.tier-opt.p { background: linear-gradient(135deg, var(--platin-1), var(--platin-2)); color: #1a2329; }

/* ── Ausschluss-Screen (edel, würdevoll) ── */
.exclude-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px; padding: calc(var(--safe-top) + 30px) 26px calc(var(--safe-bottom) + 30px); max-width: 460px; margin: 0 auto; }
.exclude-seal { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 44px;
  background: radial-gradient(circle at 35% 30%, #2a2f36, #12151a);
  border: 2px solid transparent; background-clip: padding-box;
  box-shadow: 0 12px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  position: relative; }
.exclude-seal::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, var(--platin-1), var(--gold-2), var(--silber-2), var(--platin-1)); animation: spin 8s linear infinite; }
.exclude-screen h1 { margin: 4px 0 0; font-size: 22px; letter-spacing: .3px;
  background: linear-gradient(135deg, var(--platin-1), var(--gold-1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.exclude-screen p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.exclude-count { font-weight: 800; font-variant-numeric: tabular-nums; color: #2a2329;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); padding: 12px 20px; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(201,154,30,.35); }
.exclude-note { font-size: 13px; color: var(--muted-2); max-width: 340px; }

/* ── Anonymisierte Beiträge (Autor gelöscht) ── */
.post.anon .top .n { color: var(--muted); font-style: italic; font-weight: 600; }
.avatar.ghost, .avatar.ghost.sm { background: linear-gradient(135deg, #2a2a3c, #191922); color: var(--muted-2); }

/* Änderungs-Anträge (nur mit Freigabe änderbare Felder) */
.req-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.req-row:first-of-type { border-top: none; }
.req-row .rv { font-weight: 700; margin-top: 1px; }

/* ══════════════════════════════════════════════════════════════════
   Timeline v2 — Collage · Reaktionen · Kommentare · rote Box · Status-Chips
   ══════════════════════════════════════════════════════════════════ */

/* Status-Vorschläge im Composer */
.prompts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.prompt-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
  font-size: 13px; cursor: pointer; color: var(--muted); transition: transform .08s; }
.prompt-chip:active { transform: scale(.96); background: var(--card-2); }
.composer .previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.composer .previews .pv { position: relative; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-soft); }
.composer .previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.composer .previews .pv button { position: absolute; top: 3px; right: 3px; padding: 2px 7px; }
.composer .wichtig { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: #FF9A9A; }
.composer .wichtig input { width: auto; }

/* Bild-Collage (quadratisch, aneinandergepackt) */
.imgs { display: grid; gap: 3px; margin-top: 11px; border-radius: 14px; overflow: hidden; }
.imgs.c1 { grid-template-columns: 1fr; }
.imgs.c2 { grid-template-columns: 1fr 1fr; }
.imgs.c3 { grid-template-columns: 1fr 1fr 1fr; }
.imgs .im { position: relative; overflow: hidden; background: var(--card-2); cursor: pointer; }
.imgs:not(.c1) .im { aspect-ratio: 1 / 1; }
.imgs .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgs.c1 .im img { height: auto; max-height: 470px; }
.imgs .im .more { position: absolute; inset: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 800; }

/* Reaktionen + Aktionsleiste */
.actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; position: relative; }
.react-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.react-chip.mine { border-color: var(--brand); background: rgba(177,75,255,.18); }
.react-add, .cmt-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2); font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cmt-btn.on { color: var(--text); border-color: var(--brand); }
.react-picker { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; display: flex; gap: 4px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; box-shadow: var(--shadow); animation: reveal .18s ease both; }
.react-picker span { font-size: 24px; cursor: pointer; padding: 3px 5px; border-radius: 10px; transition: transform .1s; }
.react-picker span:hover, .react-picker span:active { transform: scale(1.25); background: var(--card-2); }

/* Kommentare (mit Antworten + @Erwähnungen) */
.comments { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.cmt { display: flex; gap: 9px; padding: 7px 0; }
.cmt.reply { margin-left: 32px; }
.cmt .cbody { flex: 1; }
.cmt .cbody .cn { font-weight: 700; font-size: 13.5px; }
.cmt .cbody .ct { color: var(--muted-2); font-size: 11px; margin-left: 6px; }
.cmt .cbody .cx { font-size: 14.5px; margin-top: 2px; white-space: pre-wrap; line-height: 1.45; }
.cmt .cbody .cx .mention { color: var(--brand-2); font-weight: 700; }
.cmt .creply { color: var(--brand-2); font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 3px; display: inline-block; }
.cmt-form { display: flex; gap: 8px; margin-top: 10px; }
.cmt-form input { flex: 1; padding: 10px 12px; font-size: 14.5px; }
.cmt-empty { color: var(--muted-2); font-size: 13px; padding: 6px 0; }

/* Rote Box für wichtige Admin-Infos */
.post.important { border: 1px solid rgba(255,90,90,.5); background: linear-gradient(180deg, rgba(255,90,90,.12), var(--card) 60%); }
.imp-tag { display: inline-flex; align-items: center; gap: 6px; color: #FF9A9A; font-weight: 800; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.imp-read { margin-top: 14px; }

/* Install-/Homescreen-Hinweis */
.install-bar b { font-size: 14.5px; }
.install-bar .ib-x { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.ios-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.ios-step { display: flex; align-items: center; gap: 12px; }
.ios-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; flex: none; }
.ios-step .ic { font-size: 22px; }

/* Geburtstags-Banner mit Live-Timer */
.bday-banner { position: relative; overflow: hidden; border: 1px solid rgba(177,75,255,.28); }
.bday-banner .bb-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 12% 0%, rgba(177,75,255,.30), transparent 60%),
              radial-gradient(120% 90% at 100% 100%, rgba(255,77,157,.24), transparent 60%); }
.bday-banner .bb-inner { position: relative; display: flex; align-items: center; gap: 16px; }
.bday-banner .bb-label { font-size: 11px; font-weight: 800; letter-spacing: .7px; color: var(--brand-2); }
.bday-banner .bb-name { font-size: 21px; font-weight: 800; margin-top: 2px; }
.bday-banner .bb-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bday-banner .bb-count { margin-top: 9px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 15px; }
.bday-banner.today { border-color: rgba(255,77,157,.55); }
.bday-banner.today .bb-count { color: var(--brand-2); }
.feed-bday { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 13px 16px; text-decoration: none; color: var(--text); }
.feed-bday .accent { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── Design-Politur (edler, „cooler") ── */
body { background: radial-gradient(150% 100% at 50% -12%, #16121f 0%, var(--bg) 52%) fixed; }
.topbar .brand b { background: linear-gradient(120deg, #ffffff 20%, var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar { border-bottom: 1px solid rgba(177,75,255,.14); }
.card { border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.045); }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 13px; border-radius: 3px; background: var(--grad); flex: none; }
.btn.primary { box-shadow: 0 7px 22px rgba(177,75,255,.42), inset 0 1px 0 rgba(255,255,255,.28); }
.pk-card .date-tab { box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
