/* Plubbi – Anmelden / Registrieren (Aufbau wie bei Discord, eigene Grafiken) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body.auth {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 96px 16px 40px;
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #dbdee1; -webkit-font-smoothing: antialiased;
  background: #1c1080; overflow-x: hidden; position: relative;
}
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 100% 100%, #0098ff 0%, rgba(0, 152, 255, 0) 60%),
    radial-gradient(900px 700px at 80% 20%, #3a3cf0 0%, rgba(58, 60, 240, 0) 70%),
    linear-gradient(115deg, #22075e 0%, #2d1495 40%, #3c3fe0 75%, #1e7cf5 100%);
}
#authStars { position: absolute; inset: 0; }
.fo { position: absolute; border-radius: 50%; filter: blur(3px); opacity: .7; animation: drift 14s ease-in-out infinite; }
.fo-1 { width: 120px; height: 120px; left: 5%; top: 30%; background: radial-gradient(circle at 35% 35%, #d9c8ff, #7b5cf0 45%, #3a1b9b 75%); box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .12); }
.fo-2 { width: 80px; height: 90px; left: 33%; top: 13%; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 40% 40%, #f39aff, #a240d8 50%, #4b1a8c 85%); animation-delay: -4s; }
.fo-3 { width: 90px; height: 90px; right: 6%; top: 28%; border-radius: 18px; transform: rotate(18deg); background: linear-gradient(135deg, #8fb4ff, #3b52e6 60%, #2532a8); animation-delay: -8s; }
.fo-4 { width: 70px; height: 70px; left: 48%; bottom: -20px; background: radial-gradient(circle at 40% 40%, #c2a2ff, #6a3fe0 60%, #2b1592); animation-delay: -2s; }
.spark { position: absolute; width: 26px; height: 26px; opacity: .55; animation: twinkle 3.5s ease-in-out infinite; }
.spark::before, .spark::after { content: ""; position: absolute; left: 50%; top: 50%; background: #b9b2ff; border-radius: 2px; }
.spark::before { width: 4px; height: 100%; transform: translate(-50%, -50%); }
.spark::after { width: 100%; height: 4px; transform: translate(-50%, -50%); }
.s1 { left: 15%; top: 54%; } .s2 { left: 31%; top: 88%; animation-delay: -1s; } .s3 { right: 20%; top: 72%; animation-delay: -2s; }
.s4 { right: 6%; top: 29%; animation-delay: -.5s; } .s5 { left: 53%; top: 86%; animation-delay: -2.6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(10px, -18px) rotate(8deg); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: .8; transform: scale(1); } }

.auth-brand { position: absolute; left: 42px; top: 40px; z-index: 2; display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.auth-brand img { width: 30px; height: 30px; object-fit: contain; }
.auth-lang { position: absolute; right: 42px; top: 40px; z-index: 2; display: flex; gap: 4px; background: rgba(0, 0, 0, .25); border-radius: 999px; padding: 4px; }
.auth-lang a { color: #dbdee1; text-decoration: none; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; line-height: 1.2; }
.auth-lang a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.auth-lang a.on { background: #fff; color: #23272a; }

.auth-card {
  position: relative; z-index: 1; background: #313338; border-radius: 5px; box-shadow: 0 2px 10px 0 rgba(0, 0, 0, .2); padding: 32px;
  width: 100%; animation: cardIn .4s cubic-bezier(.2, .9, .3, 1.1);
}
.auth-split { max-width: 784px; display: flex; gap: 64px; align-items: center; }
.auth-narrow { max-width: 480px; }
.auth-form { flex: 1 1 auto; min-width: 0; }
@keyframes cardIn { from { opacity: 0; transform: scale(1.08) translateY(-10px); } to { opacity: 1; transform: none; } }
.auth h1 { font-size: 24px; line-height: 30px; font-weight: 600; color: #f2f3f5; text-align: center; margin-bottom: 8px; }
.auth-sub { text-align: center; color: #b5bac1; font-size: 16px; line-height: 20px; margin-bottom: 20px; }
.auth label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #b5bac1; margin: 20px 0 8px; line-height: 16px; }
.auth form > label:first-of-type { margin-top: 0; }
.auth label.bad { color: #fa777c; }
.auth label em { font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
.req { color: #f23f42; }
.auth input:not([type=checkbox]) {
  width: 100%; height: 40px; border: 1px solid transparent; outline: 0; border-radius: 3px; background: #1e1f22; color: #dbdee1; font: inherit;
  font-size: 16px; padding: 10px; transition: border-color .15s;
}
.auth input:focus { border-color: #00a8fc; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: #b5bac1; cursor: pointer; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.pw-eye:hover, .pw-eye.on { color: #f2f3f5; }
.pw-eye.on::after { content: ""; position: absolute; width: 2px; height: 22px; background: currentColor; transform: rotate(-45deg); border-radius: 1px; }
.auth-forgot { display: inline-block; margin: 6px 0 20px; font-size: 14px; color: #00a8fc; text-decoration: none; font-weight: 500; }
.auth-forgot:hover, .auth-alt a:hover { text-decoration: underline; }
.auth-hint { font-size: 14px; color: #b5bac1; margin-top: 8px; line-height: 18px; }
.auth-check { display: flex !important; gap: 10px; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; font-size: 12px !important; margin-top: 20px !important; cursor: pointer; line-height: 16px; }
.auth-check input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: #5865f2; margin-top: -2px; }
.auth-btn {
  width: 100%; height: 44px; border: 0; border-radius: 3px; background: #5865f2; color: #fff; font: inherit; font-size: 16px; font-weight: 500;
  cursor: pointer; transition: background .17s; margin-top: 20px; display: flex; align-items: center; justify-content: center; position: relative;
}
.auth-forgot + .auth-btn { margin-top: 0; }
.auth-btn:hover { background: #4752c4; }
.auth-btn:active { background: #3c45a5; }
.auth-btn .dots { display: none; gap: 4px; }
.auth-btn .dots b { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite ease-in-out; }
.auth-btn .dots b:nth-child(2) { animation-delay: .15s; } .auth-btn .dots b:nth-child(3) { animation-delay: .3s; }
.auth-btn.loading span { display: none; }
.auth-btn.loading .dots { display: inline-flex; }
@keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.auth-alt { margin-top: 8px; font-size: 14px; color: #949ba4; }
.auth-alt a { color: #00a8fc; text-decoration: none; font-weight: 500; }
.auth-error { background: rgba(242, 63, 66, .1); border: 1px solid #f23f42; color: #fa777c; border-radius: 4px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }

.auth-side { flex: 0 0 240px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth-side h2 { font-size: 24px; line-height: 30px; font-weight: 600; color: #f2f3f5; margin: 32px 0 8px; }
.auth-side p { font-size: 16px; line-height: 20px; color: #b5bac1; }
.browser-art { width: 176px; height: 140px; border-radius: 8px; background: #fff; padding: 6px; position: relative; animation: bob 4s ease-in-out infinite; }
.ba-bar { display: flex; gap: 4px; align-items: center; height: 14px; padding: 0 4px; }
.ba-bar i { width: 6px; height: 6px; border-radius: 50%; background: #c7c9ff; }
.ba-bar i:first-child { background: #f23f42; } .ba-bar i:nth-child(2) { background: #f0b232; } .ba-bar i:nth-child(3) { background: #23a559; }
.ba-bar span { flex: 1; height: 7px; margin-left: 6px; border-radius: 4px; background: #e3e5e8; }
.ba-body { display: flex; gap: 4px; height: calc(100% - 18px); margin-top: 4px; border-radius: 4px; overflow: hidden; background: #313338; }
.ba-rail { width: 22px; background: #1e1f22; display: flex; flex-direction: column; gap: 4px; padding: 4px 3px; }
.ba-rail b { width: 16px; height: 16px; border-radius: 50%; background: #5865f2; }
.ba-rail b:nth-child(2) { background: #eb459e; border-radius: 5px; } .ba-rail b:nth-child(3) { background: #23a559; }
.ba-chat { flex: 1; padding: 8px 6px; display: flex; flex-direction: column; gap: 7px; justify-content: flex-end; }
.ba-chat p { height: 9px; border-radius: 5px; background: #4e5058; transform-origin: left; animation: typeIn 3s ease-in-out infinite; }
.ba-chat .l1 { width: 80%; } .ba-chat .l2 { width: 55%; animation-delay: .4s; background: #5865f2; } .ba-chat .l3 { width: 70%; animation-delay: .8s; }
.ba-check { position: absolute; right: -14px; bottom: -14px; width: 40px; height: 40px; border-radius: 50%; background: #23a559; color: #fff; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px #313338; animation: popIn .6s .3s both cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes typeIn { 0% { transform: scaleX(0); opacity: 0; } 25%, 85% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

@media (max-width: 830px) {
  .auth-side { display: none; }
  .auth-split { max-width: 480px; }
}
@media (max-width: 520px) {
  body.auth { padding: 0; align-items: stretch; }
  .auth-bg { display: none; }
  body.auth { background: #313338; }
  .auth-brand { position: static; justify-content: center; padding: 28px 0 0; }
  .auth-lang { position: relative; right: auto; top: auto; align-self: center; margin: 14px 0 4px; }
  body.auth { flex-direction: column; justify-content: flex-start; }
  .auth-card { box-shadow: none; border-radius: 0; padding: 24px 16px 40px; animation: none; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Einladung */
.invite-card { text-align: center; }
.inv-icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 700; overflow: hidden; }
.inv-icon img { width: 100%; height: 100%; object-fit: cover; }
.inv-bad { background: #4e5058; }
.inv-pre { margin-bottom: 4px; font-size: 14px; }
.inv-count { color: #b5bac1; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.inv-count i { width: 8px; height: 8px; border-radius: 50%; background: #23a559; }
a.auth-btn { text-decoration: none; }

/* v1.16: Abzeichen für verifizierte und Partner-Server */
.inv-title { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; max-width: 100%; overflow-wrap: anywhere; }
.srv-badge { display: inline-flex; flex: 0 0 auto; line-height: 0; vertical-align: middle; }
.srv-badge.verified { color: #23a55a; }
.srv-badge.partner { color: #5865f2; }
/* v1.23: Hinweis nach Deaktivieren/Löschen */
.auth-info { background: rgba(88, 101, 242, .12); border: 1px solid #5865f2; color: #c9cdfb; border-radius: 4px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; line-height: 1.4; }
/* v1.24: Freundes-Einladung */
.inv-icon.inv-round { border-radius: 50%; }

/* v1.25: App autorisieren */
.auth-authorize { text-align: left; }
.auth-select { width: 100%; height: 40px; border: 1px solid transparent; border-radius: 3px; background: #1e1f22; color: #dbdee1; font: inherit; font-size: 16px; padding: 0 10px; }
.auth-select:focus { outline: 0; border-color: #00a8fc; }
.auth-plabel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #b5bac1; margin: 20px 0 4px; }
.auth-perms { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-bottom: 8px; }
.auth-perms .auth-check { margin-top: 10px !important; font-size: 14px !important; color: #dbdee1; }
.auth-authorize .auth-btn { margin-top: 20px; }
.bot-tag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .02em; vertical-align: middle; line-height: 16px; text-transform: uppercase; }
@media (max-width: 520px) { .auth-perms { grid-template-columns: 1fr; } }
