        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }

        html,
        body {
            min-height: 100%;
        }

        body {
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: black;
            color: white;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        body.fullscreen-mode {
            width: 100vw;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
        }

        canvas {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 0;
        }

        /* Obraz nakładki (background.png) nad canvasem, nieprzezroczysty */
        #bg-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
        }

        /* Nie przechwytuj zdarzeń myszy przez nakładkę i ustaw niestandardowy kursor */
        #bg-overlay {
            pointer-events: none;
        }

        body {
            cursor: url('cursor4.png') 16 16, auto;
        }

        .menu-container {
            position: relative;
            z-index: 2;
            text-align: center;
            width: 100%;
            max-width: 420px;
            margin: auto;
            padding: 0 16px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .title {
            margin-bottom: 60px;
        }

        .title h1 {
            font-weight: normal;
            font-size: 3em;
            line-height: 1;
        }

        .title h2 {
            font-weight: bold;
            font-size: 2em;
            letter-spacing: 3px;
            margin-top: 10px;
        }

        /* Page fade overlay for smooth navigation */
        .page-fade,
        #page-fade {
            position: fixed;
            inset: 0;
            background: #000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.6s ease;
            z-index: 1000;
            pointer-events: none;
        }

        .page-fade.visible,
        #page-fade.visible {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        /* Stopka w lewym dolnym rogu */
        #footer {
            position: fixed;
            bottom: -7px;
            left: 0px;
            z-index: 1000;
        }

        #footer img {
            width: 170px;
            height: auto;
            opacity: 1;
        }

        .fly-away {
            --mag-x: 0px;
            --mag-rot: 0deg;
            --mag-delay: 0ms;
            transform-origin: center;
            animation: magneticLift 2.1s cubic-bezier(0.16, 0.84, 0.24, 1) var(--mag-delay) forwards;
            will-change: transform, opacity, filter;
        }

        @keyframes magneticLift {
            0% {
                transform: translateY(0);
                opacity: 1;
                filter: blur(0px);
            }
            18% {
                transform: translateY(-8px) translateX(calc(var(--mag-x) * 0.08)) rotate(calc(var(--mag-rot) * 0.16));
                opacity: 0.99;
            }
            40% {
                transform: translateY(-38px) translateX(calc(var(--mag-x) * 0.28)) rotate(calc(var(--mag-rot) * 0.42));
                opacity: 0.95;
            }
            64% {
                transform: translateY(-130px) translateX(calc(var(--mag-x) * 0.56)) rotate(calc(var(--mag-rot) * 0.72));
                opacity: 0.82;
            }
            84% {
                transform: translateY(-420px) translateX(calc(var(--mag-x) * 0.86)) rotate(calc(var(--mag-rot) * 0.94));
                opacity: 0.54;
                filter: blur(0.55px);
            }
            100% {
                transform: translateY(-165vh) translateX(var(--mag-x)) rotate(var(--mag-rot));
                opacity: 0;
                filter: blur(1.2px);
            }
        }

        /* Credits scrolling */
        #credits-scroll {
            display: none;
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 90vw;       /* wykorzystaj 90% szerokości ekranu */
            max-width: 1200px; /* nie pozwól, żeby było za szeroko */
            padding: 0 12px;   /* mniejsze marginesy wewnętrzne */
            z-index: 1200;
            color: white;
            text-align: center;
            font-family: 'Franklin Gothic Heavy', Arial, sans-serif;
            font-weight: bold;
            font-size: 3.5rem;
            line-height: 3.2;
            letter-spacing: 0.08em;
        }

        #credits-scroll p {
            margin: 60px 0;
            text-shadow: 0 0 24px rgba(0, 0, 0, 0.3);
        }

        @keyframes scrollUp {
            0% {
                transform: translateX(-50%) translateY(100vh);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            100% {
                transform: translateX(-50%) translateY(-200vh);
                opacity: 1;
            }
        }

        /* Przycisk powrotu */
       #restore-ui {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    min-width: 200px;               /* minimalna szerokość przycisku */
    max-width: 90vw;                /* nie przekracza 90% szerokości ekranu */
    background: rgba(233, 88, 88, 0.753);
    border: 1px solid rgba(231, 66, 88, 0.644);
    border-radius: 8px;
    color: rgb(0, 0, 0);
    cursor: pointer;
    z-index: 1300;
    font-family: 'Arial Black', sans-serif;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;            /* jedna linia tekstu */
    font-size: clamp(0.9rem, 1.2vw, 1.2rem); /* dynamiczna wielkość fontu */
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;        /* jeśli tekst za długi, pokaże "…" */
}

#restore-ui:hover {
    background: inherit; /* używa tego samego tła co normalnie */
}

