/* Contenitore pagine invisibile/fuori schermo per il rendering o visibile per anteprima */
        #pages-container {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }

        /* Dimensioni precise Foglio A4 (210mm x 297mm) */
        .a4-page {
            width: 210mm;
            height: 297mm;
            background: white;
            padding: 12mm 15mm;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
        }

        /* Titolo in alto a sinistra */
        .header {
            width: 100%;
            border-bottom: 3px solid #1a252f;
            padding-bottom: 6px;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
        }

        .header-titles h1 {
            font-size: 30pt;
            color: #1a252f;
            text-align: left;
            font-weight: 800;
            letter-spacing: 1px;
            text-transform: uppercase;
            line-height: 1;
        }

        .subtitle {
            font-size: 10.5pt;
            color: #7f8c8d;
            margin-top: 6px;
        }

        .difficulty-badge {
            font-size: 11pt;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .diff-facile { background-color: #e8f8f5; color: #117a65; border: 1px solid #a3e4d7; }
        .diff-medio { background-color: #fef9e7; color: #b7950b; border: 1px solid #f9e79f; }
        .diff-difficile { background-color: #fadbd8; color: #78281f; border: 1px solid #f5b7b1; }

        /* Griglia Sudoku Massima Dimensione (175mm x 175mm) */
        .grid-container {
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 6mm auto;
        }

        .sudoku-board {
            width: 175mm;
            height: 175mm;
            display: grid;
            grid-template-columns: repeat(9, 1fr);
            border: 3.5px solid #000000;
            background-color: #ffffff;
        }

        .cell {
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #bdc3c7;
            position: relative;
            background: white;
        }

        /* Numero dato principale */
        .given-val {
            font-size: 26pt;
            font-weight: bold;
            color: #1a252f;
        }

        /* Sottogriglia 3x3 per i candidati piccoli */
        .candidates-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(3, 1fr);
            width: 100%;
            height: 100%;
            padding: 1px;
        }

        .candidate {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 6.5pt;
            font-weight: 600;
            color: #7f8c8d;
            line-height: 1;
        }

        /* Bordi marcati per le regioni 3x3 */
        .cell:nth-child(3n) {
            border-right: 2.5px solid #000000;
        }

        .cell:nth-child(9n) {
            border-right: 1px solid #bdc3c7;
        }

        .sudoku-board > div:nth-child(n+19):nth-child(-n+27),
        .sudoku-board > div:nth-child(n+46):nth-child(-n+54) {
            border-bottom: 2.5px solid #000000;
        }

        /* Descrizione subito sotto la griglia */
        .description-container {
            width: 100%;
            background-color: #f8f9fa;
            border-left: 4.5px solid #1a252f;
            padding: 10px 14px;
            border-radius: 0 4px 4px 0;
        }

        .description-title {
            font-size: 11pt;
            font-weight: bold;
            color: #1a252f;
            margin-bottom: 5px;
            text-transform: uppercase;
        }

        .description-text {
            font-size: 9pt;
            color: #34495e;
            line-height: 1.4;
        }

        .rules-list {
            margin-left: 18px;
            margin-top: 4px;
        }

        .rules-list li {
            margin-bottom: 2px;
        }

        .footer-page {
            text-align: right;
            font-size: 8.5pt;
            color: #95a5a6;
            margin-top: 4px;
        }