/* ============================================================
   BACKGAMMON - Stylesheet
   Campo di gioco 1024x750

   La prima parte e' il blocco comune del punto 11.2 della forma canonica,
   copiato com'e': fondo, colonne, campo, pulsanti di servizio, selettore
   delle lingue, audio, link legali, finestre.
   La seconda parte e' di questo gioco: tavola in legno, 24 punte, barra,
   vaschetta di uscita, pedine, dadi e pannello laterale.
   ============================================================ */

/* ============================================================
   PARTE COMUNE -- punto 11.2 della forma canonica
   ============================================================ */

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a5f2a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

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

/* Le due colonne ai lati le crea site.js se mancano: queste regole servono a
   quelle, non a elementi scritti nella pagina. */
.sidebar {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(135deg, #1a6b30 0%, #145524 50%, #0f4a1c 100%);
    overflow-y: auto;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    flex-shrink: 0;
}

#sidebar-left  { left: 0; }
#sidebar-right { right: 0; }

#campogioco {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1024px;
    height: 750px;
    background: linear-gradient(135deg, #1a5f2a 0%, #0f4a1c 50%, #145524 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.3);
    overflow: hidden;
}

#schermo {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 1024px;
    height: 750px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 30000;
}

/* --- Pulsanti del gioco sul campo, REGOLE compreso --- */

.pulsante2 {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: linear-gradient(180deg, #4a7c59 0%, #2d5a3d 100%);
    border: 2px solid #6b9b7a;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    user-select: none;
    font-family: inherit;
    transition: all 0.2s;
}

.pulsante2:hover:not(:disabled) {
    background: linear-gradient(180deg, #5a8c69 0%, #3d6a4d 100%);
    transform: scale(1.05);
}

.pulsante2:active:not(:disabled) { transform: scale(0.95); }

.pulsante2:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

/* --- Fila dei link agli altri giochi --- */

.link-giochi a { text-decoration: none; }

.pulsante-link {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #888;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.2s;
}

.pulsante-link:hover { transform: scale(1.1); }

.pulsante-home {
    background: linear-gradient(135deg, #c9720f, #8a4a08);
    border-color: #ffd700;
    color: #fff;
    letter-spacing: 0;
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

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

#btn-scrivetemi { background-color: #3a3a5a; }

/* --- Selettore delle lingue sul campo --- */

#lang-switcher {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 4px;
    align-items: center;
    z-index: 2000;
}

.btn-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-lang.active { background: #ffd700; color: #1a1a2e; border-color: #b8860b; }
.btn-lang:hover:not(.active) { background: rgba(255, 255, 255, 0.3); }

/* --- Il pulsante dell'audio --- */

.btn-audio-game {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M3 9v6h4l5 5V4L7 9H3z'/><path fill='white' d='M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.06c1.48-.73 2.5-2.25 2.5-4.03z'/><path fill='white' fill-opacity='0.65' d='M14 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'/></svg>");
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.btn-audio-game:hover { background-color: rgba(255, 255, 255, 0.25); }

.btn-audio-game.muted {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' fill-opacity='0.45' d='M3 9v6h4l5 5V4L7 9H3z'/><path fill='white' fill-opacity='0.2' d='M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.06c1.48-.73 2.5-2.25 2.5-4.03z'/><path fill='white' fill-opacity='0.2' d='M14 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'/><line x1='3' y1='21' x2='21' y2='3' stroke='%23ee1111' stroke-width='2.5' stroke-linecap='round'/></svg>");
}

/* --- Link legali --- */

.legal-links-text {
    position: absolute;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.legal-links-text a { color: inherit; text-decoration: none; }
.legal-links-text a:hover { color: rgba(255, 255, 255, 0.7); }

/* --- Finestre --- */

.modal {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 340px;
    max-width: 460px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #1a3a2a, #0f2a1c);
    border: 1px solid #4a7a5a;
    border-radius: 10px;
    color: #fff;
    text-align: left;
    z-index: 31000;
}

.modal h2 {
    margin-bottom: 16px;
    font-size: 20px;
    letter-spacing: 1px;
    text-align: center;
    color: #ffd700;
}

.modal-content {
    font-size: 14px;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 16px;
}

.modal-content p { margin-bottom: 6px; }
.modal-content label { display: block; cursor: pointer; padding: 2px 0; }
.modal-content input[type="radio"] { margin-right: 4px; }

.modal-sep {
    border: 0;
    border-top: 1px solid rgba(107, 155, 122, 0.6);
    margin: 12px 0;
}

.btn-modal {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    background: linear-gradient(180deg, #3a7a4a, #2a5a3a);
    border: 1px solid #6b9b7a;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-modal:hover { background: linear-gradient(180deg, #4a8a5a, #3a6a4a); }

.btn-modal.preferito { background: #ffd700; border-color: #ffd700; color: #2c3e50; }
.btn-modal.preferito:hover { background: #ffe44d; border-color: #ffe44d; }

.btn-modal.secondario {
    background: rgba(0, 0, 0, 0.3);
    border-color: #555;
    font-size: 13px;
    padding: 7px;
    margin-top: 4px;
}

.btn-modal.secondario:hover { background: rgba(0, 0, 0, 0.5); }

#modal-nuova { padding-bottom: 48px; }

.lang-switch-modale {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 1;
}

.lang-switch-modale a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 9px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}

.lang-switch-modale a.active { background: #ffd700; color: #1a1a2e; border-color: #b8860b; }
.lang-switch-modale a:hover:not(.active) { background: rgba(255, 255, 255, 0.3); }

.btn-angolo-modale {
    position: absolute;
    bottom: 12px;
    height: 24px;
    line-height: 22px;
    padding: 0 10px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #6b9b7a;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-angolo-modale:hover { background: rgba(0, 60, 20, 0.7); border-color: rgba(255, 255, 255, 0.5); }
.btn-angolo-modale.sinistra { left: 14px; }
.btn-angolo-modale.destra   { right: 14px; }

.btn-angolo-modale.home {
    background: linear-gradient(135deg, #c9720f, #8a4a08);
    border-color: #ffd700;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

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

/* ============================================================
   PARTE DEL GIOCO -- Tavola del Backgammon, pedine, dadi, pannello
   ============================================================ */

/* === TESTA DEL CAMPO === */

#titolo {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 4px;
    color: #ffd700;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.65);
    line-height: 1.1;
}

#titolo-firma {
    font-size: 20px;
    letter-spacing: 4px;
    color: #ffe87c;
    font-weight: 600;
}

#messaggio {
    position: absolute;
    top: 44px;
    left: 20px;
    width: 760px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    min-height: 22px;
    color: #e6f2e6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* === TAVOLA IN LEGNO === */

#tavola {
    position: absolute;
    top: 72px;
    left: 20px;
    width: 760px;
    height: 520px;
    padding: 10px;
    background: linear-gradient(145deg, #6e4223 0%, #4a2a14 50%, #3a1f0e 100%);
    border: 2px solid #8c5a32;
    border-radius: 12px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.55),
        inset 0 1px 2px rgba(255, 220, 170, 0.25);
}

#tavola-interna {
    width: 100%;
    height: 100%;
    display: flex;
    background: linear-gradient(180deg, #ead9b7 0%, #dfc99f 50%, #ead9b7 100%);
    border: 2px solid #2b1609;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 0 18px rgba(45, 22, 6, 0.35);
}

/* === DUE META' DEL TAVOLIERE === */

.quadrante-colonna {
    width: 306px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.numeri-riga {
    height: 18px;
    display: flex;
    background: rgba(58, 31, 14, 0.14);
}

.numero-punta {
    width: 51px;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    line-height: 18px;
    color: #5a3820;
    letter-spacing: 0.3px;
}

.meta-punte {
    height: 208px;
    display: flex;
    position: relative;
}

.fascia-centrale {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* === PUNTE (TRIANGOLI) === */

.punta {
    position: relative;
    width: 51px;
    height: 208px;
    cursor: default;
}

.punta .triangolo {
    position: absolute;
    left: 2px;
    width: 47px;
    height: 196px;
    pointer-events: none;
    transition: filter 0.15s;
}

.meta-punte.alto .punta .triangolo {
    top: 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.meta-punte.basso .punta .triangolo {
    bottom: 0;
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.punta.scura .triangolo {
    background: linear-gradient(180deg, #8b2626 0%, #681919 100%);
}

.punta.chiara .triangolo {
    background: linear-gradient(180deg, #2d5539 0%, #1d3c27 100%);
}

/* Evidenziazioni di gioco sulle punte */
.punta.sorgente {
    cursor: pointer;
}

.punta.selezionata::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 215, 0, 0.22);
    border: 2px solid #ffd700;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

.punta.destinazione {
    cursor: pointer;
}

.punta.destinazione::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.85);
    border: 2px solid #fff;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.95);
    z-index: 20;
    pointer-events: none;
    animation: pulsa-meta 1.1s ease-in-out infinite;
}

.meta-punte.alto .punta.destinazione::before  { bottom: 8px; }
.meta-punte.basso .punta.destinazione::before { top: 8px; }

.punta.destinazione:hover .triangolo {
    filter: brightness(1.35);
}

.punta.suggerita-da::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(46, 204, 113, 0.25);
    border: 2px dashed #2ecc71;
    border-radius: 4px;
    pointer-events: none;
    z-index: 3;
}

.punta.suggerita-a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 215, 0, 0.30);
    border: 2px solid #ffd700;
    border-radius: 4px;
    pointer-events: none;
    z-index: 3;
}

.punta.ultima-mossa .triangolo {
    filter: brightness(1.18);
}

@keyframes pulsa-meta {
    0%, 100% { transform: translateX(-50%) scale(0.92); opacity: 0.85; }
    50%      { transform: translateX(-50%) scale(1.10); opacity: 1; }
}

/* === BARRA CENTRALE === */

#barra {
    width: 50px;
    height: 100%;
    background: linear-gradient(90deg, #3c2110 0%, #5c371d 50%, #3c2110 100%);
    border-left: 2px solid #261307;
    border-right: 2px solid #261307;
    display: flex;
    flex-direction: column;
    position: relative;
}

.barra-meta {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.barra-etichetta {
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    color: rgba(255, 224, 165, 0.32);
    pointer-events: none;
}

.barra-cerniera {
    height: 18px;
    background: linear-gradient(180deg, #b89448 0%, #e0be6e 50%, #8f6d2c 100%);
    border-top: 1px solid #3c2110;
    border-bottom: 1px solid #3c2110;
}

.barra-meta.sorgente {
    cursor: pointer;
    box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.45);
}

.barra-meta.selezionata {
    box-shadow: inset 0 0 16px rgba(255, 215, 0, 0.85);
}

.barra-meta.suggerita-da {
    box-shadow: inset 0 0 16px rgba(46, 204, 113, 0.85);
}

/* === VASCHETTA DI USCITA (BEAR-OFF) === */

#vaschetta-uscita {
    width: 74px;
    height: 100%;
    background: linear-gradient(90deg, #3a2010 0%, #4d2c17 100%);
    border-left: 3px solid #261307;
    display: flex;
    flex-direction: column;
    padding: 6px 5px;
}

.uscita-meta {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 215, 140, 0.25);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5px 4px;
    position: relative;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.uscita-divisore {
    height: 10px;
}

.uscita-titolo {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #e6cfa0;
}

.uscita-conteggio {
    font-size: 11px;
    font-weight: bold;
    color: #ffd700;
}

.uscita-pile {
    width: 52px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    padding: 4px 0;
}

#uscita-nero .uscita-pile {
    justify-content: flex-start;
}

.pedina-uscita {
    width: 100%;
    height: 10px;
    border-radius: 3px;
}

.pedina-uscita.bianca {
    background: linear-gradient(90deg, #d8cab0 0%, #fffdf6 45%, #ccb997 100%);
    border: 1px solid #9e8a68;
}

.pedina-uscita.nera {
    background: linear-gradient(90deg, #1b1d22 0%, #4b505c 45%, #16181c 100%);
    border: 1px solid #090a0c;
}

.uscita-meta.destinazione {
    cursor: pointer;
    border-color: #ffd700;
    box-shadow: inset 0 0 18px rgba(255, 215, 0, 0.55), 0 0 10px rgba(255, 215, 0, 0.65);
}

.uscita-meta.suggerita-a {
    border-color: #ffd700;
    box-shadow: inset 0 0 18px rgba(255, 215, 0, 0.7);
}

/* === PEDINE === */

.pedina {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 5;
    pointer-events: none;
    transition: transform 0.12s, box-shadow 0.12s;
}

.pedina.bianca {
    background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f5ebd6 55%, #cbb894 100%);
    border: 2px solid #9d8966;
    box-shadow:
        0 3px 5px rgba(0, 0, 0, 0.45),
        inset 0 0 0 4px rgba(255, 255, 255, 0.45),
        inset 0 0 0 7px rgba(170, 148, 110, 0.28);
    color: #4a351c;
}

.pedina.nera {
    background: radial-gradient(circle at 34% 30%, #59606d 0%, #262930 55%, #121418 100%);
    border: 2px solid #0b0c0e;
    box-shadow:
        0 3px 5px rgba(0, 0, 0, 0.55),
        inset 0 0 0 4px rgba(255, 255, 255, 0.12),
        inset 0 0 0 7px rgba(0, 0, 0, 0.45);
    color: #f3e5c3;
}

.punta.sorgente .pedina.cima,
.barra-meta.sorgente .pedina.cima {
    box-shadow:
        0 0 0 2px rgba(255, 215, 0, 0.75),
        0 3px 8px rgba(0, 0, 0, 0.5);
}

.punta.selezionata .pedina.cima,
.barra-meta.selezionata .pedina.cima {
    transform: translateX(-50%) scale(1.08);
    box-shadow:
        0 0 0 3px #ffd700,
        0 0 14px rgba(255, 215, 0, 0.9);
}

.barra-meta .pedina {
    position: relative;
    left: auto;
    transform: none;
    width: 38px;
    height: 38px;
}

.barra-meta.selezionata .pedina.cima {
    transform: scale(1.08);
}

/* === DADI SULLA TAVOLA === */

.dadi-zona {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
}

.dado {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    align-items: center;
    justify-items: center;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.65);
    transition: opacity 0.2s, transform 0.2s;
}

.dado.bianco {
    background: linear-gradient(145deg, #ffffff 0%, #efe6d2 100%);
    border: 1.5px solid #b5a486;
}

.dado.nero {
    background: linear-gradient(145deg, #3c414b 0%, #1d2026 100%);
    border: 1.5px solid #0e1014;
}

.dado.usato {
    opacity: 0.32;
    transform: scale(0.88);
}

.dado.rotola {
    animation: dado-salto 0.28s ease-out;
}

@keyframes dado-salto {
    0%   { transform: scale(0.7) rotate(-25deg); }
    60%  { transform: scale(1.1) rotate(8deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.pip {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dado.bianco .pip { background: #261c12; }
.dado.nero   .pip { background: #f8ecd2; }

/* === PANNELLO LATERALE DESTRO === */

#pannello-destro {
    position: absolute;
    top: 72px;
    left: 796px;
    width: 208px;
    height: 520px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.pannello-box {
    padding: 11px 13px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid #6b9b7a;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
}

.pannello-titolo {
    text-align: center;
    font-weight: bold;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    margin-bottom: 6px;
}

.pannello-sottotitolo {
    text-align: center;
    color: #cde0d2;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 2px 0 4px;
}

.pannello-riga {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.pannello-riga .valore {
    font-weight: bold;
    color: #ffd700;
}

.legenda-pedina {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pallino {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.pallino.bianco {
    background: #f5ebd6;
    border: 1px solid #9d8966;
}

.pallino.nero {
    background: #2b2f38;
    border: 1px solid #888;
}

.punteggio-divider {
    height: 1px;
    background: rgba(107, 155, 122, 0.55);
    margin: 6px 0;
}

/* Pulsanti dadi e azioni nel pannello */
.btn-tira {
    width: 100%;
    height: 44px;
    font-size: 15px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.btn-tira.pronto {
    background: linear-gradient(180deg, #ffd700 0%, #d4a600 100%);
    border-color: #fff0a0;
    color: #1f2b1f;
    text-shadow: none;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.55);
}

.btn-tira.pronto:hover:not(:disabled) {
    background: linear-gradient(180deg, #ffe44d 0%, #e6b800 100%);
}

.azioni-coppia {
    display: flex;
    gap: 8px;
}

.btn-piccolo {
    flex: 1;
    height: 32px;
    font-size: 12px;
}

#btn-nuova,
#btn-regole {
    width: 100%;
    height: 36px;
    font-size: 13px;
    letter-spacing: 1px;
}

#btn-nuova { margin-top: auto; }

/* === FILA DEI LINK AGLI ALTRI GIOCHI === */

.link-giochi {
    position: absolute;
    top: 618px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.link-giochi .pulsante-link,
#btn-scrivetemi {
    width: 112px;
    height: 30px;
    font-size: 11px;
}

.link-giochi .pulsante-link { background-color: rgba(0, 0, 0, 0.45); }
.link-giochi .pulsante-home { background-color: transparent; }

#btn-scrivetemi {
    position: absolute;
    top: 682px;
    right: 26px;
    z-index: 10;
}

/* === LINK LEGALI === */

.legal-links-text {
    top: 692px;
    left: 26px;
}

/* === LE FINESTRE DI QUESTO GIOCO === */

.modal-content.centrato { text-align: center; }

.punteggio-evidenza {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    margin-top: 8px;
}

/* La finestra di fine partita sta nella meta' bassa del campo, con sopra lo
   spazio per il riquadro di promozioni.js. Bordo alto 375, larghezza 400. */
#modal-fine {
    top: 375px;
    transform: translateX(-50%);
    width: 400px;
    min-width: 0;
}
