:root {
    color-scheme: dark;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    color: #eef2ff;
    background:
        radial-gradient(circle at top, #20295a 0, #0d1126 42%, #060812 100%);
}

.portal {
    width: min(92vw, 720px);
    padding: 64px 32px;
    text-align: center;
    border: 1px solid rgba(150, 165, 255, 0.22);
    border-radius: 24px;
    background: rgba(12, 16, 36, 0.82);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

.logo{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;

    font-size:2.15rem;      /* ca. 15–20 % kleiner */
    font-weight:700;
    letter-spacing:.08em;
}

.logo-icon{
    width:40px;
    height:40px;
    object-fit:contain;
    flex:0 0 auto;
}

.subtitle {
    margin: 14px 0 36px;
    color: #aeb8dd;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

button,
input {
    font: inherit;
}

.login-button,
.submit-button {
    min-width: 160px;
    padding: 13px 26px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #655cff, #8e5cff);
    box-shadow: 0 10px 30px rgba(101, 92, 255, 0.3);
}

.login-button:hover,
.submit-button:hover {
    filter: brightness(1.12);
}

.login-panel {
    display: none;
    max-width: 390px;
    margin: 34px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(174, 184, 221, 0.2);
    text-align: left;
}

.login-panel.visible {
    display: block;
    animation: appear 220ms ease-out;
}

.login-panel label {
    display: block;
    margin: 0 0 8px;
    color: #cbd3f2;
    font-size: 14px;
}

.login-panel input {
    width: 100%;
    margin-bottom: 20px;
    padding: 13px 14px;
    color: white;
    border: 1px solid #3c466e;
    border-radius: 9px;
    outline: none;
    background: #11162c;
}

.login-panel input:focus {
    border-color: #837cff;
    box-shadow: 0 0 0 3px rgba(131, 124, 255, 0.16);
}

.submit-button {
    width: 100%;
}

.login-error {
    display: none;
    margin-bottom: 20px;
    padding: 11px 13px;
    color: #ffd4d4;
    border: 1px solid rgba(255, 105, 105, 0.4);
    border-radius: 8px;
    background: rgba(125, 25, 35, 0.25);
}

.login-error.visible {
    display: block;
}

.footer {
    margin-top: 42px;
    color: #687194;
    font-size: 12px;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 520px) {
    .portal {
        padding: 46px 22px;
    }
}


/* ============================================================
   ENIGMA MATRIX BACKGROUND
   Ergänzt ausschließlich den animierten Seitenhintergrund.
   ============================================================ */

html {
    background: #060817;
}

body {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 48%,
            rgba(92, 72, 190, 0.12),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #070918 0%,
            #0a0d22 48%,
            #090b1a 100%
        );
}

#enigma-matrix-canvas {
    position: fixed;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.92;
}

.enigma-matrix-ambient {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 18% 24%,
            rgba(40, 196, 255, 0.07),
            transparent 25%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(131, 81, 255, 0.09),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            rgba(5, 8, 24, 0.12),
            rgba(5, 7, 20, 0.44)
        );
}

.enigma-matrix-ambient::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(123, 139, 255, 0.022) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(123, 139, 255, 0.018) 1px,
            transparent 1px
        );
    background-size: 54px 54px;
    mask-image:
        radial-gradient(
            circle at center,
            black,
            transparent 82%
        );
}

/*
 * Vorhandene sichtbare Seitenelemente bleiben zuverlässig
 * oberhalb des Hintergrundes.
 */
body > *:not(#enigma-matrix-canvas):not(.enigma-matrix-ambient) {
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    #enigma-matrix-canvas {
        opacity: 0.52;
    }

    .enigma-matrix-ambient::after {
        background-size: 70px 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #enigma-matrix-canvas {
        display: none;
    }

    .enigma-matrix-ambient {
        background:
            radial-gradient(
                circle at 50% 40%,
                rgba(99, 76, 210, 0.11),
                transparent 42%
            );
    }
}

/* ENIGMA THINK TANK TITLE */
.think-tank-title {
    display: block;
    margin-top: 8px;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #eef0ff;
}
