/*
Theme Name: Pulse4x App Theme
Theme URI: https://pulse4x.net
Author: Pulse4x
Description: Pulse4x eigenes App Theme (nur eingeloggte User, eigene Login-Seite, keine WP Toolbar).
Version: 2.0.0
Text Domain: pulse4x-app
*/

/* Base */
html, body { height:100%; }
body { margin:0; padding:0; background:#0b0f14; color:#fff; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

/* Hide any leftover theme chrome on app pages */
body.p4x-app { overflow-x:hidden; }

/* Layout containers */
.p4x-screen {
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.p4x-shell {
  width:min(92vw, 520px);
  border-radius:28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding:22px 18px 18px;
}

.p4x-brand {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.p4x-brand h1 {
  font-size:18px;
  letter-spacing:0.25em;
  font-weight:700;
  margin:0;
  text-transform:uppercase;
  opacity:0.9;
}

.p4x-top-actions a {
  color:#fff;
  text-decoration:none;
  font-weight:600;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
}

.p4x-content {
  margin-top:8px;
}

/* Login card */
.p4x-login-title {
  text-align:center;
  font-size:22px;
  letter-spacing:0.22em;
  margin:10px 0 18px;
}

.p4x-login-sub {
  text-align:center;
  opacity:0.75;
  margin:-8px 0 18px;
  font-size:14px;
}

.p4x-login .login-username,
.p4x-login .login-password {
  margin-bottom:12px;
}

.p4x-login label {
  display:block;
  font-size:12px;
  opacity:0.75;
  margin-bottom:6px;
  letter-spacing:0.12em;
  text-transform:uppercase;
}

.p4x-login input[type="text"],
.p4x-login input[type="password"] {
  width:100%;
  box-sizing:border-box;
  border-radius:999px;
  padding:14px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color:#fff;
  outline:none;
}

.p4x-login input::placeholder { color: rgba(255,255,255,0.55); }

.p4x-login .login-remember {
  display:flex;
  align-items:center;
  gap:8px;
  margin:10px 0 14px;
  font-size:14px;
  opacity:0.8;
}

.p4x-login input[type="submit"] {
  width:100%;
  border:0;
  border-radius:999px;
  padding:14px 16px;
  font-weight:800;
  letter-spacing:0.25em;
  text-transform:uppercase;
  background:#7db21a;
  color:#0b0f14;
  box-shadow: 0 18px 38px rgba(125,178,26,0.25);
  cursor:pointer;
}

.p4x-login .p4x-error {
  margin:12px 0 0;
  padding:12px 14px;
  border-radius:16px;
  background: rgba(255, 64, 64, 0.18);
  border: 1px solid rgba(255, 64, 64, 0.30);
}

/* Optional: tighten WordPress default content spacing if any */
.entry-content, .wp-block-group, .wp-block {}

/* Imported Pulse4x.com CSS (scoped to app) */
/* ============================================================
   PULSE4X – FRONTEND DESIGN (LANDING, DASHBOARD, MODULE, ADMIN)
   Datei: frontend.css
   ============================================================ */

/* ---------- Global & Astra-Rahmen ausblenden ---------- */

html,
body.p4x-app body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "SF Pro Text", "Segoe UI", sans-serif;
}

/* Astra Header/Footer weg */
.site-header,
.site-footer,
.ast-header-break-point .main-header-bar,
.ast-below-header-wrap,
body.p4x-app .ast-above-header-wrap {
    display: none !important;
}

.site,
#page,
#content,
body.p4x-app .ast-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* ---------- Hintergrund: Circuit-Board Bild ---------- */

body.p4x-app body {
    background: #040405;
    background-image: url('https://pulse4x.com/wp-content/uploads/2025/11/pulse4x-2.png');
    background-size: cover;
    background-position: 50% top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
}

body.p4x-app body[data-theme="light"] {
    filter: brightness(1.05);
}

/* ============================================================
   STARTSEITE / LOGIN
   ============================================================ */

body.p4x-app .p4x-start-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 11vh;
}

body.p4x-app .p4x-logo-block {
    position: absolute;
    left: 50%;
    top: 36vh;
    transform: translateX(-50%);
    text-align: center;
}

body.p4x-app .p4x-logo-title {
    margin-top: 10px;
    font-size: 2.4rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: transparent;
}

/* zentrierter Wrapper für Login-Button */
body.p4x-app .p4x-center {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ============================================================
   APPLE-GLASS BASISBUTTON
   ============================================================ */

.p4x-btn-glass,
a.p4x-btn-glass,
body.p4x-app .p4x-btn-main {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 54px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.24);
    background: radial-gradient(circle at 0% 0%,
                rgba(255,255,255,0.18),
                rgba(20,20,20,0.95));
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.65),
        0 18px 40px rgba(0,0,0,0.95),
        0 0 34px rgba(86,215,255,0.55);
    color: #f8f8f8;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease,
                box-shadow 0.18s ease,
                background 0.18s ease;
}

.p4x-btn-glass:hover,
body.p4x-app .p4x-btn-main:hover {
    transform: translateY(-1px) scale(1.015);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.32),
        0 22px 46px rgba(0,0,0,0.98),
        0 0 42px rgba(120,230,255,0.80);
}

.p4x-btn-glass:active,
body.p4x-app .p4x-btn-main:active {
    transform: translateY(1px) scale(0.985);
    box-shadow:
        0 10px 24px rgba(0,0,0,0.9),
        0 0 24px rgba(86,215,255,0.4);
}

/* Haupt-Login-Button */
body.p4x-app #p4x-login-main.p4x-btn-main {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 68vh;

    min-width: 260px;
    padding: 18px 40px;
    border-radius: 999px;

    font-size: 1.2rem;
    color: #ffffff;
    text-align: center;

    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow:
        0 0 35px rgba(255,255,255,0.70),
        0 0 90px rgba(255,255,255,0.50),
        inset 0 0 22px rgba(255,255,255,0.32),
        inset 0 6px 18px rgba(255,255,255,0.55),
        0 0 25px rgba(180,220,255,0.30);
}

body.p4x-app #p4x-login-main.p4x-btn-main:hover {
    background: rgba(255,255,255,0.20);
    box-shadow:
        0 0 45px rgba(255,255,255,0.85),
        0 0 130px rgba(255,255,255,0.60),
        inset 0 0 28px rgba(255,255,255,0.40);
}

/* Login-Panel (für später) */

body.p4x-app .p4x-login-panel {
    display: none;
    position: absolute;
    left: 50%;
    top: 57%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 360px;
    padding: 28px 26px;
    border-radius: 26px;

    background: rgba(20,20,20,0.55);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow:
        0 0 25px rgba(0,0,0,0.65),
        inset 0 0 18px rgba(255,255,255,0.18);
    z-index: 9999;
}

body.p4x-app .p4x-login-panel h3 {
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
    text-align: center;
    color: #ffffff;
}

body.p4x-app .p4x-login-panel input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 16px;
    color: white;
    backdrop-filter: blur(28px);
    margin-bottom: 14px;
    box-shadow:
        inset 0 0 12px rgba(255,255,255,0.22);
}

body.p4x-app .p4x-login-panel input::placeholder {
    color: rgba(255,255,255,0.65);
}

body.p4x-app #p4x-login-submit {
    width: 100%;
    padding: 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.55);
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    backdrop-filter: blur(32px);
    box-shadow:
        0 0 22px rgba(255,255,255,0.45),
        inset 0 0 14px rgba(255,255,255,0.28);
    cursor: pointer;
    transition: 0.2s ease;
}

body.p4x-app #p4x-login-submit:hover {
    background: rgba(255,255,255,0.32);
    box-shadow:
        0 0 34px rgba(255,255,255,0.75),
        inset 0 0 18px rgba(255,255,255,0.35);
}

/* ============================================================
   PARAGRAPH-BUTTON (§) + TERMS OVERLAY
   ============================================================ */

body.p4x-app .p4x-paragraph-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 78vh;

    min-width: 80px;
    height: 34px;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;
    font-size: 1.2rem;

    backdrop-filter: blur(18px);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow:
        0 10px 24px rgba(0,0,0,0.75),
        0 0 20px rgba(255,255,255,0.25);

    cursor: pointer;
    overflow: hidden;
    z-index: 30;
}

body.p4x-app .p4x-paragraph-icon {
    color: #ff6b6b;
    text-shadow:
        0 0 8px rgba(255, 99, 99, 0.9),
        0 0 14px rgba(255, 99, 99, 0.7);
    animation: p4x-paragraph-pulse 2.4s infinite ease-in-out;
}

@keyframes p4x-paragraph-pulse {
    0% {
        transform: scale(1);
        text-shadow:
            0 0 6px rgba(255, 99, 99, 0.8),
            0 0 10px rgba(255, 99, 99, 0.5);
    }
    50% {
        transform: scale(1.06);
        text-shadow:
            0 0 14px rgba(255, 99, 99, 1),
            0 0 24px rgba(255, 99, 99, 0.8);
    }
    100% {
        transform: scale(1);
        text-shadow:
            0 0 6px rgba(255, 99, 99, 0.8),
            0 0 10px rgba(255, 99, 99, 0.5);
    }
}

/* Terms-Overlay */

body.p4x-app .p4x-terms-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

body.p4x-app .p4x-terms-overlay.p4x-terms-open {
    opacity: 1;
    pointer-events: auto;
}

body.p4x-app .p4x-terms-panel {
    width: 100%;
    max-width: 480px;
    max-height: 80vh;

    background: rgba(9,11,16,0.94);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow:
        0 24px 60px rgba(0,0,0,0.85),
        0 0 28px rgba(255,255,255,0.20);

    display: flex;
    flex-direction: column;
    padding: 18px 20px 16px;
}

body.p4x-app .p4x-terms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

body.p4x-app .p4x-terms-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.9;
}

body.p4x-app .p4x-terms-close {
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.p4x-app .p4x-terms-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

body.p4x-app .p4x-terms-scroll {
    flex: 1;
    min-height: 120px;
    max-height: 46vh;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.9;
}

body.p4x-app .p4x-terms-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

body.p4x-app .p4x-terms-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

body.p4x-app .p4x-terms-confirm {
    align-self: flex-end;
    min-width: 120px;
    font-size: 0.82rem;
}

body.p4x-app .p4x-terms-shake {
    animation: p4x-terms-shake-keyframes 0.25s linear;
}

@keyframes p4x-terms-shake-keyframes {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-4px); }
    50%  { transform: translateX(4px); }
    75%  { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* ============================================================
   TOPBAR + CREDITS
   ============================================================ */

:root {
    --p4x-topbar-size: 46px;
}

body.p4x-app .p4x-credits {
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 40;

    min-height: var(--p4x-topbar-size);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;

    padding: 0.35rem 0.9rem;
    border-radius: 999px;

    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.65), transparent 65%),
        rgba(110,110,120,0.38);
    border: 1px solid rgba(255,255,255,0.90);
    color: #f5f5f7;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    white-space: nowrap;
}

body.p4x-app .p4x-credits-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

body.p4x-app .p4x-credits-value {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Topbar rechts */

body.p4x-app .p4x-topbar {
    position: fixed;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 40;

    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.p4x-app .p4x-btn-glass-round {
    width: var(--p4x-topbar-size);
    height: var(--p4x-topbar-size);
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow:
        0 0 22px rgba(255,255,255,0.75),
        inset 0 0 18px rgba(255,255,255,0.50);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

body.p4x-app .p4x-btn-glass-round:hover {
    background: rgba(255,255,255,0.35);
    box-shadow:
        0 0 30px rgba(255,255,255,0.95),
        inset 0 0 22px rgba(255,255,255,0.60);
    transform: translateY(-1px);
}

/* Mode Button */

body.p4x-app .p4x-mode-btn {
    width: var(--p4x-topbar-size);
    height: var(--p4x-topbar-size);
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%,
                 rgba(255,255,255,0.38),
                 rgba(4,6,10,0.92));
    border: 1px solid rgba(255,255,255,0.80);
    box-shadow:
        0 7px 20px rgba(0,0,0,0.80),
        0 0 18px rgba(255,255,255,0.22);
    cursor: pointer;
    overflow: hidden;
}

body.p4x-app .p4x-mode-icon-inner {
    display: inline-block;
    font-size: 1.4rem;
    line-height: 1;
    color: #ffffff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

body.p4x-app body[data-theme="light"] .p4x-mode-icon-inner::before {
    content: "☀️";
}

body.p4x-app body[data-theme="dark"] .p4x-mode-icon-inner::before {
    content: "🌙";
}

body.p4x-app .p4x-mode-btn:active .p4x-mode-icon-inner {
    transform: scale(0.86);
    opacity: 0.75;
}

/* Logout */

.p4x-logout-btn,
.p4x-topbar [data-logout],
body.p4x-app .p4x-topbar .p4x-btn-logout {
    height: var(--p4x-topbar-size);
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.85);
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.65), transparent 55%),
        rgba(40,40,44,0.75);
    color: #ffffff;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow:
        0 12px 26px rgba(0,0,0,0.9),
        0 0 24px rgba(255,255,255,0.65);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.p4x-logout-btn:hover,
.p4x-topbar [data-logout]:hover,
body.p4x-app .p4x-topbar .p4x-btn-logout:hover {
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.80), transparent 55%),
        rgba(55,55,60,0.85);
    box-shadow:
        0 16px 36px rgba(0,0,0,1),
        0 0 32px rgba(255,255,255,0.90);
    transform: translateY(-1px);
}

/* ============================================================
   LANGUAGE DROPDOWN
   ============================================================ */

body.p4x-app .p4x-lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px;
    width: 140px;
    background: rgba(0,0,0,0.70);
    backdrop-filter: blur(22px) brightness(1.2);
    -webkit-backdrop-filter: blur(22px) brightness(1.2);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.42);
    box-shadow:
        0 0 18px rgba(0,0,0,0.9),
        0 0 35px rgba(255,255,255,0.28);
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

body.p4x-app .p4x-lang-dropdown.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

body.p4x-app .p4x-lang-item {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 6px 8px;
    height: 32px;
    width: 100%;

    background: rgba(255,255,255,0.10);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.30);

    backdrop-filter: blur(18px) brightness(1.3);
    -webkit-backdrop-filter: blur(18px) brightness(1.3);

    font-size: 0;
    color: transparent;

    cursor: pointer;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

body.p4x-app .p4x-lang-item:hover {
    background: rgba(255,255,255,0.22);
    box-shadow:
        0 0 18px rgba(255,255,255,0.45),
        0 0 32px rgba(255,255,255,0.35);
    transform: translateX(3px);
}

body.p4x-app .p4x-lang-item.active {
    background: rgba(255,255,255,0.30);
    border-color: rgba(255,255,255,0.7);
}

.p4x-lang-item .p4x-flag,
body.p4x-app .p4x-lang-item img {
    font-size: 20px !important;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    line-height: 1;
    color: #ffffff !important;
    display: inline-block;
}

/* ============================================================
   DASHBOARD – ZENTRIERT MIT CAROUSEL
   ============================================================ */

body.p4x-app .p4x-dashboard-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding: 5.5rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden; /* keine Seite-Scrollbars */
}

body.p4x-app .p4x-dashboard-inner {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.3rem;
    text-align: center;
}

body.p4x-app .p4x-dashboard-title {
    margin: 0;
    font-size: 2.0rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
    color: #111111;
}

body.p4x-app .p4x-dashboard-sub {
    margin: 0.3rem 0 0.8rem;
    font-size: 1.0rem;
    font-weight: 500;
    color: #222222;
}

/* Carousel-Wrapper mittig */

body.p4x-app .p4x-dashboard-carousel {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0.8rem auto 0;
    padding: 0;
}

body.p4x-app .p4x-carousel-track {
    position: relative;
    width: 100%;
    height: 430px;
}

/* Slides */

body.p4x-app .p4x-carousel-slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: 84%;
    height: 100%;
    transform: translateX(-50%) scale(0.82);
    opacity: 0.22;
    filter: blur(2px);
    pointer-events: none;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        filter 0.3s ease;
}

body.p4x-app .p4x-carousel-slide.is-center {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    filter: none;
    pointer-events: auto;
    z-index: 3;
}

body.p4x-app .p4x-carousel-slide.is-left {
    transform: translateX(-140%) scale(0.78);
    opacity: 0.35;
    filter: blur(2px);
    z-index: 2;
}

body.p4x-app .p4x-carousel-slide.is-right {
    transform: translateX(40%) scale(0.78);
    opacity: 0.35;
    filter: blur(2px);
    z-index: 2;
}

/* Dashboard-Karte im Carousel */

body.p4x-app .p4x-dashboard-card {
    padding: 1.6rem 1.8rem 1.9rem;
    border-radius: 32px;
    background: linear-gradient(145deg,
                rgba(211,215,223,0.95),
                rgba(158,166,178,0.92));
    border: 1px solid rgba(255,255,255,0.95);
    box-shadow:
        0 26px 60px rgba(0,0,0,0.95),
        inset 0 0 1px rgba(255,255,255,1);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #111218;
    text-align: center;
}

body.p4x-app .p4x-dashboard-card-title {
    margin: 0.35rem 0 0.2rem;
    font-size: 1.1rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

body.p4x-app .p4x-dashboard-card-sub {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 260px;
}

/* Öffnen-Button in Card */

body.p4x-app .p4x-dashboard-go {
    margin-top: 0.7rem;
    align-self: stretch;

    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.95);

    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.90), transparent 55%),
        rgba(255,255,255,0.32);

    color: #111217;
    font-size: 0.85rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-align: center;

    box-shadow:
        0 16px 36px rgba(0,0,0,0.95),
        0 0 40px rgba(255,255,255,0.90),
        inset 0 0 16px rgba(255,255,255,0.70);

    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

body.p4x-app .p4x-dashboard-go:hover {
    transform: translateY(-1px);
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,1), transparent 55%),
        rgba(255,255,255,0.40);
    box-shadow:
        0 22px 48px rgba(0,0,0,1),
        0 0 52px rgba(255,255,255,1);
}

body.p4x-app .p4x-dashboard-go:active {
    transform: translateY(1px) scale(0.97);
    box-shadow:
        0 12px 28px rgba(0,0,0,0.9),
        0 0 30px rgba(255,255,255,0.85);
}

/* Pfeile */

body.p4x-app .p4x-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.35);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 12px 26px rgba(0,0,0,0.9),
        0 0 26px rgba(255,255,255,0.55);
    cursor: pointer;
    opacity: 0.85;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease,
        opacity 0.16s ease;
}

body.p4x-app .p4x-carousel-arrow--prev {
    left: -8px;
}

body.p4x-app .p4x-carousel-arrow--next {
    right: -8px;
}

body.p4x-app .p4x-carousel-arrow:hover {
    background: rgba(0,0,0,0.55);
    transform: translateY(-50%) translateY(-1px);
    box-shadow:
        0 16px 32px rgba(0,0,0,1),
        0 0 32px rgba(255,255,255,0.75);
}

/* Dots */

body.p4x-app .p4x-carousel-dots {
    margin-top: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 0.45rem;
}

body.p4x-app .p4x-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.35);
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition:
        width 0.16s ease,
        background 0.16s ease,
        opacity 0.16s ease;
}

body.p4x-app .p4x-carousel-dot.is-active {
    width: 18px;
    background: rgba(255,255,255,0.95);
    opacity: 1;
}

/* ============================================================
   MODULE – GEMEINSAMES LAYOUT (Funktionsanalyse, Prognose, Trading, Early Bird)
   ============================================================ */

body.p4x-app .p4x-module-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding: 5.5rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

body.p4x-app .p4x-module-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 2.0rem 2.0rem 2.2rem;

    border-radius: 28px;
    background:
        linear-gradient(145deg,
            rgba(255,255,255,0.30),
            rgba(188,198,210,0.14));
    border: 1px solid rgba(255,255,255,0.90);
    box-shadow:
        0 26px 64px rgba(0,0,0,0.95),
        inset 0 0 1px rgba(255,255,255,0.95);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    color: #111219;

    display: flex;
    flex-direction: column;
}

/* kleiner Header oben */
body.p4x-app .p4x-module-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.4rem;
}

body.p4x-app .p4x-module-logo {
    font-size: 0.78rem;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(15,17,24,0.9);
}

/* Seitentitel */

body.p4x-app .p4x-module-title {
    margin: 0 0 1.4rem;
    font-size: 1.55rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #151720;
    text-align: center;
}

/* Early-Bird: Adler in der Überschrift */

body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title {
    position: relative;
}

.p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::before,
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::after {
    content: "🦅";
    position: absolute;
    top: -0.1em;
    font-size: 1.3rem;
}

body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::before {
    left: -1.8rem;
}

body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::after {
    right: -1.8rem;
}

/* Eingabe-Zeile (Coin + GO) */

body.p4x-app .p4x-input-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.6rem;
}

body.p4x-app .p4x-coin-input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(180,188,196,0.85);
    color: #101218;
    font-size: 0.98rem;
    outline: none;
    box-shadow:
        0 16px 32px rgba(0,0,0,0.4),
        inset 0 0 12px rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

body.p4x-app .p4x-coin-input::placeholder {
    color: rgba(40,46,58,0.75);
}

body.p4x-app .p4x-coin-input:focus {
    border-color: #111219;
    box-shadow:
        0 18px 40px rgba(0,0,0,0.55),
        0 0 0 1px rgba(17,18,25,0.18);
}

/* GO-Button */

body.p4x-app .p4x-go-btn {
    flex: 0 0 auto;
    padding: 0.7rem 1.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.95);

    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.9), transparent 55%),
        rgba(255,255,255,0.32);

    color: #111217;
    font-size: 0.9rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;

    box-shadow:
        0 14px 32px rgba(0,0,0,0.95),
        0 0 30px rgba(255,255,255,0.90),
        inset 0 0 16px rgba(255,255,255,0.70);

    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

body.p4x-app .p4x-go-btn:hover {
    transform: translateY(-1px);
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,1), transparent 55%),
        rgba(255,255,255,0.40);
    box-shadow:
        0 20px 45px rgba(0,0,0,1),
        0 0 46px rgba(255,255,255,1);
}

body.p4x-app .p4x-go-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 10px 26px rgba(0,0,0,0.9),
        0 0 26px rgba(255,255,255,0.85);
}

/* Early-Bird-Steuerungstext lesbar */

.p4x-module-wrapper[data-module="early_bird"] .p4x-module-card p,
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-card li {
    color: #f7f9ff;
    font-weight: 500;
    text-shadow: 0 0 18px rgba(0, 0, 0, 0.85);
}

body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-card strong {
    font-weight: 700;
}

/* OUTPUT-BLOCK – SCROLL NUR IM PANEL */

body.p4x-app .p4x-output-block {
    margin-top: 0.8rem;
    border-radius: 22px;
    padding: 1.2rem 1.1rem 1.3rem;
    background: rgba(5,7,16,0.88);
    border: 1px solid rgba(255,255,255,0.20);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.95),
        inset 0 0 0 1px rgba(255,255,255,0.06);

    flex: 1 1 auto;
    max-height: 55vh;      /* WICHTIG: begrenzt, damit nur Panel scrollt */
    overflow-y: auto;
}

body.p4x-app .p4x-output-title {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245,245,247,0.78);
}

body.p4x-app .p4x-output {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f4f6ff;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-right: 0.75rem;
}

/* Scrollbar im Panel */

body.p4x-app .p4x-output::-webkit-scrollbar {
    width: 6px;
}
body.p4x-app .p4x-output::-webkit-scrollbar-track {
    background: transparent;
}
body.p4x-app .p4x-output::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.35);
    border-radius: 999px;
}

/* Loader unterhalb Eingabe */

body.p4x-app .p4x-loader-wrapper {
    margin-top: 1.0rem;
    margin-bottom: 0.6rem;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1.4rem;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.p4x-app .p4x-loader-wrapper.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body.p4x-app .p4x-candle-strip {
    flex: 0 0 auto;
    width: 190px;
    height: 82px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

body.p4x-app .p4x-candle {
    position: relative;
    width: 6px;
    border-radius: 3px;
    margin: 0 2px;
    transform-origin: bottom center;
    transition: height 0.25s ease;
}

body.p4x-app .p4x-candle::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -10px;
    bottom: -10px;
    width: 2px;
    background: rgba(255,255,255,0.85);
}

body.p4x-app .p4x-candle-up {
    background: linear-gradient(180deg,#46ff9c 0%,#009850 100%);
    box-shadow:
        0 0 8px rgba(0,255,150,0.9),
        0 0 18px rgba(0,255,150,0.55);
}

body.p4x-app .p4x-candle-down {
    background: linear-gradient(180deg,#ff6b6b 0%,#b62323 100%);
    box-shadow:
        0 0 8px rgba(255,107,107,0.9),
        0 0 18px rgba(255,107,107,0.55);
}

body.p4x-app .p4x-loader-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.15rem;
}

body.p4x-app .p4x-loader-percent {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.12em;
}

body.p4x-app .p4x-loader-text {
    display: none;
}

/* ============================================================
   ADMIN PANEL – FRONTEND
   ============================================================ */

body.p4x-app .p4x-admin-page {
    min-height: 100vh;
    padding: 5.5rem 1.5rem 3rem;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

body.p4x-app .p4x-admin-wrapper {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

body.p4x-app .p4x-admin-notice {
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.35);
    color: #e9fff2;
    font-size: 0.9rem;
    text-align: center;
    backdrop-filter: blur(18px);
}

body.p4x-app .p4x-admin-card {
    padding: 1.4rem 1.7rem 1.7rem;
    border-radius: 26px;
    background:
        linear-gradient(135deg,
            rgba(255,255,255,0.78),
            rgba(210,222,234,0.85));
    border: 1px solid rgba(255,255,255,0.95);
    box-shadow:
        0 20px 45px rgba(0,0,0,0.95),
        inset 0 0 1px rgba(255,255,255,0.9);
    backdrop-filter: blur(28px) saturate(190%);
    color: #111218;
}

body.p4x-app .p4x-admin-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

body.p4x-app .p4x-admin-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

body.p4x-app .p4x-admin-row label {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #333;
}

.p4x-admin-row input,
.p4x-admin-row select,
body.p4x-app .p4x-admin-row textarea {
    font-size: 0.9rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
}

body.p4x-app .p4x-admin-row textarea {
    min-height: 80px;
    resize: vertical;
}

body.p4x-app .p4x-admin-btn {
    margin-top: 0.6rem;
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
}

body.p4x-app .p4x-admin-log-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

body.p4x-app .p4x-admin-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

body.p4x-app .p4x-admin-log-table thead th {
    text-align: left;
    padding: 0.4rem 0.3rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    color: #444;
}

body.p4x-app .p4x-admin-log-table tbody td {
    padding: 0.35rem 0.3rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* ============================================================
   PROFILE OVERLAY
   ============================================================ */

body.p4x-app .p4x-profile-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: radial-gradient(circle at top,
                rgba(0,0,0,0.78),
                rgba(0,0,0,0.92));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 999;
}

body.p4x-app .p4x-profile-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.p4x-app .p4x-profile-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    padding: 1.6rem 1.5rem 1.5rem;
    border-radius: 28px;
    background:
        linear-gradient(145deg,
            rgba(255,255,255,0.94),
            rgba(214,222,232,0.90));
    border: 1px solid rgba(255,255,255,0.96);
    box-shadow:
        0 26px 64px rgba(0,0,0,0.95),
        inset 0 0 1px rgba(255,255,255,0.95);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    color: #111219;
    overflow-y: auto;
}

body.p4x-app .p4x-profile-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: rgba(20,22,30,0.7);
    transition: transform 0.15s ease, color 0.15s ease;
}

body.p4x-app .p4x-profile-close:hover {
    transform: scale(1.08);
    color: rgba(20,22,30,0.95);
}

body.p4x-app .p4x-profile-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #151720;
}

/* ============================================================
   INTRO VIDEO OVERLAY
   ============================================================ */

body.p4x-app .p4x-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.p4x-intro-overlay video,
body.p4x-app #p4x-intro-video {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    display: block;
}

body.p4x-app .p4x-intro-overlay.intro-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.p4x-intro-running .p4x-start-wrapper,
body.p4x-intro-running .p4x-topbar,
body.p4x-intro-running #p4x-login-main,
body.p4x-app body.p4x-intro-running #p4x-paragraph-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

body.intro-finished .p4x-start-wrapper,
body.intro-finished .p4x-topbar,
body.intro-finished #p4x-login-main,
body.p4x-app body.intro-finished #p4x-paragraph-btn {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.8s ease;
}

/* ============================================================
   RESPONSIVE – MOBILE
   ============================================================ */

@media (max-width: 768px) {

body.p4x-app body {
        background-position: 90% auto;
        background-size: 52% top;
    }

body.p4x-app #p4x-login-main.p4x-btn-main {
        top: 71vh;
        padding: 16px 34px;
        font-size: 1.05rem;
    }

body.p4x-app .p4x-topbar {
        top: 0.6rem;
        right: 0.6rem;
        gap: 0.35rem;
    }

body.p4x-app .p4x-credits {
        top: 0.6rem;
        left: 0.6rem;
        padding: 0.3rem 0.8rem;
        font-size: 0.72rem;
        max-width: 40vw;
    }

body.p4x-app .p4x-btn-glass-round {
        width: 42px;
        height: 42px;
    }

body.p4x-app .p4x-mode-btn {
        width: 40px;
        height: 40px;
    }

    .p4x-logout-btn,
    .p4x-topbar [data-logout],
body.p4x-app .p4x-topbar .p4x-btn-logout {
        padding: 4px 12px;
        font-size: 0.74rem;
    }

body.p4x-app .p4x-dashboard-wrapper {
        padding-top: 4.5rem;
        padding-bottom: 1.4rem;
    }

body.p4x-app .p4x-dashboard-inner {
        max-width: 360px;
    }

body.p4x-app .p4x-carousel-track {
        height: 380px;
    }

body.p4x-app .p4x-carousel-slide {
        width: 88%;
    }

body.p4x-app .p4x-carousel-slide.is-left {
        transform: translateX(-135%) scale(0.78);
    }

body.p4x-app .p4x-carousel-slide.is-right {
        transform: translateX(35%) scale(0.78);
    }

body.p4x-app .p4x-dashboard-card {
        border-radius: 28px;
        padding: 1.3rem 1.4rem 1.5rem;
    }

body.p4x-app .p4x-dashboard-card-title {
        font-size: 1.0rem;
    }

body.p4x-app .p4x-dashboard-card-sub {
        font-size: 0.86rem;
    }

body.p4x-app .p4x-module-wrapper {
        padding-top: 4.8rem;
        padding-bottom: 1.6rem;
    }

body.p4x-app .p4x-module-card {
        padding: 1.6rem 1.4rem 1.8rem;
        border-radius: 22px;
        max-width: 480px;
    }

body.p4x-app .p4x-module-title {
        font-size: 1.25rem;
        letter-spacing: 0.16em;
    }

body.p4x-app .p4x-coin-input {
        border-radius: 18px;
    }

body.p4x-app .p4x-admin-page {
        padding-top: 4.4rem;
        padding-bottom: 2.1rem;
    }

body.p4x-app .p4x-admin-wrapper {
        padding: 0 1rem 2.3rem;
        gap: 1.4rem;
    }

body.p4x-app .p4x-admin-card {
        padding: 1rem 1.2rem 1.3rem;
        border-radius: 22px;
    }

body.p4x-app .p4x-profile-panel {
        padding: 1.4rem 1.2rem 1.3rem;
        border-radius: 22px;
    }
}

/* ============================================================
   DESKTOP FEINTUNING
   ============================================================ */

@media (min-width: 1024px) {

body.p4x-app .p4x-start-wrapper {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-top: 3.5rem;
        padding-bottom: 3rem;
    }

    .p4x-dashboard-wrapper,
body.p4x-app .p4x-module-wrapper {
        padding-top: 5.5rem;
        padding-bottom: 3rem;
    }

body.p4x-app .p4x-dashboard-carousel {
        max-width: 520px;
    }

body.p4x-app .p4x-carousel-track {
        height: 440px;
    }

body.p4x-app .p4x-credits {
        top: 20px;
        left: 24px;
    }

body.p4x-app .p4x-topbar {
        top: 20px;
        right: 24px;
    }
}

/* ============================================================
   FINAL OVERRIDES – Dashboard, Module, Early Bird, Admin
   ============================================================ */

/* 0) Seite darf normal scrollen, keine doppelten 100vh-Zwänge */
html,
body.p4x-app body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* ============================================================
   1) MODULE – zentriert, Ausgabe scrollt nur im Panel
   ============================================================ */

body.p4x-app .p4x-module-wrapper {
    min-height: 100vh !important;
    max-height: none !important;
    padding-top: 6rem !important;      /* Platz für Topbar */
    padding-bottom: 3rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;      /* Seite scrollt, nicht der Wrapper */
}

body.p4x-app .p4x-module-card {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Titel mittig */
body.p4x-app .p4x-module-title {
    text-align: center !important;
    margin-bottom: 1.5rem !important;
}

/* Early-Bird-Titel mit Adler links/rechts */
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title {
    position: relative !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
}

.p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::before,
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::after {
    content: "🦅";
    position: absolute;
    top: -0.12em;
    font-size: 1.3rem;
}

body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::before {
    left: -1.8rem;
}
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::after {
    right: -1.8rem;
}

/* Ausgabe-Rahmen selbst nicht scrollen */
body.p4x-app .p4x-output-block {
    margin-top: 1rem !important;
    margin-bottom: 1.4rem !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Scroll nur im Text-Bereich */
body.p4x-app .p4x-output {
    min-height: 220px !important;
    max-height: 55vh !important;
    overflow-y: auto !important;
    padding-right: 1rem !important;

    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #f4f6ff !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

body.p4x-app .p4x-output::-webkit-scrollbar {
    width: 6px;
}
body.p4x-app .p4x-output::-webkit-scrollbar-track {
    background: transparent;
}
body.p4x-app .p4x-output::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.35);
    border-radius: 999px;
}

/* Early-Bird-Kurztext besser lesbar */
.p4x-module-wrapper[data-module="early_bird"] .p4x-module-card p,
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-card li {
    color: #f7f9ff !important;
    font-weight: 500 !important;
    text-shadow: 0 0 14px rgba(0,0,0,0.9) !important;
}
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-card strong {
    font-weight: 700 !important;
}

/* Loader direkt unter der Steuerung */
body.p4x-app .p4x-module-wrapper .p4x-loader-wrapper {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

/* ============================================================
   2) DASHBOARD – Karten/Carousel zentriert
   ============================================================ */

/* Grundlayout Dashboard – immer Spalte in der Mitte */
body.p4x-app .p4x-dashboard-wrapper {
    min-height: 100vh !important;
    padding: 6rem 1.5rem 3rem !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: visible !important;
}

body.p4x-app .p4x-dashboard-inner {
    width: 100% !important;
    max-width: 520px !important;      /* gleiche Breite wie Module */
    margin: 0 auto !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.2rem !important;
}

/* Falls Grid ohne Carousel genutzt wird */
body.p4x-app .p4x-dashboard-grid {
    width: 100% !important;
}

/* Karten folgen der mittigen Spalte */
body.p4x-app .p4x-dashboard-card {
    width: 100% !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Carousel-Container ebenfalls an Spaltenbreite binden */
.p4x-dashboard-carousel,
body.p4x-app .p4x-carousel-track {
    width: 100% !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================================
   3) FRONTEND-ADMIN – zentriert wie Module
   ============================================================ */

body.p4x-app .p4x-admin-page {
    min-height: 100vh !important;
    padding-top: 6rem !important;
    padding-bottom: 3rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
}

body.p4x-app .p4x-admin-wrapper {
    width: 100% !important;
    max-width: 720px !important;
    margin: 0 auto !important;
}

/* ============================================================
   4) TOPBAR & CREDITS – fix in den Ecken (Desktop)
   ============================================================ */

@media (min-width: 1024px) {
body.p4x-app .p4x-credits {
        position: fixed !important;
        top: 20px !important;
        left: 24px !important;
        z-index: 50 !important;
    }

body.p4x-app .p4x-topbar {
        position: fixed !important;
        top: 20px !important;
        right: 24px !important;
        left: auto !important;
        z-index: 50 !important;
    }
}

/* Topbar grundsätzlich sichtbar halten */
body.p4x-app .p4x-topbar {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    z-index: 100 !important;
}

.p4x-topbar .p4x-btn-glass-round,
.p4x-topbar .p4x-mode-btn,
.p4x-topbar button,
body.p4x-app .p4x-topbar a {
    color: #ffffff !important;
    font-size: 1rem !important;
}

body.p4x-app .p4x-credits {
    z-index: 100 !important;
}

/* ============================================================
   5) MOBILE-FEINTUNING – Dashboard & Module auf Handy
   ============================================================ */

@media (max-width: 768px) {

    /* mehr Luft unter der Topbar, Spalte leicht nach unten */
body.p4x-app .p4x-dashboard-wrapper {
        padding-top: 5.2rem !important;
        padding-bottom: 1.8rem !important;
        justify-content: flex-start !important;
    }

    /* mittige, etwas schmalere Spalte */
body.p4x-app .p4x-dashboard-inner {
        max-width: 380px !important;
        align-items: center !important;
    }

body.p4x-app .p4x-dashboard-card {
        max-width: 360px !important;
        border-radius: 26px !important;
        padding: 1rem 1.2rem !important;
        box-sizing: border-box !important;
        margin-bottom: 0.8rem !important;
    }

body.p4x-app .p4x-dashboard-card-title {
        font-size: 0.95rem !important;
        text-align: center !important;
    }

body.p4x-app .p4x-dashboard-card-sub {
        font-size: 0.82rem !important;
        text-align: center !important;
    }

    /* Module & Admin: etwas weniger Top-Abstand */
    .p4x-module-wrapper,
body.p4x-app .p4x-admin-page {
        padding-top: 4.8rem !important;
        padding-bottom: 2.3rem !important;
    }

    .p4x-module-card,
body.p4x-app .p4x-admin-wrapper {
        max-width: 100% !important;
    }

    /* Topbar & Credits ein wenig näher an den Rand */
body.p4x-app .p4x-credits {
        top: 0.6rem !important;
        left: 0.6rem !important;
    }

body.p4x-app .p4x-topbar {
        top: 0.6rem !important;
        right: 0.6rem !important;
    }
}

/* ============================================================
   ULTIMATIVER DESKTOP-CENTER-FIX – Dashboard-Karten/Carousel
   ============================================================ */
@media (min-width: 1024px) {

    /* Der Dashboard-Wrapper richtet seinen Inhalt zentriert aus */
body.p4x-app .p4x-dashboard-wrapper {
        text-align: center !important;        /* zentriert inline-block-Kind */
    }

    /* Egal welches Element deine Karten wirklich enthält
       (inner, grid oder carousel) – wir machen es zum
       zentrierbaren Block in fester Max-Breite */
    .p4x-dashboard-inner,
    .p4x-dashboard-grid,
body.p4x-app .p4x-dashboard-carousel {
        display: inline-block !important;     /* wird durch text-align zentriert */
        text-align: left !important;          /* Inhalt darin wieder „normal“ */
        width: auto !important;
        max-width: 520px !important;          /* wie die Modul-Cards */
        margin: 0 auto !important;
        vertical-align: middle !important;
    }

    /* einzelne Dashboard-Karte */
body.p4x-app .p4x-dashboard-card {
        width: 100% !important;
        max-width: 520px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Carousel-Spur ebenfalls in diese Breite einsperren */
body.p4x-app .p4x-carousel-track {
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto !important;
    }
}
/* ============================================================
   DESKTOP HARD-FIX – Dashboard/Carousel exakt in Bildschirmmitte
   ============================================================ */
@media (min-width: 1024px) {

    /* Wrapper ist nur Hintergrund, keine Ausrichtung mehr */
body.p4x-app .p4x-dashboard-wrapper {
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    /* egal, welches Element die Karten tatsächlich enthält:
       wir hängen es FIX in die Bildschirmmitte */
    .p4x-dashboard-inner,
    .p4x-dashboard-carousel,
body.p4x-app .p4x-dashboard-grid {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;

        width: 100% !important;
        max-width: 520px !important;   /* gleiche Breite wie Modul-Cards */
        margin: 0 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.2rem !important;
        z-index: 10 !important;
    }

    /* einzelne Dashboard-Karten folgen der Spalte */
body.p4x-app .p4x-dashboard-card {
        width: 100% !important;
        max-width: 520px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Carousel-Spur ebenfalls in diese Breite sperren */
body.p4x-app .p4x-carousel-track {
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto !important;
    }
}

/* ============================================================
   TOPBAR ICONS – FINAL FIX (alle Browser, Desktop + Mobile)
   ============================================================ */

/* Buttons/Glaskreise selber korrekt anzeigen */
.p4x-topbar .p4x-btn-glass-round,
.p4x-topbar .p4x-mode-btn,
.p4x-topbar button,
body.p4x-app .p4x-topbar a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #ffffff !important;       /* Icon-Farbe */
}

/* Innere Icon-Elemente (FontAwesome, SVG, Emoji-Spans etc.) */
.p4x-topbar i,
.p4x-topbar svg,
.p4x-topbar span,
body.p4x-app .p4x-topbar .p4x-mode-icon-inner {
    display: inline-block !important;
    font-size: 1.2rem !important;    /* gut sichtbare Größe */
    line-height: 1 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Emoji im Mode-Button (☀️ / 🌙) explizit sichtbar erzwingen */
body.p4x-app .p4x-topbar .p4x-mode-icon-inner::before {
    display: inline-block !important;
    font-size: 1.3rem !important;
    line-height: 1 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================================
   A) CAROUSEL-PFEILE IMMER SICHTBAR (VOR DEN KARTEN)
   ============================================================ */
body.p4x-app .p4x-carousel-arrow {
    z-index: 30 !important;     /* über den Cards */
    opacity: 1 !important;
    visibility: visible !important;
}

/* falls irgendwas sie versteckt */
.p4x-carousel-arrow--prev,
body.p4x-app .p4x-carousel-arrow--next {
    display: flex !important;
}

/* ============================================================
   B) TOPBAR ICONS – ICONS ERZWUNGEN MIT EMOJI
   ============================================================ */

/* Die runden Buttons in der Topbar bekommen feste Emojis:
   1. Button: Profil
   2. Button: Sprache */
body.p4x-app .p4x-topbar .p4x-btn-glass-round {
    position: relative !important;
    font-size: 0 !important;          /* evtl. vorhandener Text wird versteckt */
    overflow: hidden !important;
}

body.p4x-app .p4x-topbar .p4x-btn-glass-round::before {
    content: "" !important;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    color: #ffffff;
}

/* 1. runder Button in der Topbar = Profil */
body.p4x-app .p4x-topbar .p4x-btn-glass-round:nth-of-type(1)::before {
    content: "👤" !important;
}

/* 2. runder Button in der Topbar = Sprache/Globus */
body.p4x-app .p4x-topbar .p4x-btn-glass-round:nth-of-type(2)::before {
    content: "🌐" !important;
}

/* Mode-Button (Dark/Light) – Icon rein über ::before steuern */
body.p4x-app .p4x-topbar .p4x-mode-btn {
    position: relative !important;
    font-size: 0 !important;
    overflow: hidden !important;
}

body.p4x-app body[data-theme="light"] .p4x-topbar .p4x-mode-btn::before {
    content: "☀️" !important;
}

body.p4x-app body[data-theme="dark"] .p4x-topbar .p4x-mode-btn::before {
    content: "🌙" !important;
}

body.p4x-app .p4x-topbar .p4x-mode-btn::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    color: #ffffff;
}

/* Logout-Button – Text sicher sichtbar lassen */
.p4x-topbar .p4x-logout-btn,
.p4x-topbar [data-logout],
body.p4x-app .p4x-topbar .p4x-btn-logout {
    color: #ffffff !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.16em !important;
}

/* ============================================================
   FINAL ICON / EMOJI FIX – ICONS GARANTIERT SICHTBAR
   ============================================================ */

/* 1) ALLE zerstörenden Regeln neutralisieren */
.p4x-topbar .p4x-btn-glass-round,
body.p4x-app .p4x-topbar .p4x-mode-btn {
    font-size: unset !important;
    color: unset !important;
}

.p4x-topbar i,
.p4x-topbar span,
body.p4x-app .p4x-topbar svg {
    font-size: 1.2rem !important;
    color: #ffffff !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 2) Buttons komplett emoji-gesteuert */
body.p4x-app .p4x-topbar .p4x-btn-glass-round {
    position: relative !important;
    overflow: hidden !important;
}

body.p4x-app .p4x-topbar .p4x-btn-glass-round > * {
    display: none !important; /* versteckt alles interne alte HTML */
}

/* Profil-Icon */
body.p4x-app .p4x-topbar .p4x-btn-glass-round:nth-of-type(1)::before {
    content: "👤" !important;
}

/* Sprache-Icon */
body.p4x-app .p4x-topbar .p4x-btn-glass-round:nth-of-type(2)::before {
    content: "🌐" !important;
}

/* Darstellung der Icons */
body.p4x-app .p4x-topbar .p4x-btn-glass-round::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
}

/* 3) MODE-BUTTON */
body.p4x-app .p4x-topbar .p4x-mode-btn {
    position: relative !important;
    overflow: hidden !important;
}

body.p4x-app .p4x-topbar .p4x-mode-btn > * {
    display: none !important;
}

body.p4x-app body[data-theme="light"] .p4x-topbar .p4x-mode-btn::before {
    content: "☀️" !important;
}

body.p4x-app body[data-theme="dark"] .p4x-topbar .p4x-mode-btn::before {
    content: "🌙" !important;
}

body.p4x-app .p4x-topbar .p4x-mode-btn::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
}

/* 4) Logout normal lassen */
.p4x-topbar .p4x-logout-btn,
.p4x-topbar [data-logout],
body.p4x-app .p4x-topbar .p4x-btn-logout {
    font-size: 0.8rem !important;
    color: #ffffff !important;
}

/* ============================================================
   P4X ICON RESET – ALLES WIEDER SICHTBAR
   ============================================================ */

/* Buttons: wieder normale Schriftgröße, nichts verstecken */
.p4x-topbar .p4x-btn-glass-round,
body.p4x-app .p4x-topbar .p4x-mode-btn {
    font-size: 1rem !important;
    color: #ffffff !important;
    overflow: visible !important;
}

/* Inhalte IN den Buttons wieder anzeigen */
.p4x-topbar .p4x-btn-glass-round > *,
body.p4x-app .p4x-topbar .p4x-mode-btn > * {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Alle ::before-Experimente für die Topbar deaktivieren */
.p4x-topbar .p4x-btn-glass-round::before,
body.p4x-app .p4x-topbar .p4x-mode-btn::before {
    content: none !important;
}

/* Mode-Icon wieder normal anzeigen lassen (☀️ / 🌙 aus deinem alten Code) */
body.p4x-app .p4x-mode-icon-inner {
    display: inline-block !important;
    font-size: 1.4rem !important;
    line-height: 1 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* =====================
   PATCH: Toolbar icons visibility + Admin log dropdown scroll + Crypto Pump Radar
   ===================== */

/* Toolbar: do not hide icons/text */
body.p4x-app .p4x-btn-glass-round {
  font-size:18px !important;
  line-height:1 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

/* Admin log: dropdown + scroll */
body.p4x-app .p4x-admin-log-dropdown { margin-top: 10px; }
body.p4x-app .p4x-admin-log-summary {
  cursor:pointer;
  user-select:none;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.18);
  list-style:none;
}
body.p4x-app .p4x-admin-log-dropdown > summary::-webkit-details-marker { display:none; }
.p4x-admin-log-dropdown-inner,
body.p4x-app .p4x-admin-log-table-wrapper {
  max-height: 60vh !important;
  overflow: auto !important;
}
@media (max-width: 768px){
  .p4x-admin-log-dropdown-inner,
body.p4x-app .p4x-admin-log-table-wrapper {
    max-height: 50vh !important;
  }
}

/* Module input row: stronger mobile responsiveness */
@media (max-width: 544px){
body.p4x-app .p4x-input-row {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
body.p4x-app .p4x-coin-input {
    width: 100% !important;
    max-width: 100% !important;
  }
body.p4x-app .p4x-go-btn {
    width: 100% !important;
  }
}

/* Modul 4 (early_bird): freies Eingabefeld */
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] textarea.p4x-coin-input {
  min-height: 110px;
  resize: vertical;
  border-radius: 18px;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  line-height: 1.35;
}

/* Kurzbeschreibung unter dem Feld */
body.p4x-app .p4x-earlybird-desc {
  margin: -0.6rem 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(245,245,247,0.92);
  text-shadow: 0 0 14px rgba(0,0,0,0.85);
}
/* Modul 4 (early_bird): Adler-Icons komplett deaktivieren */
.p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::before,
body.p4x-app .p4x-module-wrapper[data-module="early_bird"] .p4x-module-title::after {
  content: none !important;
  display: none !important;
}

/* ============================================================
   TOPBAR STABILISIERUNG (Fix: keine Überlappung/kein Verschieben)
   ============================================================ */
body.p4x-app .p4x-topbar {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}
.p4x-topbar .p4x-btn-glass-round,
body.p4x-app .p4x-topbar .p4x-mode-btn {
  flex:0 0 auto !important;
}



/* ============================================================
   FINAL TOPBAR FIX (OVERRIDE) – NO OVERLAPS, NO ICON SWAPS
   ============================================================ */
body.p4x-app .p4x-topbar {
  position: fixed !important;
  top: 0.8rem !important;
  right: 0.8rem !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap: 0.55rem !important;
  flex-wrap: nowrap !important;
  z-index: 9999 !important;
  padding-top: env(safe-area-inset-top) !important;
  padding-right: env(safe-area-inset-right) !important;
}

body.p4x-app .p4x-credits {
  position: fixed !important;
  top: 0.8rem !important;
  left: 0.8rem !important;
  z-index: 9998 !important;
  max-width: 48vw !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Buttons – stable square hit area */
.p4x-topbar .p4x-btn-glass-round,
body.p4x-app .p4x-topbar .p4x-mode-btn {
  width: var(--p4x-topbar-size) !important;
  height: var(--p4x-topbar-size) !important;
  min-width: var(--p4x-topbar-size) !important;
  min-height: var(--p4x-topbar-size) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Disable all pseudo icon hacks */
.p4x-topbar .p4x-btn-glass-round::before,
.p4x-topbar .p4x-btn-glass-round::after,
.p4x-topbar .p4x-mode-btn::before,
body.p4x-app .p4x-topbar .p4x-mode-btn::after {
  content: none !important;
  display: none !important;
}

/* Ensure real icon content is visible */
.p4x-topbar .p4x-btn-glass-round,
body.p4x-app .p4x-topbar .p4x-mode-btn {
  font-size: 18px !important;
}
.p4x-topbar .p4x-btn-glass-round > *,
body.p4x-app .p4x-topbar .p4x-mode-btn > * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Mobile */
@media (max-width: 420px){
  :root{ --p4x-topbar-size: 42px; }
body.p4x-app .p4x-topbar { top: 0.6rem !important; right: 0.6rem !important; gap: 0.45rem !important; }
body.p4x-app .p4x-credits { top: 0.6rem !important; left: 0.6rem !important; max-width: 44vw !important; }
body.p4x-app .p4x-credits-label { display:none !important; }
}
/* ============================================================
   MOBILE TOOLBAR FIX v2 (Credits sichtbar + Logout kompakt)
   Wichtig: MUSS ganz am Ende der Datei stehen.
   ============================================================ */

/* Grundlayout: Topbar rechts fix, Credits links fix */
body.p4x-app .p4x-topbar {
  position: fixed !important;
  top: 0.8rem !important;
  right: 0.8rem !important;
  left: auto !important;
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.55rem !important;
  flex-wrap: nowrap !important;
  z-index: 9999 !important;
  padding-top: env(safe-area-inset-top) !important;
  padding-right: env(safe-area-inset-right) !important;
}

body.p4x-app .p4x-credits {
  position: fixed !important;
  top: 0.8rem !important;
  left: 0.8rem !important;
  right: auto !important;
  z-index: 9998 !important;
  max-width: 52vw !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Logout-Pill: immer in der Toolbar, aber nie „zu groß“ */
.p4x-topbar .p4x-logout-btn,
.p4x-topbar [data-logout],
.p4x-topbar .p4x-btn-logout,
.p4x-topbar a.p4x-logout-btn,
body.p4x-app .p4x-topbar button.p4x-logout-btn {
  height: var(--p4x-topbar-size, 46px) !important;
  max-height: var(--p4x-topbar-size, 46px) !important;
  padding: 0 14px !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 120px !important;
}

/* Mobile – iPhone: Credits muss sichtbar bleiben, Logout kompakter */
@media (max-width: 520px){
  :root{ --p4x-topbar-size: 40px; }

body.p4x-app .p4x-topbar {
    top: 0.55rem !important;
    right: 0.55rem !important;
    gap: 0.40rem !important;
  }

body.p4x-app .p4x-credits {
    top: 0.55rem !important;
    left: 0.55rem !important;
    max-width: 56vw !important; /* mehr Platz für Credits */
    padding: 0.28rem 0.55rem !important;
  }

body.p4x-app .p4x-credits-label { display:none !important; }

  .p4x-topbar .p4x-btn-glass-round,
body.p4x-app .p4x-topbar .p4x-mode-btn {
    width: var(--p4x-topbar-size) !important;
    height: var(--p4x-topbar-size) !important;
    min-width: var(--p4x-topbar-size) !important;
    min-height: var(--p4x-topbar-size) !important;
    font-size: 17px !important;
  }

  .p4x-topbar .p4x-logout-btn,
  .p4x-topbar [data-logout],
body.p4x-app .p4x-topbar .p4x-btn-logout {
    padding: 0 10px !important;
    font-size: 0.70rem !important;
    max-width: 92px !important; /* verhindert „LOGOUT“ Mega-Breite */
    letter-spacing: 0.04em !important;
  }
}

/* Ultra small */
@media (max-width: 360px){
body.p4x-app .p4x-credits { max-width: 52vw !important; }
  .p4x-topbar .p4x-logout-btn,
  .p4x-topbar [data-logout],
body.p4x-app .p4x-topbar .p4x-btn-logout { max-width: 82px !important; }
}


/* ============================================================
   TEST 5 – BITGET FUTURES ENGINE UI
   ============================================================ */

body.p4x-app .p4x-test5-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

body.p4x-app .p4x-test5-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.p4x-test5-controls select,
body.p4x-app .p4x-test5-controls input {
    min-width: 110px;
    max-width: 180px;
}

body.p4x-app .p4x-live-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

body.p4x-app .p4x-top-btn {
    min-width: 100px;
}

body.p4x-app .p4x-test5-api {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.p4x-app .p4x-api-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.p4x-app .p4x-api-panel input {
    width: 100%;
}

body.p4x-app .p4x-api-hint {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.35;
}

/* ==========================================================
   TEST 5 – Bitget Futures Engine UI (Cards + Modal)
   ========================================================== */

body.p4x-app .p4x-test5-head {margin:6px 0 14px 0;padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.04)}
body.p4x-app .p4x-test5-head__title {font-weight:700;font-size:14px;margin-bottom:4px}
body.p4x-app .p4x-test5-head__meta {font-size:12px;opacity:.85;margin-bottom:8px}
body.p4x-app .p4x-test5-head__status {display:flex;flex-wrap:wrap;gap:8px}
body.p4x-app .p4x-test5-pill {font-size:11px;padding:4px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.14);opacity:.8}
body.p4x-app .p4x-test5-pill.is-on {opacity:1;border-color:rgba(255,255,255,.35)}

body.p4x-app .p4x-test5-cards {display:grid;grid-template-columns:1fr;gap:10px}
body.p4x-app .p4x-test5-card {border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(0,0,0,.22);padding:12px}
body.p4x-app .p4x-test5-card__top {display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
body.p4x-app .p4x-test5-card__symbol {font-weight:800;font-size:14px;letter-spacing:.2px}
body.p4x-app .p4x-test5-card__badge {font-size:12px;opacity:.85}
body.p4x-app .p4x-test5-card__grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;margin-bottom:10px}
body.p4x-app .p4x-test5-card__grid span {display:block;font-size:11px;opacity:.7;margin-bottom:2px}
body.p4x-app .p4x-test5-card__grid strong {font-size:12px}
body.p4x-app .p4x-test5-card__why {font-size:12px;opacity:.92;line-height:1.35;margin:8px 0 10px 0}
body.p4x-app .p4x-test5-card__actions {display:flex;gap:10px;flex-wrap:wrap}
body.p4x-app .p4x-test5-card__chart {margin:10px 0 8px 0;padding:10px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.03)}
body.p4x-app .p4x-test5-chart {width:100%;height:120px;display:block;border-radius:10px}
body.p4x-app .p4x-test5-chart__legend {display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:8px;font-size:11px;opacity:.85}
body.p4x-app .p4x-test5-chart__legend span {display:flex;align-items:center;gap:6px}
body.p4x-app .p4x-test5-dot {width:9px;height:9px;border-radius:999px;display:inline-block;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.25)}
body.p4x-app .p4x-test5-dot.is-entry {background:rgba(120,200,120,.85)}
body.p4x-app .p4x-test5-dot.is-sl {background:rgba(255,90,90,.85)}
body.p4x-app .p4x-test5-dot.is-tp {background:rgba(120,170,255,.85)}


body.p4x-app .p4x-test5-btn {appearance:none;border:1px solid rgba(255,255,255,.2);border-radius:10px;padding:8px 10px;font-size:12px;font-weight:700;background:rgba(255,255,255,.06);color:inherit;cursor:pointer}
body.p4x-app .p4x-test5-btn:disabled {opacity:.55;cursor:not-allowed}
body.p4x-app .p4x-test5-btn--ghost {background:transparent}
body.p4x-app .p4x-test5-btn--danger {border-color:rgba(255,255,255,.25);background:rgba(255,90,90,.18)}

body.p4x-app .p4x-test5-note {margin-top:10px;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);font-size:12px;line-height:1.35}

/* Modal */
body.p4x-app .p4x-test5-modal {position:fixed;inset:0;z-index:99999;display:none}
body.p4x-app .p4x-test5-modal.is-open {display:block}
body.p4x-app .p4x-test5-modal__backdrop {position:absolute;inset:0;background:rgba(0,0,0,.65)}
body.p4x-app .p4x-test5-modal__dialog {position:relative;max-width:520px;margin:8vh auto 0 auto;background:rgba(15,15,18,.96);border:1px solid rgba(255,255,255,.14);border-radius:14px;overflow:hidden}
body.p4x-app .p4x-test5-modal__header {display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.10)}
body.p4x-app .p4x-test5-modal__title {font-weight:900;font-size:13px;letter-spacing:.3px}
body.p4x-app .p4x-test5-modal__close {background:transparent;border:0;color:inherit;font-size:22px;line-height:22px;cursor:pointer;opacity:.85}
body.p4x-app .p4x-test5-modal__body {padding:14px}
body.p4x-app .p4x-test5-modal__warning {padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(255,90,90,.12);font-size:12px;line-height:1.4;margin-bottom:12px}
body.p4x-app .p4x-test5-modal__accept {display:flex;gap:10px;align-items:flex-start;font-size:12px;line-height:1.35;margin-top:10px}
body.p4x-app .p4x-test5-modal__footer {display:flex;justify-content:flex-end;gap:10px;padding:12px 14px;border-top:1px solid rgba(255,255,255,.10)}

body.p4x-app .p4x-test5-summary__row {display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed rgba(255,255,255,.12)}
body.p4x-app .p4x-test5-summary__row span {font-size:11px;opacity:.75}
body.p4x-app .p4x-test5-summary__row strong {font-size:12px}

@media (min-width: 880px){
body.p4x-app .p4x-test5-cards {grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* ============================================================
   TEST 5 – Tooltips
   ============================================================ */
body.p4x-app .p4x-tip {
  width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  cursor: pointer;
  padding: 0;
}
body.p4x-app .p4x-tipbox {
  position: absolute;
  z-index: 9999;
  top: 28px;
  right: 0;
  max-width: 280px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
body.p4x-app .p4x-tipbox::after {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: rgba(0,0,0,0.85);
}

/* TEST 5 – AUTO toggle styling */
body.p4x-app .p4x-auto-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
}
body.p4x-app .p4x-auto-switch input {
  width: 18px;
  height: 18px;
}
body.p4x-app .p4x-auto-switch span {
  font-weight: 600;
  letter-spacing: 0.02em;
}
body.p4x-app .p4x-test5-card__meta2 {
  font-size: 12px;
  opacity: 0.95;
  margin-top: 6px;
}


/* ============================================================
   TEST 5 – API DROPDOWN (clean)
   ============================================================ */
body.p4x-app .p4x-test5-api {grid-column:1 / -1;margin-top:10px;}
body.p4x-app .p4x-api-toggle {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(10,14,24,.55);
  color:#fff;
  font-weight:600;
  letter-spacing:.2px;
}
body.p4x-app .p4x-api-toggle:after {
  content:"▾";
  opacity:.8;
  font-size:14px;
}
body.p4x-app .p4x-api-panel {
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(10,14,24,.35);
}
body.p4x-app .p4x-api-panel input {
  width:100%;
  margin-top:10px;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#fff;
}
body.p4x-app .p4x-api-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}
body.p4x-app .p4x-test-keys-btn {
  flex:0 0 auto;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-weight:600;
}
body.p4x-app .p4x-api-status {
  flex:1;
  font-size:12px;
  opacity:.9;
  text-align:right;
  white-space:normal;
}


body.p4x-app .p4x-test5-warn {margin-top:10px;padding:10px 12px;border-radius:12px;background:rgba(255,165,0,.12);border:1px solid rgba(255,165,0,.35);font-size:13px;line-height:1.35}


/* === Test 5 (Pulse4x Cube) subtitle + compact GO buttons === */
body.p4x-app .p4x-module-subtitle {
  text-align:center;
  margin-top:-10px;
  margin-bottom:14px;
  font-size:14px;
  letter-spacing:2px;
  opacity:.85;
}

body.p4x-app .p4x-go-btn--small {
  padding:10px 18px !important;
  font-size:14px !important;
  letter-spacing:3px !important;
  width:100% !important;
  max-width:none !important;
}

/* Ensure Test5 action buttons share GO styling */
.p4x-test5-controls .p4x-top-btn,
.p4x-test5-api .p4x-api-toggle,
.p4x-test5-api .p4x-save-keys-btn,
body.p4x-app .p4x-test5-api .p4x-test-keys-btn {
  box-sizing:border-box;
}



/* ===========================
   TEST 5 – UI FIX (Clean / Stable)
   =========================== */

/* Hide GO button for Test 5 (kept in DOM for TOP3 trigger) */
body.p4x-app .p4x-test5-go-hidden { display: none !important; }

/* Ensure Bitget panel truly respects hidden + dropdown state */
body.p4x-app .p4x-api-panel[hidden] { display: none !important; }
body.p4x-app .p4x-test5-api .p4x-api-panel { display: none; }
body.p4x-app .p4x-test5-api.is-open .p4x-api-panel { display: flex; }

/* Controls: left inputs + right toggles + actions below */
body.p4x-app .p4x-test5-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 12px;
    align-items: start;
}

body.p4x-app .p4x-test5-controls__left { grid-column: 1 / 2; display: flex; flex-direction: column; gap: 12px; }
body.p4x-app .p4x-test5-controls__right { grid-column: 2 / 3; display: flex; flex-direction: column; gap: 12px; padding-top: 48px; }

body.p4x-app .p4x-test5-controls__actions { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }

/* Make LIVE/AUTO switches compact and aligned */
.p4x-test5-controls__right .p4x-live-switch,
body.p4x-app .p4x-test5-controls__right .p4x-auto-switch {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0;
    margin: 0;
}

/* Trade button should match TOP3 style */
body.p4x-app .p4x-trade-btn { width: 100%; }


/* ===== Pulse4x Cube – Test 5 Logging (scoped) ===== */
body.p4x-app .p4x-t5log {border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:14px;margin-top:10px}
body.p4x-app .p4x-t5log__head {display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:10px}
body.p4x-app .p4x-t5log__title {font-weight:700;font-size:14px;letter-spacing:.2px}
body.p4x-app .p4x-t5log__btn {border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:8px 10px;background:transparent;color:inherit;cursor:pointer}
body.p4x-app .p4x-t5log__grid {display:grid;grid-template-columns:1fr;gap:12px}
@media(min-width:900px){.p4x-t5log__grid{grid-template-columns:1fr 1fr}}
body.p4x-app .p4x-t5log__card {border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px}
body.p4x-app .p4x-t5log__cardTitle {font-weight:700;font-size:13px;margin-bottom:8px}
body.p4x-app .p4x-t5log__tableWrap {overflow:auto}
body.p4x-app .p4x-t5log__table {width:100%;border-collapse:collapse;font-size:12px}
body.p4x-app .p4x-t5log__table th,.p4x-t5log__table td {padding:8px;border-bottom:1px solid rgba(255,255,255,.06);text-align:left;white-space:nowrap}
body.p4x-app .p4x-t5log__muted {opacity:.7}
body.p4x-app .p4x-t5log__pos {color:#38d39f}
body.p4x-app .p4x-t5log__neg {color:#ff6b6b}

/* ============================================================
   TEST 5 – Trading Brain Cube: Chart Box (visibility hardening)
   ============================================================ */
body.p4x-app .p4x-test5-card__chart {
  display:block;
  min-height:160px;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
}
body.p4x-app .p4x-test5-card__chart:before {
  content:"SETUP CHART";
  display:block;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.75;
  margin-bottom:8px;
}
@media (max-width:520px){
body.p4x-app .p4x-test5-chart {height:140px}
body.p4x-app .p4x-test5-card__chart {min-height:190px}
}


/* Test5 SMC/MTF box */
body.p4x-app .t5smc {margin-top:12px;padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(0,0,0,.18);font-size:13px;line-height:1.35;}
body.p4x-app .t5smc b {font-weight:700;}
