/* ============================================================================
   SUDOKU - Stili CSS
   Stile feltro verde Burraco/Scopa con layout 1024x750px
   ============================================================================ */

/* === BASE & LAYOUT === */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a5f2a;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.main-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* === SIDEBARS (per AdSense e layout) === */
.sidebar {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(135deg, #1a6b30 0%, #145524 50%, #0f4a1c 100%);
    overflow-y: auto;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transition: opacity 0.3s ease;
}
#sidebar-left { left: 0; }
#sidebar-right { right: 0; }

/* === CAMPO DI GIOCO === */
#campogioco {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1024px;
    height: 750px;
    background: linear-gradient(135deg, #1a6b30 0%, #145524 50%, #0f4a1c 100%);
    background-image: url(images/scala40/tappetoverde.png);
    transform-origin: center center;
    border-radius: 10px;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* === SCHERMO OVERLAY === */
#schermo {
    position: absolute;
    top: 0;
    left: 0;
    width: 1024px;
    height: 750px;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 30000;
    display: none;
}

/* === TITOLO E BARRA SUPERIORE === */
#titolo-gioco {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffd700;
    font-size: 26px;
    font-family: 'Slackey', 'Outfit', sans-serif;
    font-weight: bold;
    z-index: 1000;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

#messaggio-stato {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background: rgba(0, 40, 10, 0.6);
    padding: 6px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: normal;
    max-width: 560px;
    width: max-content;
    line-height: 1.35;
    transition: background-color 0.2s, color 0.2s;
}
#messaggio-stato.msg-giallo {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #b8860b;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
#messaggio-stato.msg-rosso {
    background: #cc0c39;
    color: #fff;
    border-color: #990022;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(204, 12, 57, 0.5);
}

.lang-switch-header {
    position: absolute;
    top: 8px;
    left: 230px;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lang-switch-header a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 32px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
    box-sizing: border-box;
}
.lang-switch-header a.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #b8860b;
}
.lang-switch-header a:hover:not(.active) {
    background: rgba(255, 255, 255, 0.3);
}

.btn-audio-game {
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-audio-game:hover {
    background-color: rgba(255, 255, 255, 0.25);
}
.btn-audio-game.muted {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.21.05-.42.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z'/%3E%3C/svg%3E");
}

#btn-audio {
    position: relative;
    z-index: 10001;
}

.pulsante-top {
    height: 32px;
    line-height: 32px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #6b9b7a;
    color: white;
    border-radius: 4px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s;
    box-sizing: border-box;
}
.pulsante-top:hover {
    background: rgba(0, 60, 20, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
}
a.pulsante-top {
    display: inline-block;
    text-decoration: none;
}

/* Scrivetemi e Come si Gioca: in alto a sinistra, prima del selettore lingua */
.link-utility-bottom {
    position: absolute;
    top: 8px;
    left: 15px;
    display: flex;
    gap: 6px;
    z-index: 10001;
}

/* === PANNELLO RECORD === */
#pannello-record {
    position: absolute;
    top: 10px;
    left: 680px;
    width: 290px;
    z-index: 50;
    background: rgba(0, 40, 10, 0.55);
    border: 2px solid rgba(100, 160, 110, 0.35);
    border-radius: 10px;
    padding: 8px 14px 10px;
    box-sizing: border-box;
    color: #fff;
}
.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    color: #aed6ae;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.btn-reset-record {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ccc;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1;
    padding: 2px 8px;
    margin-top: 3px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 32px;
}
.btn-reset-record:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-reset-record.conferma {
    background: #cc0c39;
    color: #fff;
    border-color: #990022;
    font-weight: bold;
}
.record-righe {
    display: flex;
    justify-content: space-between;
}
.record-righe .info-blocco {
    text-align: center;
    flex: 1;
}
.record-righe .info-label {
    font-size: 11px;
    color: #aed6ae;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.record-valore {
    font-size: 16px;
    font-weight: bold;
    color: #7fd4ff;
    margin-top: 2px;
}

/* === GRIGLIA SUDOKU === */
#griglia-sudoku {
    position: absolute;
    top: 108px;
    left: 62px;
    display: grid;
    grid-template-columns: repeat(9, 62px);
    grid-template-rows: repeat(9, 62px);
    border: 4px solid #14301c;
    background: #14301c;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    z-index: 50;
}

.cella-sudoku {
    width: 62px;
    height: 62px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: #f7f3e8;
    color: #1a4fa0;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    border-right: 1px solid #b9b2a0;
    border-bottom: 1px solid #b9b2a0;
    transition: background-color 0.1s;
}
.cella-sudoku.blocco-dx { border-right: 3px solid #14301c; }
.cella-sudoku.blocco-giu { border-bottom: 3px solid #14301c; }
.cella-sudoku.ultima-col { border-right: none; }
.cella-sudoku.ultima-riga { border-bottom: none; }

.cella-sudoku.data {
    color: #1c1c1c;
    font-weight: 700;
}
.cella-sudoku.evidenziata { background: #d7ecc8; }
.cella-sudoku.stesso-numero { background: #4a8f3c; color: #fff; }
.cella-sudoku.data.stesso-numero { color: #fff; }
.cella-sudoku.non-collegata-armata { background: #d8d8d0; }
.cella-sudoku.selezionata,
.cella-sudoku.data.selezionata { background: #ffe08a; }
.cella-sudoku.cella-armante,
.cella-sudoku.data.cella-armante { background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%); color: #1a1a2e; }
.cella-sudoku.armata:not(.selezionata) { box-shadow: inset 0 0 0 3px rgba(74, 143, 60, 0.6); }
.cella-sudoku.errata { color: #c0182b; }
.cella-sudoku.errata:not(.selezionata) { background: #f2c6cb; }
.cella-sudoku.lampeggia {
    animation: cellaFlash 0.5s ease;
}

/* Cella indicata dal Suggerimento (fase 1) */
.cella-sudoku.suggerita {
    animation: pulseSugg 0.9s ease infinite alternate;
}
@keyframes pulseSugg {
    from { box-shadow: inset 0 0 0 3px rgba(255, 215, 0, 0.95); }
    to   { box-shadow: inset 0 0 0 5px rgba(255, 215, 0, 0.35); }
}
.cella-sudoku.suggerita-errore {
    animation: pulseSuggErr 0.9s ease infinite alternate;
}
@keyframes pulseSuggErr {
    from { box-shadow: inset 0 0 0 3px rgba(204, 12, 57, 0.95); }
    to   { box-shadow: inset 0 0 0 5px rgba(204, 12, 57, 0.35); }
}
@keyframes cellaFlash {
    0% { background: #ffd700; }
    100% { background: #f7f3e8; }
}

/* === BANNER PROMO CALCOLO ENIGMATICO ===
   Sta nella fascia libera fra la griglia (finisce a 674) e la barra dei link
   agli altri giochi (comincia a 715): 32px di altezza a quota 682 lasciano
   8px di respiro sopra e sotto. Largo quanto la griglia (566px) e allineato
   al suo bordo sinistro, cosi' legge come parte dello schema e non come un
   annuncio esterno. Se la griglia cambia dimensioni, vanno rivisti top e width. */
#promo-calcolo {
    position: absolute;
    top: 682px;
    left: 62px;
    width: 566px;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 12px;
    background: linear-gradient(180deg, rgba(20, 83, 45, 0.95), rgba(2, 44, 34, 0.95));
    border: 1px solid #ffdb4d;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: filter 0.2s, transform 0.2s;
    z-index: 50;
}

#promo-calcolo:hover {
    filter: brightness(1.18);
    transform: translateY(-1px);
}

#promo-calcolo .promo-badge {
    background: #e47911;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

#promo-calcolo .promo-testo strong {
    color: #ffd700;
}

#promo-calcolo .promo-freccia {
    color: #ffd700;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

/* Note (matita) dentro la cella */
.note-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    pointer-events: none;
}
.note-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #6b675a;
}

/* === PANNELLO LATERALE DESTRO === */
#pannello-controlli {
    position: absolute;
    top: 108px;
    left: 680px;
    width: 290px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#info-partita {
    background: rgba(0, 40, 10, 0.55);
    border: 2px solid rgba(100, 160, 110, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
}
#info-partita .info-blocco {
    text-align: center;
    flex: 1;
}
#info-partita .info-label {
    font-size: 11px;
    color: #aed6ae;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#info-partita .info-valore {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    margin-top: 2px;
}

#numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.btn-num {
    height: 62px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background: linear-gradient(180deg, #4a7c59 0%, #2d5a3d 100%);
    border: 2px solid #6b9b7a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    font-family: 'Segoe UI', sans-serif;
}
.btn-num:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}
.btn-num.esaurito {
    opacity: 0.35;
    filter: grayscale(0.6);
    cursor: default;
    transform: none;
}
.btn-num.armato {
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    border-color: #ffd700;
    color: #1a1a2e;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}
#sprite-cursore {
    display: none;
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transform: translate(14px, -6px);
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    border: 2px solid #fff8dc;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    line-height: 26px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
#sprite-cursore.visibile {
    display: block;
}
.btn-num .num-count {
    position: absolute;
    bottom: 3px;
    right: 7px;
    font-size: 11px;
    font-weight: normal;
    color: #cde8cd;
}

#azioni {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.btn-azione {
    height: 44px;
    font-size: 13px;
    font-weight: bold;
    color: white;
    background: rgba(0, 40, 10, 0.6);
    border: 2px solid #6b9b7a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}
.btn-azione:hover {
    background: rgba(0, 60, 20, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-azione.attivo {
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    color: #1a1a2e;
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

/* Pannello del suggerimento: copre l'intera colonna dei tasti quando aperto */
#pannello-hint {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: #10331c;
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 18px 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}
#pannello-hint.aperto { display: flex; }
#pannello-hint .hint-titolo {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#hint-testo {
    color: #fff;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    padding: 0 4px;
}
#hint-testo b { color: #ffd700; }
#hint-penalita {
    color: #ff9f43;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    padding: 0 4px;
    font-style: italic;
}
#hint-penalita b { color: #ff6b6b; font-style: normal; }
#hint-bottoni {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}
#hint-bottoni button {
    width: 230px;
    height: 46px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    background: rgba(0, 40, 10, 0.6);
    border: 2px solid #6b9b7a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}
#hint-bottoni button:hover {
    background: rgba(0, 60, 20, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
}
#btn-hint-applica {
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%) !important;
    color: #1a1a2e !important;
    border-color: #ffd700 !important;
}
#btn-hint-applica:hover { filter: brightness(1.1); }
#btn-hint-chiudi {
    border-color: #990022 !important;
}

#opzioni-errori {
    background: rgba(0, 40, 10, 0.55);
    border: 2px solid rgba(100, 160, 110, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#opzioni-errori label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #cde8cd;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}
#opzioni-errori input[type="checkbox"] {
    accent-color: #ffd700;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
}

#btn-nuova-partita {
    height: 56px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a2e;
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    border: 2px solid #ffd700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    font-family: 'Segoe UI', sans-serif;
}
#btn-nuova-partita:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

/* === MODALI E DIALOGHI === */
.form-sudoku {
    z-index: 40000;
    position: absolute;
    width: 500px;
    height: 520px;
    left: 262px;
    top: 115px;
    background-color: #1a4224;
    background-image: url(images/scala40/tappetoverde.png);
    border: 4px solid #b8860b;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    color: white;
    overflow: hidden;
}

.form-sudoku-title {
    font-family: 'Slackey', 'Outfit', sans-serif;
    font-size: 26px;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px #000;
    text-align: center;
}

#modale-inizio {
    justify-content: center;
}

.btn-opzione-sel {
    background: #1f4068;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
    text-transform: uppercase;
    opacity: 0.55;
    filter: blur(0.5px);
}
.btn-opzione-sel.attiva {
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    border: 2px solid #ffd700;
    color: #1a1a2e;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    opacity: 1;
    filter: none;
}
.btn-opzione-sel:hover {
    opacity: 0.85;
    filter: none;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.btn-opzione-sel.attiva:hover {
    filter: brightness(1.1);
    opacity: 1;
}

.btn-continua {
    padding: 10px 30px;
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    background: #ffd700;
    border: 2px solid #b8860b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.btn-continua:hover {
    background: #fff;
    transform: scale(1.05);
}

/* Modale conferma nuova partita: bassa e larga, con banner pubblicitario sopra */
#confermatermina.modale-conferma {
    width: 700px;
    height: 180px;
    left: 162px;
    top: 470px;
    padding: 24px 25px;
    justify-content: center;
    overflow: visible; /* il banner sporge sopra la modale */
}
.conferma-bottoni {
    display: flex;
    justify-content: center;
    gap: 24px;
}

/* Modale vittoria: bassa e larga, con banner pubblicitario sopra */
#haivinto.modale-vittoria {
    width: 700px;
    height: 210px;
    left: 162px;
    top: 430px;
    padding: 20px 25px;
    justify-content: center;
    overflow: visible; /* il banner sporge sopra la modale */
}

.confirm-message {
    font-family: 'Slackey', 'Outfit', sans-serif;
    font-size: 24px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px #000;
    padding: 0 20px;
}

/* === LINK A FONDO PAGINA === */
.legal-links-sudoku {
    position: absolute;
    bottom: 12px;
    left: 15px;
    display: flex;
    gap: 8px;
    z-index: 100;
    align-items: center;
}
.legal-links-sudoku a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 11px;
    font-family: sans-serif;
    transition: color 0.2s;
}
.legal-links-sudoku a:hover {
    color: #ffd700;
}
.legal-links-sudoku .sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
}

.link-giochi-sudoku {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 100;
}
.pulsante-link-sudoku {
    background-color: rgba(0, 40, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ccc;
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.pulsante-link-sudoku:hover {
    color: #fff;
    background-color: rgba(0, 60, 20, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}

/* "TUTTI I GIOCHI": è l'uscita verso il resto del sito, quindi va distinto
   dai link ai singoli giochi — cornice dorata e fondo caldo. La barra è
   flex con padding sul contenuto: il pulsante si allarga da sé, non serve
   fissare una width. */
.pulsante-home-sudoku {
    background: linear-gradient(135deg, #c9720f, #8a4a08);
    border-color: #ffd700;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

.pulsante-home-sudoku:hover {
    color: #fff;
    background: linear-gradient(135deg, #e08514, #a3580a);
    border-color: #ffd700;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.65);
}

/* === SPRITE PENALITÀ "+Ns" (stile arcade: sale e sfuma) === */
.penalita-volante {
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    font-family: 'Slackey', 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: bold;
    color: #ff3b30;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8), 2px 2px 0 #7a0000;
    animation: penalita-sali 2.6s ease-out forwards;
}
@keyframes penalita-sali {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    8%   { opacity: 1; transform: translate(-50%, -70%) scale(1.15); }
    16%  { transform: translate(-50%, -90%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -390%) scale(1); }
}
