/* =========================
   BASE
========================= */
* {
    box-sizing: border-box;   /* FIX principale pulsanti */
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 10px;
    background: #f5f5f5;
    color: #333;
}

/* contenitore centrale */
.container {
    max-width: 480px;
    margin: auto;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* titoli */
h1 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

/* immagini */
img {
    width: 100%;
    height: auto;
    margin: 10px 0 15px 0;
    border-radius: 8px;
    display:block;
}

/* =========================
   FORM
========================= */
label {
    display:block;
    margin-top:15px;
    margin-bottom:6px;
    font-weight:bold;
}

.form-control {
    width:100%;
    padding:10px;
    border:1px solid #ccc;
    border-radius:5px;
    font-size:1em;
    margin-bottom:10px;   /* spazio sotto input */
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

/* =========================
   BUTTONS
========================= */
.btn {
    display:block;
    width:100%;
    padding:12px;
    border:none;
    border-radius:5px;
    font-size:1em;
    font-weight:bold;
    cursor:pointer;
    text-align:center;
    text-decoration:none;
    transition:0.2s;
    margin-top:10px;  /* spazio sopra */
}

.btn-primary {
    background:#28a745;
    color:white;
}

.btn-primary:hover {
    background:#1e7e34;
}

.btn-secondary {
    background:#007BFF;
    color:white;
}

.btn-secondary:hover {
    background:#0056b3;
}

/* =========================
   INFO GIOCO
========================= */
.game-info {
    margin-top:10px;
    line-height:1.5em;
    margin-bottom:10px;
}

/* =========================
   VOTO BUTTON GRID
========================= */
.voto-buttons {
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:8px;
    margin-top:10px;
    margin-bottom:10px;
}

.voto-buttons button {
    border-radius:5px;
    padding:12px 0;
    border:none;
    background:#007BFF;
    color:white;
    font-weight:bold;
    font-size:1em;
    cursor:pointer;
}

.voto-buttons button.selected {
    background:#28a745;
    transform: scale(1.05);
}

/* =========================
   AUTOCOMPLETE
========================= */
.ui-autocomplete {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius:5px;
    box-shadow:0 4px 10px rgba(0,0,0,0.2);
    font-size:0.95em;
    padding-right:5px;
}

/* evidenzia che è scrollabile */
.ui-autocomplete::after {
    content: "⇅ scorri";
    display:block;
    text-align:center;
    font-size:11px;
    color:#999;
    padding:3px;
}

.ui-menu-item-wrapper {
    padding:8px;
    cursor:pointer;
}

.ui-state-active {
    background:#007BFF !important;
    color:white !important;
}
/* =========================
   THANK YOU
========================= */
#thankyou {
    display:none;
    text-align:center;
    margin-top:50px;
}

#thankyou svg {
    width:100px;
    height:100px;
    fill:#28a745;
}
/* =========================
   BUTTON ROW
========================= */
.btn-row {
    display:flex;
    gap:10px;
    margin-top:20px;
}

.btn-row .btn {
    width:auto;
    flex:1;
}
/* =========================
   BUTTON STACK (verticale)
========================= */
.btn-stack {
    margin-top:20px;
}

.btn-stack .btn {
    margin-top:10px;
}

.btn-stack .btn:first-child {
    margin-top:0;
}