
     

        #chessContainer {
            width: 100%;
            /* צריך לקבוע למספר פיקסלים שהוא הכפולה הגדולה ביותר של 8 שאשפר להכניס ברוחב המסך - יבוצע בסקריפט */
            max-width: 75vh;
            margin: 0 auto;
            background-color: darkmagenta;
            padding: 0px;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            touch-action: manipulation;
        }

        #fenInputContainer {
            margin-bottom: 1px
        }

        #fenInput {
            width: 70%;
            padding: 5px;
            font-size: 2vmin
        }

        #loadButton {
            padding: 5px 10px;
            font-size: 2vmin
        }

        #explanationBox {
            padding: 1px;
            background: #f8f8f8;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin-bottom: 1px
        }

        #boardWrapper {
            background-color: #cafdfe;
            position: relative;
            width: 100%;
            margin: 0px;
            display: flex;
            justify-content: center;
            align-items: center;
            aspect-ratio: 1 / 1;
        }

        #myBoard {
            margin: 0;
            width: 100% !important;
            max-width: 100%;
            aspect-ratio: 1 / 1;
            touch-action: manipulation;
        }

        #promotionDialog {
            position: absolute;
            display: none;
            background: #fff;
            border: 2px solid #333;
            border-radius: 4px;
            padding: 2px;
            box-shadow: 0 0 5px rgba(0, 0, 0, .5);
            z-index: 1000;
            white-space: nowrap
        }

        .promoPiece {
            cursor: pointer;
            display: inline-block;
            margin: 0;
            padding: 2px;
            border-right: 1px solid #666
        }

        .promoPiece:last-child {
            border-right: none
        }

        #gameInfo {
            width: 20%;
            padding: 1px;
            align-items: center;
            justify-content: center;
        }

        #statusLog {
            flex-grow: 1;
            padding: 3px;
            margin: 1px;
            height: 20%;
            width: 80%;
            max-width: 80%;
        }

        #undoButton {
            padding: 3px;
            margin: 1px;
            width: auto;
        }

        #moveHistory {
            padding: 3px;
            margin-top: 5px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2vmin;
            width: auto;
            height: 30%;
        }

        #aftbrd {
            width: 100%;
            max-width: 100%;
            display: flex;
            justify-content: space-between;
        }

        #toexplor {
            width: 80%;
            max-width: 80%;
            flex-grow: 1;
            padding: 1px;
            text-align: left;
            background: #cbcafe;
        }

        #output {
            margin-top: 2px;
            background: #cbcafe;
            padding: 1px;
            border-radius: 4px;
            overflow-x: auto;
            overflow-y: auto;
            max-height: 40vh;
            height: 40vh;
            min-height: 90px;
            white-space: pre-wrap;
            font-family: inherit;
            line-height: 1.8;
            font-size: 2.8vmin;
            box-sizing: border-box;
        }

        .highlight-square-light {
            box-shadow: inset 0 0 1vmin 1vmin #8efdfe
        }

        .highlight-square-dark {
            box-shadow: inset 0 0 1vmin 1vmin #cba2fe
        }

        .highlight-invalid-move {
            background-color: #666
        }

        .highlight-selected {
            box-shadow: inset 0 0 1vmin 1vmin #ff0
        }

        @keyframes puzzleSolved {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }

            100% {
                transform: scale(1);
            }
        }

     /* was span */
     .mychhessspan {
           /* background: #cafdfe; */
            padding: .6vmin
        }

        .puzzle-line {
            margin-bottom: 0.2em
        }

        .tree-indent-1 {
            margin-left: 2em
        }

        .tree-indent-2 {
            margin-left: 4em
        }

        .tree-indent-3 {
            margin-left: 6em
        }

        .spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 24px auto 12px auto;
            display: block;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        @media (max-width: 900px) {
            #output {
                font-size: 4vw;
                padding: 8px;
                line-height: 1.9;
                height: 40vh;
                max-height: 40vh;
            }

            .tree-indent-1 {
                margin-left: 1.2em;
            }

            .tree-indent-2 {
                margin-left: 2em;
            }

            .tree-indent-3 {
                margin-left: 2.7em;
            }

            #moveHistory {
                font-size: 3.4vw;
                height: auto;
                padding: 6px;
            }

            #fenInput {
                font-size: 3.2vw;
            }

            #loadButton {
                font-size: 3vw;
            }

            #explanationBox {
                font-size: 3vw;
            }

            #myBoard {
                min-height: 300px;
            }
        }

        #statusIndicator {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            font-size: 2em;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #555;
            cursor: pointer;
            margin: 8px auto;
            transition: background 0.2s, color 0.2s, border 0.2s;
            position: relative;
            outline: none;
            user-select: none;
        }

        #statusIndicator.white {
            background: #fff;
            color: #111;
            border-color: #bbb;
        }

        #statusIndicator.black {
            background: #222;
            color: #fff;
            border-color: #bbb;
        }

        #statusIndicator.white.check {
            background: #fff;
            color: #d00;
            border-color: #f00;
        }

        #statusIndicator.black.check {
            background: #222;
            color: #ffe600;
            border-color: #ffe600;
        }

        #statusIndicator.over {
            background: #777;
            color: #fff;
            border-color: #333;
        }

        #statusIndicator.draw {
            background: #ccc;
            color: #444;
            border-color: #aaa;
        }

        .status-popup {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            min-width: 120px;
            background: #f7f6e6;
            color: #222;
            border: 1.5px solid #999;
            border-radius: 12px;
            padding: 12px 16px;
            z-index: 9999;
            top: 110%;
            font-size: 1.1em;
            box-shadow: 0 2px 16px #2223;
            pointer-events: none;
            opacity: 0.98;
            transition: opacity 0.2s;
            text-align: center;
            white-space: pre-line;
        }
   