/* main-index — aus templates/main/index.html ausgelagert */

        :root {
            --accent: #4ca77e;
            --accent-dim: rgba(76, 167, 126, 0.45);
            --accent-faint: rgba(76, 167, 126, 0.12);
            --pine-dim: rgba(76, 167, 126, 0.40);
            --pine-faint: rgba(76, 167, 126, 0.15);
            --bg-deep: #000000;
            --bg-panel: #080f0a;
            --bg-mid: #0d1a10;
            --text: rgba(255, 255, 255, 1);
            --text-dim: rgba(255, 255, 255, 0.70);
            --font-heading: 'Orbitron', 'Courier New', monospace;
            --font-body: 'Courier New', monospace;
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            background: #000;
        }

        body {
            background: transparent;
            font-family: var(--font-body);
            color: var(--text);
            overflow: hidden;
            height: 100vh;
            width: 100vw;
        }

        #three-bg {
            position: fixed;
            inset: 0;
            z-index: 0;
        }

        #three-bg canvas {
            display: block;
            width: 100% !important;
            height: 100% !important;
        }

        .ui {
            position: fixed;
            inset: 0;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* ── Titel ── */
        .eyebrow {
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 10px;
            letter-spacing: 7px;
            color: var(--accent-dim);
            margin-bottom: 22px;
            text-transform: uppercase;
        }

        .title {
            font-family: 'Dune Rise', var(--font-heading);
            font-size: clamp(44px, 8vw, 80px);
            font-weight: 900;
            letter-spacing: 10px;
            color: var(--text);
            text-shadow: 0 0 18px rgba(76, 167, 126, 0.55), 0 0 55px rgba(76, 167, 126, 0.20);
            margin-bottom: 10px;
        }

        .subtitle {
            font-size: 11px;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.30);
            margin-bottom: 48px;
        }

        /* ── Gemeinsame Form-Elemente ── */
        .step {
            width: 100%;
            max-width: 380px;
            text-align: center;
        }

        .step-label {
            display: block;
            font-family: var(--font-heading);
            font-size: 11px;
            letter-spacing: 3px;
            color: rgba(76, 167, 126, 0.75);
            text-transform: uppercase;
            margin-bottom: 16px;
        }

        .field-input {
            width: 100%;
            background: rgba(76, 167, 126, 0.04);
            border: 1px solid rgba(76, 167, 126, 0.22);
            border-radius: 0;
            padding: 13px 18px;
            font-family: 'Courier New', monospace;
            font-size: 17px;
            letter-spacing: 2px;
            color: var(--text);
            text-align: center;
            outline: none;
            transition: border-color .25s, box-shadow .25s;
            caret-color: var(--accent);
        }

        .field-input::placeholder {
            color: rgba(255, 255, 255, 0.38);
            font-size: 13px;
            letter-spacing: 1px;
        }

        .field-input:focus {
            border-color: var(--accent-dim);
            box-shadow: 0 0 0 3px var(--accent-faint);
        }

        .field-input.error {
            border-color: rgba(239, 68, 68, 0.6);
        }

        .field-input.ok {
            border-color: var(--accent);
        }

        .hint {
            font-size: 11px;
            letter-spacing: 1px;
            margin-top: 8px;
            min-height: 16px;
            transition: color .2s;
        }

        .hint.ok {
            color: var(--accent);
        }

        .hint.err {
            color: rgba(239, 68, 68, 0.75);
        }

        .hint.muted {
            color: rgba(255, 255, 255, 0.25);
        }

        .btn-primary {
            margin-top: 10px;
            width: 100%;
            background: rgba(76, 167, 126, 0.06);
            border: 1px solid rgba(76, 167, 126, 0.22);
            color: rgba(255, 255, 255, 0.50);
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 13px;
            letter-spacing: 2px;
            padding: 13px 32px;
            border-radius: 0;
            cursor: pointer;
            transition: color .2s, border-color .2s, background .2s;
        }

        .btn-primary:hover:not(:disabled) {
            color: #fff;
            border-color: var(--accent);
            background: rgba(76, 167, 126, 0.12);
        }

        .btn-primary:disabled {
            opacity: .35;
            cursor: default;
        }

        /* ── Spielauswahl (eingeloggt) ── */
        .greeting {
            font-family: var(--font-heading);
            font-size: 11px;
            letter-spacing: 3px;
            color: var(--text-dim);
            margin-bottom: 28px;
            text-transform: uppercase;
        }

        .greeting span {
            color: var(--accent);
            font-size: 13px;
        }

        .game-buttons {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 28px;
        }

        /* ── Main Game — Sci-Fi Panel ── */
        .btn-game {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            text-align: center;
            padding: 18px 48px 14px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
            transition: border-color .4s ease, background .4s ease, box-shadow .4s ease;
            position: relative;
        }

        .btn-game::before,
        .btn-game::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            pointer-events: none;
            width: 20px;
            height: 2px;
            background: rgba(255, 255, 255, 0.12);
            offset-path: polygon(0px 0px, 100% 0px, 100% 100%, 0px 100%);
            offset-rotate: auto;
            animation: travelBorder 4s linear infinite;
        }

        .btn-game::after {
            animation-delay: -2s;
        }

        @keyframes travelBorder {
            to {
                offset-distance: 100%;
            }
        }

        .btn-game:hover {
            border-color: rgba(255, 255, 255, 0.18);
            background: rgba(255, 255, 255, 0.04);
            box-shadow: 0 0 24px rgba(255, 255, 255, 0.04), inset 0 0 24px rgba(255, 255, 255, 0.02);
        }

        .btn-game:hover::before,
        .btn-game:hover::after {
            background: rgba(255, 255, 255, 0.25);
            width: 36px;
        }

        .btn-game .lbl {
            color: #fff;
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 10px;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 16px 14px rgba(255, 255, 255, 0.04);
            transition: text-shadow .4s ease;
        }

        .btn-game:hover .lbl {
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 16px 20px rgba(255, 255, 255, 0.10);
        }

        .btn-game .icon, .btn-game .desc {
            display: none;
        }

        /* ── Prolog — sekundär ── */
        .btn-game-secondary {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            text-align: center;
        }

        .btn-game-secondary .lbl {
            color: rgba(255, 255, 255, 0.50);
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 13px;
            font-weight: 400;
            letter-spacing: 5px;
            text-shadow: 0 2px 3px rgba(0, 0, 0, 0.4), 0 12px 8px rgba(255, 255, 255, 0.02);
            transition: color .3s ease, text-shadow .3s ease;
        }

        .btn-game-secondary .time {
            margin-top: 2px;
            font-size: 9px;
            letter-spacing: 3px;
            color: rgba(255, 255, 255, 0.18);
            font-family: var(--font-body);
        }

        .btn-game-secondary:hover .lbl {
            color: rgba(255, 255, 255, 0.75);
            text-shadow: 0 2px 3px rgba(0, 0, 0, 0.4), 0 12px 12px rgba(255, 255, 255, 0.06);
        }

        /* ── Top-right buttons ── */
        .top-right {
            position: fixed;
            top: 22px;
            right: 28px;
            z-index: 20;
            display: flex;
            gap: 10px;
        }

        .top-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(76, 167, 126, 0.06);
            border: 1px solid rgba(76, 167, 126, 0.22);
            color: rgba(255, 255, 255, 0.50);
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 13px;
            letter-spacing: 2px;
            padding: 5px 14px;
            border-radius: 0;
            cursor: pointer;
            text-decoration: none;
            transition: color .2s, border-color .2s, background .2s;
        }

        .top-btn:hover {
            color: #fff;
            border-color: var(--accent);
            background: rgba(76, 167, 126, 0.12);
        }

        /* ── Corner tag ── */
        .corner-tag {
            position: fixed;
            top: 18px;
            left: 22px;
            z-index: 20;
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 8px;
            letter-spacing: 3px;
            color: rgba(76, 167, 126, 0.35);
            text-transform: uppercase;
        }

        /* ── Fade-in ── */
        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(14px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .fade-in {
            animation: fadeUp .6s ease both;
        }

        .delay-1 {
            animation-delay: .15s;
        }

        .delay-2 {
            animation-delay: .3s;
        }

        .delay-3 {
            animation-delay: .45s;
        }

        /* ── HUD Panel ── */
        .hud-panel {
            position: relative;
            padding: 22px 30px 18px;
            background: rgba(2, 8, 18, 0.84);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(76, 167, 126, 0.28);
            box-shadow: inset 0 0 0 1px rgba(76, 167, 126, 0.05),
            inset 0 0 40px rgba(76, 167, 126, 0.04),
            0 0 60px rgba(0, 0, 0, 0.55);
            /* subtle scan-line overlay */
            background-image: repeating-linear-gradient(
                    0deg,
                    rgba(0, 0, 0, 0.0) 0px,
                    rgba(0, 0, 0, 0.0) 2px,
                    rgba(0, 0, 0, 0.07) 2px,
                    rgba(0, 0, 0, 0.07) 3px
            );
            background-color: rgba(2, 8, 18, 0.84);
        }

        /* Corner bracket elements */
        .hud-corner {
            position: absolute;
            width: 18px;
            height: 18px;
            pointer-events: none;
        }

        .hud-corner.tl {
            top: -1px;
            left: -1px;
            border-top: 1.5px solid rgba(76, 167, 126, 0.85);
            border-left: 1.5px solid rgba(76, 167, 126, 0.85);
        }

        .hud-corner.tr {
            top: -1px;
            right: -1px;
            border-top: 1.5px solid rgba(76, 167, 126, 0.85);
            border-right: 1.5px solid rgba(76, 167, 126, 0.85);
        }

        .hud-corner.bl {
            bottom: -1px;
            left: -1px;
            border-bottom: 1.5px solid rgba(76, 167, 126, 0.85);
            border-left: 1.5px solid rgba(76, 167, 126, 0.85);
        }

        .hud-corner.br {
            bottom: -1px;
            right: -1px;
            border-bottom: 1.5px solid rgba(76, 167, 126, 0.85);
            border-right: 1.5px solid rgba(76, 167, 126, 0.85);
        }

        /* Small tag top-left of panel */
        .hud-tag {
            position: absolute;
            top: -9px;
            left: 22px;
            font-family: 'Courier New', monospace;
            font-size: 9px;
            letter-spacing: 3px;
            color: rgba(76, 167, 126, 0.7);
            background: rgba(2, 8, 18, 1);
            padding: 0 6px;
            text-transform: uppercase;
        }

        /* Status line at bottom of panel */
        .hud-status {
            margin-top: 14px;
            padding-top: 10px;
            border-top: 1px solid rgba(76, 167, 126, 0.12);
            font-family: 'Courier New', monospace;
            font-size: 9px;
            letter-spacing: 2px;
            color: rgba(76, 167, 126, 0.38);
            text-align: left;
            display: flex;
            justify-content: space-between;
        }

        @keyframes blink {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.2;
            }
        }

        .hud-blink {
            animation: blink 1.8s ease infinite;
        }

        /* ── Login / Register cross-link ── */
        .register-prompt {
            margin-top: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            font-family: 'Courier New', monospace;
            font-size: 10px;
            letter-spacing: 2px;
            color: rgba(255, 255, 255, 0.30);
        }

        .register-prompt a {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--accent);
            font-family: 'Dune Rise', var(--font-heading);
            font-size: 11px;
            letter-spacing: 3px;
            text-decoration: none;
            text-transform: uppercase;
            border-bottom: 1px solid rgba(76, 167, 126, 0.3);
            padding-bottom: 1px;
            transition: color .2s, border-color .2s;
        }

        .register-prompt a::after {
            content: '';
        }

        .register-prompt a:hover {
            color: #fff;
            border-color: var(--accent);
        }
