/* Startseite / Login: bewegter Hintergrund, grosse Neon-Ueberschrift, Login, Spielzeit + Blutmond, Discord. Farben wie im restlichen Panel (panel.css). */

:root {
    --blood: #ff2e2e;
    --blood-dim: #8f1010;
    --discord: #5865f2;
}

body.lp {
    min-height: 100vh;
    overflow-x: hidden;
    background: #030503;
}

/* ------------------------------------------------------------ */
/* Hintergrund                                                   */
/* ------------------------------------------------------------ */

.lp-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #030503;
}

/* Zwei Bilder ueberblenden sich in einer Dauerschleife (Bruecke ruhig -> Horde kommt), dazu langsames Heranzoomen/Schwenken. Bewusst schwach (opacity am Container). */
.lp-imgs {
    position: absolute;
    inset: -6%;
    opacity: 0.72;
    transition: opacity 1.5s ease;
}

.lp-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2.4s ease;
    will-change: transform, opacity;
}

.lp-slide.on { opacity: 1; }

/* Wer ein fertiges Video ablegt (video/login-bg.mp4), bekommt das statt der Bilder */
.lp-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.lp-bg.has-video .lp-video { opacity: 0.72; }
.lp-bg.has-video .lp-imgs { opacity: 0; }

.lp-bg canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Nebel: zwei grosse, langsam wandernde gruene Schleier */
.lp-fog {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(40% 30% at 20% 70%, rgba(57, 255, 20, 0.10), transparent 70%),
        radial-gradient(45% 35% at 80% 30%, rgba(57, 255, 20, 0.07), transparent 70%);
    animation: lp-fog 40s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes lp-fog {
    from { transform: translate3d(-4%, 2%, 0); }
    to   { transform: translate3d(5%, -3%, 0); }
}

.lp-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(3, 5, 3, 0.05) 0%, rgba(3, 5, 3, 0.62) 100%),
        linear-gradient(to bottom, rgba(3, 5, 3, 0.4), transparent 25%, transparent 60%, rgba(3, 5, 3, 0.85));
}

/* ------------------------------------------------------------ */
/* Inhalt                                                        */
/* ------------------------------------------------------------ */

.lp-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.6rem, 4vh, 2.8rem);
    padding: 3.5rem 1rem 2.5rem;
}

.lp-title {
    margin: 0;
    font-family: "Bahnschrift", "Impact", "Arial Narrow", "Segoe UI", sans-serif;
    font-size: clamp(3rem, 10.5vw, 8.5rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--green);
    user-select: none;
    text-shadow:
        0 0 4px #b8ff9e,
        0 0 14px var(--green),
        0 0 34px var(--green),
        0 0 70px var(--green-dim);
    animation: lp-neon 7s infinite;
}

.lp-title .ch {
    display: inline-block;
}

.lp-title .w {
    display: inline-block;
    white-space: nowrap;
}

/* einzelne Buchstaben fallen unregelmaessig aus wie bei einer kaputten Leuchtreklame (Dauer/Verzoegerung setzt das Skript) */
.lp-title .ch.fl {
    animation: lp-char var(--d, 4s) steps(1, end) var(--dl, 0s) infinite;
}

@keyframes lp-char {
    0%, 8%, 12%, 55%, 58%, 100% { opacity: 1; }
    9%   { opacity: 0.15; }
    10%  { opacity: 0.9; }
    11%  { opacity: 0.2; }
    56%  { opacity: 0.35; }
    57%  { opacity: 0.8; }
}

/* Gesamtschrift: leises Flackern, ab und zu kurzes Aussetzen */
@keyframes lp-neon {
    0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; }
    20%  { opacity: 0.55; }
    22%  { opacity: 0.8; }
    55%  { opacity: 0.4; }
    81%  { opacity: 1; }
    82%  { opacity: 0.7; }
    83%  { opacity: 1; }
    84%  { opacity: 0.5; }
}

.lp-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.05rem 3.2rem;
    background: var(--green);
    color: #04120a;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.55), 0 0 50px rgba(57, 255, 20, 0.25);
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.lp-btn:hover {
    box-shadow: 0 0 26px rgba(57, 255, 20, 0.95), 0 0 80px rgba(57, 255, 20, 0.4);
}

.lp-btn:active {
    transform: scale(0.97);
}

.lp-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.lp-hint {
    margin: 0;
    max-width: 30rem;
    text-align: center;
    color: var(--text);
    font-size: 0.95rem;
    text-shadow: 0 1px 8px #000, 0 0 14px #000;
}

.lp-hint b {
    color: var(--green);
}

.lp-main .login-error {
    margin: 0;
    padding: 0.4rem 0.9rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--danger);
    border-radius: 6px;
}

/* ------------------------------------------------------------ */
/* Karten                                                        */
/* ------------------------------------------------------------ */

.lp-cards {
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
}

.lp-card {
    background: rgba(8, 14, 8, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.3rem 1.6rem;
    box-shadow: 0 0 28px rgba(57, 255, 20, 0.08), inset 0 0 30px rgba(0, 0, 0, 0.4);
}

.lp-card[hidden] { display: none; }

.lp-status {
    flex: 2 1 460px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.st-row {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    text-align: center;
}

.st-label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.st-value {
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--green);
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.65);
    font-variant-numeric: tabular-nums;
}

.st-value small {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dim);
    text-shadow: none;
    margin-left: 0.15em;
}

.st-blood {
    border-top: 1px solid var(--border);
    padding-top: 0.95rem;
    text-align: center;
}

.st-blood .st-label { color: #d99; }

.st-blood-day {
    margin-top: 0.15rem;
    font-size: 1.05rem;
    color: var(--text);
}

.st-blood-day b {
    color: var(--blood);
    text-shadow: 0 0 10px rgba(255, 46, 46, 0.7);
}

.st-count {
    margin-top: 0.2rem;
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: var(--blood);
    text-shadow: 0 0 14px rgba(255, 46, 46, 0.75), 0 0 36px rgba(255, 46, 46, 0.35);
    font-variant-numeric: tabular-nums;
}

.st-unit {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.st-blood.is-soon .st-count,
.st-blood.is-active .st-count {
    animation: lp-pulse 1.4s ease-in-out infinite;
}

.st-blood.is-active .st-count {
    font-size: 2.2rem;
    letter-spacing: 0.1em;
}

@keyframes lp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.st-offline {
    text-align: center;
    color: var(--text-dim);
    padding: 1rem 0;
}

.lp-discord {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
    border-color: rgba(88, 101, 242, 0.45);
    box-shadow: 0 0 28px rgba(88, 101, 242, 0.12), inset 0 0 30px rgba(0, 0, 0, 0.4);
}

.dc-title {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #aab2ff;
}

.dc-online {
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
}

.dc-online::before {
    content: "";
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.5rem;
    vertical-align: middle;
    border-radius: 50%;
    background: #3ba55d;
    box-shadow: 0 0 8px #3ba55d;
}

.dc-avatars {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-left: 0.5rem;
}

.dc-avatars img {
    width: 34px;
    height: 34px;
    margin-left: -0.5rem;
    border-radius: 50%;
    border: 2px solid #0b0f0b;
    background: #222;
}

.dc-join {
    display: inline-block;
    padding: 0.5rem 1.4rem;
    background: var(--discord);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.dc-join:hover {
    box-shadow: 0 0 18px rgba(88, 101, 242, 0.8);
}

@media (max-width: 560px) {
    .lp-btn { padding: 0.95rem 2rem; font-size: 1.1rem; }
    .st-value { font-size: 2rem; }
    .st-count { font-size: 2.4rem; }
    .lp-card { padding: 1.1rem 1rem; }
}

/* Spielerzahl "8/30": das Maximum gleich gross, nur etwas gedaempft */
#stPl small {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-left: 0;
}

/* Spielerliste zum Aufklappen */
.st-pl {
    text-align: center;
}

.st-plbtn {
    background: transparent;
    color: var(--green);
    border: 1px solid var(--green-dim);
    border-radius: 6px;
    padding: 0.35rem 1.1rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.st-plbtn:hover {
    background: rgba(57, 255, 20, 0.08);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.35);
}

.st-pllist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.7rem;
    max-height: 9.5rem;
    overflow-y: auto;
}

.st-pllist[hidden] { display: none; }

.st-chip {
    padding: 0.2rem 0.7rem;
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.88rem;
    color: var(--text);
}

.st-none {
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* Discord: wer ist in welchem Kanal (aufklappbar) */
.dc-who {
    width: 100%;
    max-height: 13rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dc-who[hidden] { display: none; }

.dc-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.dc-chan {
    flex-basis: 100%;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aab2ff;
}

.lp-discord .st-plbtn {
    color: #c7ccff;
    border-color: rgba(88, 101, 242, 0.6);
}

.lp-discord .st-plbtn:hover {
    background: rgba(88, 101, 242, 0.12);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.4);
}

/* ------------------------------------------------------------ */
/* Dashboard: Hintergrund, Karten und Knoepfe                    */
/* ------------------------------------------------------------ */

body.lp-dash { background: #030503; }

body.lp-dash .app-shell {
    position: relative;
    z-index: 1;
}

body.lp-dash .app-header {
    background: rgba(8, 14, 8, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

body.lp-dash .dashboard-body {
    background: transparent;
}

body.lp-dash .rank-widget-box {
    background: rgba(8, 14, 8, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.lp-dash .lp-cards {
    max-width: 1100px;
}

/* Dashboard-Knoepfe (Livemap, Shop, Rangliste ...): leuchtender Rand, damit sie auf dem Bild gut zu sehen sind */
body.lp-dash .dashboard-nav .btn-dash {
    border: 1px solid #8dff72;
    box-shadow: 0 0 14px rgba(57, 255, 20, 0.55), 0 0 36px rgba(57, 255, 20, 0.2);
}

body.lp-dash .dashboard-nav .btn-dash:hover {
    box-shadow: 0 0 24px rgba(57, 255, 20, 0.95), 0 0 56px rgba(57, 255, 20, 0.4);
    transform: translateY(-2px);
}
