/* ==========================================================================
   LoiNetwork Login – gleiche Optik wie die Anmeldung der Minecraft-Seiten (dort hub.css)
   Grundlage ist style.css (identisch mit /server und /minecraft).
   ========================================================================== */

.btn-light { color: var(--brand); background: #fff; box-shadow: 0 8px 20px -10px rgba(0, 0, 30, .6); }
.btn-light:hover { color: var(--brand); background: #eef0ff; }
.btn-glass { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); }
.btn-glass:hover { color: #fff; background: rgba(255, 255, 255, .2); }

.auth-hero { min-height: calc(100vh - 66px); min-height: calc(100svh - 66px); display: grid; align-items: center; padding: 40px 0 64px; }
.auth-inner { display: flex; justify-content: center; }
.auth-card {
    width: 100%; max-width: 520px; padding: 30px 30px 26px; border-radius: 26px; color: #fff;
    background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 40px 80px -36px rgba(0, 0, 30, .75), inset 0 1px 0 rgba(255, 255, 255, .22);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: auth-card-in .5s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes auth-card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.auth-card h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; margin: 14px 0 8px; text-wrap: balance; text-align: left; }
.auth-card-center h1 { text-align: center; }
.auth-lead { margin: 0; color: rgba(255, 255, 255, .78); font-size: .97rem; }
.auth-sub {
    display: flex; align-items: center; gap: 10px; margin: -2px 0 10px;
    font-size: 1.06rem; font-weight: 700; color: #ffd77a; letter-spacing: .01em;
}
.auth-sub::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 215, 122, .45), transparent); }
.auth-eyebrow svg { color: #ffd77a; }
.auth-note { margin-top: 14px; padding: 10px 12px; border-radius: 12px; display: flex; gap: 8px; align-items: flex-start; font-size: .86rem;
    background: rgba(126, 240, 168, .12); border: 1px solid rgba(126, 240, 168, .3); }
.auth-note svg { flex-shrink: 0; margin-top: 2px; }
.auth-note code { font-size: .82em; overflow-wrap: anywhere; }
.auth-note-warn { background: rgba(255, 215, 122, .12); border-color: rgba(255, 215, 122, .35); }
/* Von welcher Seite man kommt (oben in der Karte) */
.auth-target {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 16px;
    background: rgba(0, 0, 40, .26); border: 1px solid rgba(255, 255, 255, .16);
    animation: auth-target-in .55s cubic-bezier(.2, .9, .3, 1.1) .12s both;
}
.auth-target-icon {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--brand);
    background: #fff; box-shadow: 0 8px 18px -8px rgba(0, 0, 30, .7);
}
.auth-target-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.auth-target-text small { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.auth-target-text b { font-size: 1.08rem; overflow-wrap: anywhere; }
.auth-target-badge {
    margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; color: #ffd77a; background: rgba(255, 215, 122, .12); border: 1px solid rgba(255, 215, 122, .35);
}
@keyframes auth-target-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 420px) { .auth-target { flex-wrap: wrap; } .auth-target-badge { margin-left: 54px; } }
@media (prefers-reduced-motion: reduce) { .auth-target { animation: none; } }

.auth-tabs { display: flex; width: 100%; margin: 20px 0 14px; background: rgba(0, 0, 40, .25); border-color: rgba(255, 255, 255, .16); }
.auth-tabs a { flex: 1; justify-content: center; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.auth-tabs a:hover { color: #fff; }
.auth-tabs a.is-active { background: #fff; color: var(--brand); }
.auth-msg { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; font-size: .9rem; font-weight: 600; }
.auth-msg svg { flex-shrink: 0; margin-top: 2px; }
.auth-msg.is-error { background: rgba(255, 107, 120, .16); border: 1px solid rgba(255, 140, 150, .4); }
.auth-msg.is-ok { background: rgba(126, 240, 168, .14); border: 1px solid rgba(126, 240, 168, .38); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-field > span { font-size: .84rem; font-weight: 700; color: rgba(255, 255, 255, .85); }
.auth-field small, .auth-hint { font-size: .78rem; color: rgba(255, 255, 255, .6); }
.auth-field input {
    width: 100%; padding: 12px 14px; border-radius: 12px; font: 600 1rem var(--font); color: #fff;
    background: rgba(0, 0, 40, .28); border: 1px solid rgba(255, 255, 255, .22); transition: border-color .15s, background .15s;
}
.auth-field input::placeholder { color: rgba(255, 255, 255, .4); }
.auth-field input:focus { outline: none; border-color: #fff; background: rgba(0, 0, 40, .4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }
.auth-code { font-family: var(--mono) !important; letter-spacing: .14em; text-transform: uppercase; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-submit { margin-top: 4px; padding: 13px 18px; }
.auth-foot { margin: 6px 0 0; text-align: center; font-size: .84rem; color: rgba(255, 255, 255, .65); }
.auth-foot a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.auth-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auth-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .76rem; color: rgba(255, 255, 255, .6); }
.auth-steps b {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
}
.auth-steps li.is-now { color: #fff; font-weight: 700; }
.auth-steps li.is-now b { background: #fff; color: var(--brand); border-color: #fff; }
.auth-steps li.is-done b { background: rgba(126, 240, 168, .25); border-color: rgba(126, 240, 168, .6); color: #7ef0a8; }
.auth-card-center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth-big-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); }
.auth-actions { margin-top: 20px; }
.auth-actions-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 560px) {
    .auth-card { padding: 24px 18px 20px; border-radius: 22px; }
    .auth-grid { grid-template-columns: minmax(0, 1fr); }
    .auth-tabs a { padding: 8px 6px; font-size: .8rem; }
    .auth-tabs a svg { display: none; }
}

/* Reiter flüssig wechseln (gleitender Marker, Inhalt blendet seitlich über, Höhe animiert) – login.js */
.auth-tabs { position: relative; }
.auth-tabs a { position: relative; z-index: 1; transition: color .25s ease; }
.auth-pill {
    position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 9px; background: #fff; z-index: 0;
    box-shadow: 0 4px 14px -6px rgba(0, 0, 30, .5);
    transition: transform .38s cubic-bezier(.3, 1.25, .5, 1), width .38s cubic-bezier(.3, 1.25, .5, 1);
}
.auth-card:not(.is-ready) .auth-pill { display: none; }
.auth-card.is-ready .auth-tabs a.is-active { background: transparent; }
.auth-tabs a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.auth-panels { position: relative; }
.auth-panels.is-animating { overflow: hidden; transition: height .34s cubic-bezier(.2, .8, .2, 1); }
.auth-panel.is-leaving { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }
.auth-panel.is-leaving.is-out { opacity: 0; transform: translateX(calc(var(--dir, 1) * 26px)); transition: opacity .18s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.auth-panel.is-entering { opacity: 0; transform: translateX(calc(var(--dir, 1) * 26px)); }
.auth-panel.is-entering.is-in { opacity: 1; transform: none; transition: opacity .28s ease .06s, transform .34s cubic-bezier(.2, .8, .2, 1); }
.auth-panels .auth-msg { animation: auth-msg-in .3s ease both; }
@keyframes auth-msg-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
    .auth-card, .auth-panels .auth-msg { animation: none; }
    .auth-pill, .auth-panels.is-animating, .auth-panel.is-leaving.is-out, .auth-panel.is-entering.is-in { transition: none; }
}

/* ==========================================================================
   Mein Konto
   ========================================================================== */
.account-card { max-width: 560px; }
.account-head { display: flex; align-items: center; gap: 16px; }
.account-avatar {
    width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 30, .7);
}
.account-avatar-icon { display: grid; place-items: center; color: #fff; }
.account-who { min-width: 0; }
.account-who h1 { margin: 8px 0 0; overflow-wrap: anywhere; }
.account-facts { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.account-facts li {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: .9rem;
    background: rgba(0, 0, 40, .22); border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85);
}
.account-facts li svg { flex-shrink: 0; margin-top: 2px; color: #7ef0a8; }
.account-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .16); }
.account-title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 1.05rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); }
.account-actions .btn { flex: 1 1 auto; justify-content: center; }
.account-logout-btn:hover { background: rgba(255, 107, 120, .22); border-color: rgba(255, 140, 150, .5); }
@media (max-width: 560px) {
    .account-head { gap: 12px; }
    .account-avatar { width: 48px; height: 48px; border-radius: 12px; }
    .account-actions .btn { flex-basis: 100%; }
}

/* ==========================================================================
   Ladeanimation beim Absenden (login.js): Erfahrungsleiste oben in der Karte,
   springende Pixel im Knopf, Formular tritt leicht zurück
   ========================================================================== */
.auth-card { position: relative; overflow: hidden; }
.auth-load {
    position: absolute; left: 0; right: 0; top: 0; height: 7px; padding: 0;
    background: rgba(0, 0, 40, .35); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
    opacity: 0; transition: opacity .2s ease;
}
.auth-card.is-busy .auth-load { opacity: 1; }
.auth-load-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    /* Blöcke mit Fugen wie die Erfahrungsleiste */
    background:
        repeating-linear-gradient(90deg, transparent 0 14px, rgba(0, 0, 40, .45) 14px 16px),
        linear-gradient(180deg, #b6ff8f 0 35%, #7ef05a 35% 70%, #4fc23a 70%);
    box-shadow: 0 0 12px rgba(126, 240, 90, .7);
    image-rendering: pixelated;
}
.auth-card.is-busy .auth-load-fill { animation: auth-xp 2.6s cubic-bezier(.15, .7, .25, 1) forwards; }
/* Glanz, der über die gefüllte Leiste läuft */
.auth-load-fill::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 60px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
    animation: auth-xp-shine 1.1s linear infinite;
}
@keyframes auth-xp { 0% { width: 0; } 30% { width: 46%; } 60% { width: 72%; } 100% { width: 93%; } }
@keyframes auth-xp-shine { from { left: -60px; } to { left: 100%; } }

/* Karte leuchtet leicht, Formular wird ruhig gestellt */
.auth-card.is-busy { box-shadow: 0 40px 80px -36px rgba(0, 0, 30, .75), 0 0 0 1px rgba(126, 240, 168, .35), 0 0 40px -6px rgba(126, 240, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .22); transition: box-shadow .4s ease; }
.auth-form.is-sent .auth-field, .auth-form.is-sent .auth-foot, .auth-form.is-sent .auth-hint,
.auth-card.is-busy .auth-tabs, .auth-card.is-busy .auth-steps { opacity: .5; pointer-events: none; transition: opacity .25s ease; }

/* Knopf: springende Pixel statt Symbol */
.auth-submit.is-busy { pointer-events: none; cursor: progress; }
.auth-dots { display: inline-flex; align-items: flex-end; gap: 4px; height: 16px; margin-right: 2px; }
.auth-dots i { width: 6px; height: 6px; background: currentColor; animation: auth-dot .9s cubic-bezier(.3, 0, .3, 1) infinite; }
.auth-dots i:nth-child(1) { background: #4fc23a; }
.auth-dots i:nth-child(2) { animation-delay: .15s; background: #8b5a2b; }
.auth-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes auth-dot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-9px); } }

/* Geschafft: Balken läuft bis zum Ende (Breite setzt login.js), Knopf wird grün mit Haken */
.auth-card.is-done .auth-load-fill { animation: none; }
.auth-card.is-done .auth-load-fill::after { animation-duration: .6s; }
.auth-submit.is-ok, .auth-submit.is-ok:hover { background: #7ef0a8; color: #053d1f; box-shadow: 0 8px 24px -8px rgba(126, 240, 168, .8); }
.auth-submit.is-ok svg { animation: auth-ok-pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes auth-ok-pop { from { transform: scale(0) rotate(-30deg); } }

/* Fehler: Karte schüttelt kurz den Kopf */
.auth-card.is-shake { animation: auth-shake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes auth-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card.is-shake, .auth-submit.is-ok svg { animation: none; }
    .auth-card.is-busy .auth-load-fill { animation: none; width: 70%; }
    .auth-load-fill::after, .auth-dots i { animation: none; }
}