/* =========================================================
   GIOCHIAMO - Stile grafico
   ========================================================= */

body {
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

.gio-bg {
    background: linear-gradient(135deg, #46178f 0%, #7c3aed 45%, #a21caf 100%);
    min-height: 100vh;
}

.gio-logo {
    font-weight: 800;
    letter-spacing: -1px;
}

/* Marchio "SAGRA GAME" a due colori */
.gio-logo-sagra {
    color: #fff;
    text-shadow: 2px 2px 0px #46178f;
}
.gio-logo-game {
    color: #ffd60a;
    text-shadow: 2px 2px 0px #a15c00;
}
/* Su sfondo chiaro (dentro una card bianca, es. login/join) i colori vanno
   invertiti per restare leggibili — il viola/oro pieno funziona meglio lì
   del bianco, che sparirebbe su sfondo bianco. */
.card .gio-logo-sagra {
    color: #46178f;
    text-shadow: none;
}
.card .gio-logo-game {
    color: #d97706;
    text-shadow: none;
}

.gio-btn-primary {
    background: linear-gradient(135deg, #7c3aed, #a21caf);
    border: none;
    color: #fff;
    font-weight: 700;
}
.gio-btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9, #86198f);
    color: #fff;
}

.gio-codice {
    font-weight: 800;
    letter-spacing: 3px;
    color: #7c3aed;
}

.gio-codice-input {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 8px;
}

.gio-codice-box {
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 20px 40px;
    display: inline-block;
}

/* --- Timer --- */
.gio-timer {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    color: #46178f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* --- Domanda box (schermo host) --- */
.gio-domanda-box {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px 20px;
}

/* --- Tile risposte stile Kahoot --- */
.gio-tile {
    border: none;
    border-radius: 16px;
    padding: 24px 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 90px;
    width: 100%;
    text-align: center;
    transition: transform 0.1s ease, opacity 0.2s ease;
}
.gio-tile-btn {
    min-height: 130px;
    font-size: 2rem;
    cursor: pointer;
    padding: 16px 14px;
}
.gio-tile-btn:active:not(:disabled) {
    transform: scale(0.96);
}
.gio-tile-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Testo della risposta dentro il tasto (più piccolo del font "grande" della tile,
   pensato in origine per un numero/icona) */
.gio-risposta-testo {
    font-size: 1.05rem;
    line-height: 1.25;
    font-weight: 700;
}

/* --- Numeri risposta (al posto delle forme stile Kahoot) --- */
.gio-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.gio-num-big {
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
}

.gio-tile-a { background: #e21b3c; } /* rosso - triangolo */
.gio-tile-b { background: #1368ce; } /* blu - rombo */
.gio-tile-c { background: #d89e00; } /* giallo/ocra - cerchio */
.gio-tile-d { background: #26890c; } /* verde - quadrato */

.gio-tile-corretta {
    outline: 4px solid #fff;
    box-shadow: 0 0 0 4px #22c55e, 0 8px 20px rgba(0,0,0,0.3);
    transform: scale(1.02);
}
.gio-tile-spenta {
    opacity: 0.35;
}

/* --- Classifica --- */
.gio-classifica-row {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 18px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

/* --- Podio finale --- */
.gio-podio-bar {
    width: 90px;
    background: linear-gradient(180deg, #ffd60a, #f59e0b);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    font-weight: 800;
    color: #46178f;
    font-size: 1.4rem;
}

/* --- Pulsazione bottone quando è ora di agire --- */
.pulse {
    animation: gio-pulse 1s infinite;
}
@keyframes gio-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.7); }
    70% { box-shadow: 0 0 0 14px rgba(255,193,7,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,193,7,0); }
}

@media (max-width: 576px) {
    .gio-tile-btn { min-height: 100px; font-size: 1.6rem; }
    .gio-risposta-testo { font-size: 0.95rem; }
    .gio-timer { width: 48px; height: 48px; font-size: 1.2rem; }
}
