* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a2a1a 0%, #2a4a2a 50%, #1a2a1a 100%);
  min-height: 100vh;
  color: #fff;
}

#app { max-width: 1400px; margin: 0 auto; padding: 15px; }
.schermata { display: none; }
.schermata.attiva { display: block; }

/* Auth */
#auth { text-align: center; padding-top: 40px; }
#auth h1 {
  font-size: 3.5em; margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  color: #d4af37;
}
#auth .sottotitolo { color: #8bc48b; margin-bottom: 30px; }
.auth-form { max-width: 320px; margin: 0 auto; }
.auth-form h2 { color: #d4af37; margin-bottom: 20px; }
.auth-form .form-gruppo { margin: 12px auto; }
.auth-form .form-gruppo input { width: 100%; }
.auth-form .btn-primario { width: 100%; margin-top: 10px; }
.auth-switch { margin-top: 15px; font-size: 0.9em; color: #8bc48b; }
.auth-switch a { color: #d4af37; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.nascosto { display: none !important; }
.auth-info { color: #ffc107; font-size: 0.9em; margin-bottom: 15px; }
.auth-footer { margin-top: 20px; font-size: 0.8em; }
.auth-footer a { color: #8bc48b; }
.lobby-footer {
  margin-top: 30px;
  padding-top: 14px;
  text-align: center;
  font-size: 0.85em;
  color: #888;
  border-top: 1px solid #3a3a3a;
}
.lobby-footer a { color: #8bc48b; text-decoration: none; }
.lobby-footer a:hover { text-decoration: underline; }
.gdpr-checkbox {
  display: flex; align-items: center; gap: 8px; font-size: 0.85em;
  color: #ccc; cursor: pointer; margin: 10px auto; max-width: 320px; text-align: left;
}
.gdpr-checkbox input { cursor: pointer; min-width: 18px; min-height: 18px; }
.gdpr-checkbox a { color: #d4af37; }
#messaggioAuth { margin-top: 15px; display: none; }

/* User bar */
.user-bar {
  display: flex; align-items: center; justify-content: center; gap: 15px;
  background: rgba(255,255,255,0.08); border-radius: 10px;
  padding: 12px 20px; margin-bottom: 20px; max-width: 500px; margin-left: auto; margin-right: auto;
}
.user-bar #userNome { font-weight: bold; color: #d4af37; font-size: 1.1em; }
.user-stats { font-size: 0.85em; color: #8bc48b; }
.btn-notifiche {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 1em;
}
.btn-notifiche:hover { background: rgba(255,255,255,0.2); }
.btn-notifiche.attive { background: rgba(76,175,80,0.3); }

.btn-elimina-account {
  background: none; border: none; color: #888; padding: 6px 10px;
  cursor: pointer; font-size: 0.75em; text-decoration: underline;
}
.btn-elimina-account:hover { color: #ef5350; }

/* Privacy */
.privacy-page {
  max-width: 700px; margin: 0 auto; padding: 20px; text-align: left;
  line-height: 1.7; font-size: 0.9em;
}
.privacy-page h2 { color: #d4af37; text-align: center; margin-bottom: 5px; }
.privacy-data { text-align: center; color: #888; font-size: 0.85em; margin-bottom: 20px; }
.privacy-page h3 { color: #8bc48b; margin-top: 18px; margin-bottom: 6px; }
.privacy-page ul { margin-left: 20px; margin-bottom: 10px; }
.privacy-page li { margin-bottom: 4px; }

/* Storage Banner */
.storage-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(0,0,0,0.95); border-top: 1px solid rgba(212,175,55,0.3);
  padding: 15px 20px; display: flex; align-items: center; justify-content: center;
  gap: 15px; font-size: 0.85em; color: #ccc;
}
.storage-banner p { margin: 0; flex: 1; max-width: 600px; }
.storage-banner a { color: #d4af37; }

.btn-logout {
  background: rgba(220, 53, 69, 0.6); border: none; color: #fff;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85em;
}
.btn-logout:hover { background: rgba(220, 53, 69, 0.8); }

/* Cambia gioco (link al portale carte_italia) */
.btn-cambia-gioco {
  background: rgba(212, 175, 55, 0.25); border: 1px solid rgba(212,175,55,0.5);
  color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 0.85em;
  text-decoration: none; transition: background 0.15s;
}
.btn-cambia-gioco:hover { background: rgba(212, 175, 55, 0.5); }

/* Admin */
.btn-admin {
  background: rgba(138, 43, 226, 0.6); border: none; color: #fff;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85em;
}
.btn-admin:hover { background: rgba(138, 43, 226, 0.8); }
.pannello-admin {
  max-width: 600px; margin: 0 auto 20px; padding: 20px;
  background: rgba(138, 43, 226, 0.1); border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 12px; text-align: left;
}
.pannello-admin h3 { color: #bb86fc; text-align: center; margin-bottom: 15px; }
.btn-refresh-admin { display: block; margin: 0 auto 15px; padding: 6px 16px; font-size: 0.85em; }
.admin-sezione { margin-bottom: 15px; }
.admin-sezione h4 { color: #bb86fc; margin-bottom: 8px; font-size: 0.95em; }
.admin-lista { font-size: 0.9em; }
.admin-utente {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; background: rgba(255,255,255,0.05); border-radius: 6px; margin-bottom: 4px;
}
.admin-utente .nome { color: #e0e0e0; }
.admin-utente .stato { font-size: 0.8em; color: #8bc48b; }
.admin-utente .stato.in-stanza { color: #d4af37; }
.admin-stanza {
  background: rgba(255,255,255,0.05); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
}
.admin-stanza-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.admin-stanza-codice { font-family: monospace; font-weight: bold; color: #d4af37; letter-spacing: 1px; }
.admin-stanza-stato { font-size: 0.8em; padding: 2px 8px; border-radius: 4px; }
.admin-stanza-stato.attesa { background: rgba(255,193,7,0.3); color: #ffc107; }
.admin-stanza-stato.inCorso { background: rgba(76,175,80,0.3); color: #4caf50; }
.admin-stanza-stato.fineRound { background: rgba(33,150,243,0.3); color: #2196f3; }
.admin-stanza-stato.finePartita { background: rgba(156,39,176,0.3); color: #ce93d8; }
.admin-stanza-giocatori { font-size: 0.85em; color: #ccc; }
.admin-stanza-giocatori .disconnesso { color: #ef5350; text-decoration: line-through; }
.admin-stanza-info { font-size: 0.8em; color: #8bc48b; margin-top: 4px; }
.admin-email { font-size: 0.8em; color: #888; flex: 1; }
.admin-ip { font-size: 0.75em; color: #666; font-family: monospace; }
.btn-reset-pwd {
  padding: 3px 10px; font-size: 0.75em; border: none; border-radius: 4px;
  background: rgba(255,193,7,0.3); color: #ffc107; cursor: pointer;
}
.btn-reset-pwd:hover { background: rgba(255,193,7,0.5); }
.btn-cancella-utente {
  padding: 3px 10px; font-size: 0.75em; border: none; border-radius: 4px;
  background: rgba(220,53,69,0.3); color: #ef5350; cursor: pointer;
}
.btn-cancella-utente:hover { background: rgba(220,53,69,0.5); }
.admin-lista-vuota { color: #888; font-style: italic; padding: 8px; }

/* Lobby */
#lobby { text-align: center; padding-top: 20px; }
#lobby h1 {
  font-size: 2.5em; margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  color: #d4af37;
}

.form-riga {
  display: flex; gap: 15px; justify-content: center;
  flex-wrap: wrap; margin: 15px auto; max-width: 500px;
}
.form-riga .form-gruppo { margin: 0; flex: 1 1 200px; min-width: 160px; max-width: 240px; }

.form-gruppo { margin: 15px auto; max-width: 300px; }
.form-gruppo label { display: block; margin-bottom: 8px; font-weight: bold; }
.form-gruppo input, .form-gruppo select {
  width: 100%; padding: 12px; border: none;
  border-radius: 8px; font-size: 16px; text-align: center;
}
.form-gruppo select { background: #fff; color: #333; cursor: pointer; }
#codiceStanza { text-transform: uppercase; }

.input-stanza-container { display: flex; gap: 0; max-width: 300px; margin: 0 auto; }
.input-stanza-container input { border-radius: 8px 0 0 8px; flex: 1; }
.btn-unisciti-codice {
  border-radius: 0 8px 8px 0; padding: 12px 15px; margin: 0;
  white-space: nowrap; font-size: 14px;
}
.btn-mostra-stanze {
  margin-top: 10px; font-size: 14px; padding: 10px 20px;
  background: linear-gradient(135deg, #4a90c2 0%, #2e6b9c 100%);
  color: #fff; font-weight: bold;
}
.btn-mostra-stanze:hover { background: linear-gradient(135deg, #5ba0d2 0%, #3a7bac 100%); }

/* Profilo button (icona) */
.btn-profilo {
  background: rgba(212,175,55,0.15); border: 1px solid rgba(212,175,55,0.4);
  color: #fff; font-size: 1.2em; padding: 6px 10px; border-radius: 50%;
  cursor: pointer; line-height: 1;
}
.btn-profilo:hover { background: rgba(212,175,55,0.35); }

/* Schermata profilo */
.profilo-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(212,175,55,0.3);
}
.profilo-header h2 { color: #d4af37; margin: 0; }
.profilo-content { max-width: 600px; margin: 0 auto; padding: 0 12px; }
.profilo-utente {
  text-align: center; padding: 20px;
  background: rgba(0,0,0,0.25); border-radius: 12px; margin-bottom: 20px;
}
.profilo-icon { font-size: 3.5em; margin-bottom: 8px; }
.profilo-nome { font-size: 1.4em; font-weight: bold; color: #d4af37; margin-bottom: 12px; }
.profilo-stats { color: #8bc48b; font-size: 0.95em; line-height: 1.7; }
.profilo-azioni { text-align: center; margin-top: 20px; }
.profilo-azioni .btn-elimina-account { font-size: 0.9em; }

.lista-stanze {
  max-width: 450px; margin: 15px auto 0; max-height: 400px; overflow-y: auto;
  display: none;
}
.stanza-item {
  background: rgba(255,255,255,0.08); border-radius: 10px; padding: 14px 18px;
  margin-bottom: 10px; color: #e0e0e0;
}
.stanza-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stanza-codice {
  font-weight: bold; font-family: monospace; font-size: 1.2em;
  color: #d4af37; letter-spacing: 2px;
}
.stanza-desc { font-size: 0.85em; color: #8bc48b; }
.stanza-squadre { display: flex; flex-direction: column; gap: 8px; }
.stanza-sq {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.2); border-radius: 6px; padding: 8px 12px;
}
.stanza-sq-label { font-weight: bold; color: #d4af37; min-width: 20px; }
.stanza-sq-nomi { flex: 1; font-size: 0.9em; color: #ccc; }
.btn-entra-sq {
  padding: 6px 14px; font-size: 0.8em; border: none; border-radius: 6px;
  cursor: pointer; font-weight: bold; white-space: nowrap;
  background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
  color: #1a2a1a; transition: transform 0.2s, opacity 0.2s;
}
.btn-entra-sq:hover:not(:disabled) { transform: translateY(-1px); }
.btn-entra-sq:disabled {
  background: rgba(255,255,255,0.1); color: #666; cursor: not-allowed;
}
.lista-stanze .nessuna-stanza {
  padding: 20px; text-align: center; color: #8bc48b;
  background: rgba(255,255,255,0.05); border-radius: 10px;
}

.bottoni-lobby { margin-top: 25px; }

.btn-primario, .btn-secondario {
  padding: 12px 30px; font-size: 16px; border: none;
  border-radius: 8px; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; margin: 5px;
}
.btn-primario {
  background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
  color: #1a2a1a; font-weight: bold;
}
.btn-primario:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}
.btn-secondario { background: rgba(255,255,255,0.2); color: #fff; }
.btn-secondario:hover { background: rgba(255,255,255,0.3); }

.divisore {
  margin: 20px 0; color: #8bc48b; font-size: 1.1em;
  display: flex; align-items: center; justify-content: center; gap: 15px;
}
.divisore::before, .divisore::after {
  content: ''; flex: 1; max-width: 100px; height: 1px;
  background: linear-gradient(to right, transparent, #8bc48b, transparent);
}

.messaggio {
  margin-top: 15px; padding: 10px 20px; border-radius: 8px; display: inline-block;
}
.messaggio.errore { background: rgba(220, 53, 69, 0.8); }
.messaggio.successo { background: rgba(40, 167, 69, 0.8); }
.messaggio.info { background: rgba(212, 175, 55, 0.3); color: #d4af37; }

#messaggioGioco {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%); z-index: 1000;
  font-size: 1.3em; padding: 15px 30px; pointer-events: none;
}

/* Regole */
.sezione-regole {
  margin-top: 30px; padding: 20px; background: rgba(0,0,0,0.3);
  border-radius: 12px; text-align: left; max-width: 600px;
  margin-left: auto; margin-right: auto;
}
.sezione-regole h3 { text-align: center; color: #d4af37; margin-bottom: 15px; cursor: pointer; }
.sezione-regole h3::after { content: ' \25BC'; font-size: 0.7em; }
.sezione-regole.chiusa h3::after { content: ' \25B6'; }
.sezione-regole.chiusa .regole-contenuto { display: none; }
.regole-contenuto { font-size: 0.9em; line-height: 1.6; }
.regole-contenuto h4 { color: #8bc48b; margin-top: 15px; margin-bottom: 8px; }
.regole-contenuto ul { margin-left: 20px; margin-bottom: 10px; }
.regole-contenuto li { margin-bottom: 5px; }

/* Torneo */
.btn-torneo {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  color: #fff; font-weight: bold; padding: 12px 30px; font-size: 16px;
  border: none; border-radius: 8px; cursor: pointer; margin: 5px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-torneo:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(233,30,99,0.4); }
.btn-piccolo { padding: 8px 16px; font-size: 13px; }

.torneo-header {
  display: flex; align-items: center; gap: 15px; margin-bottom: 20px;
}
.torneo-header h2 { color: #d4af37; flex: 1; text-align: center; margin-right: 80px; }

#torneoScreen, #tabelloneScreen { padding: 20px; }

/* Iscrizioni torneo */
.torneo-info { text-align: center; margin-bottom: 20px; }
.torneo-info h3 { color: #d4af37; font-size: 1.5em; margin-bottom: 5px; }
.torneo-info p { color: #8bc48b; }
.torneo-progress { margin: 15px auto; max-width: 400px; }
.torneo-progress-bar {
  background: rgba(255,255,255,0.1); border-radius: 8px; height: 24px; overflow: hidden;
}
.torneo-progress-fill {
  background: linear-gradient(135deg, #e91e63, #d4af37); height: 100%;
  transition: width 0.3s; border-radius: 8px;
}
.torneo-progress-text { text-align: center; margin-top: 5px; font-size: 0.9em; color: #ccc; }
.torneo-squadre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; max-width: 800px; margin: 20px auto;
}
.torneo-squadra-card {
  background: rgba(255,255,255,0.08); border-radius: 8px; padding: 12px;
}
.torneo-squadra-card h4 { color: #d4af37; font-size: 0.9em; margin-bottom: 6px; }
.torneo-squadra-card p { font-size: 0.85em; color: #ccc; padding: 2px 0; }
.torneo-squadra-card .slot-vuoto { color: #666; font-style: italic; }
.torneo-giocatore-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.torneo-giocatore-row p { margin: 0; }
.torneo-sposta-select, .torneo-assegna-select {
  padding: 3px 5px; font-size: 0.75em; border: none; border-radius: 4px;
  background: rgba(255,255,255,0.15); color: #ccc; cursor: pointer; max-width: 100px;
}
.torneo-assegna-select { width: 100%; max-width: none; padding: 5px; font-size: 0.8em; }
.btn-unisciti-squadra {
  width: 100%; margin-top: 6px; padding: 6px; font-size: 0.8em; border: none;
  border-radius: 5px; cursor: pointer; font-weight: bold;
  background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%); color: #1a2a1a;
}
.btn-unisciti-squadra:hover { opacity: 0.85; }
.torneo-btns { text-align: center; margin-top: 20px; }
.torneo-nessuno { text-align: center; color: #888; padding: 60px 20px; font-size: 1.1em; }

/* Tabellone */
.tabellone-wrapper { overflow-x: auto; padding: 10px 0; }
.tabellone {
  display: flex; gap: 30px; min-width: max-content; align-items: center;
  padding: 20px;
}
.tabellone-round { display: flex; flex-direction: column; gap: 0; justify-content: center; }
.tabellone-round-title {
  text-align: center; color: #d4af37; font-weight: bold; font-size: 0.85em;
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px;
}
.tabellone-match {
  background: rgba(255,255,255,0.06); border-radius: 8px; padding: 8px 12px;
  min-width: 180px; border-left: 3px solid transparent;
}
.tabellone-match.in-corso { border-left-color: #4caf50; }
.tabellone-match.completata { border-left-color: #d4af37; }
.tabellone-match.attesa { border-left-color: #666; }
.tabellone-team {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: 0.85em; color: #ccc;
}
.tabellone-team.vincitore { color: #d4af37; font-weight: bold; }
.tabellone-team.tbd { color: #555; font-style: italic; }
.tabellone-score { min-width: 30px; text-align: right; }
.tabellone-connector {
  width: 30px; display: flex; flex-direction: column; justify-content: center;
}
.tabellone-line {
  border-right: 2px solid rgba(255,255,255,0.15);
  border-top: 2px solid rgba(255,255,255,0.15);
  border-bottom: 2px solid rgba(255,255,255,0.15);
}
.tabellone-vai-btn {
  display: block; margin-top: 5px; padding: 4px 8px; font-size: 0.75em;
  background: #4caf50; color: #fff; border: none; border-radius: 4px;
  cursor: pointer; text-align: center;
}
.tabellone-vai-btn:hover { background: #388e3c; }

/* Admin torneo */
.admin-torneo-form { display: flex; flex-direction: column; gap: 8px; }
.admin-torneo-row { display: flex; gap: 8px; }
.admin-torneo-row input, .admin-torneo-row select {
  flex: 1; padding: 8px; border-radius: 6px; border: none; font-size: 0.85em;
}
.admin-toggle {
  display: flex; align-items: center; gap: 8px; font-size: 0.85em; color: #ccc; cursor: pointer;
}
.admin-toggle input { cursor: pointer; }
.admin-torneo-attivo { margin-top: 8px; font-size: 0.85em; }
.admin-torneo-attivo .admin-torneo-info { color: #8bc48b; margin-bottom: 5px; }

.torneo-attesa-msg {
  text-align: center; padding: 20px; margin-top: 20px;
  background: rgba(255,193,7,0.1); border: 1px solid rgba(255,193,7,0.3);
  border-radius: 10px; color: #ffc107; font-size: 1.1em; font-weight: bold;
  animation: pulse-attesa 2s ease-in-out infinite;
}
@keyframes pulse-attesa {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.torneo-vittoria {
  text-align: center; padding: 40px 20px;
}
.torneo-vittoria-trofeo {
  font-size: 5em; margin-bottom: 15px;
  animation: trofeo-bounce 1s ease-in-out infinite alternate;
}
@keyframes trofeo-bounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-15px) scale(1.1); }
}
.torneo-vittoria h1 {
  color: #d4af37; font-size: 2em; margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(212,175,55,0.5);
}
.torneo-vittoria p {
  color: #8bc48b; font-size: 1.1em; margin-bottom: 25px;
}

.btn-tabellone-ingame {
  padding: 4px 12px; font-size: 0.75em; border: none; border-radius: 5px;
  background: linear-gradient(135deg, #e91e63, #c2185b); color: #fff;
  cursor: pointer; margin-top: 4px;
}
.btn-tabellone-ingame:hover { opacity: 0.85; }

/* Chat Lobby */
.sezione-chat-lobby {
  margin-top: 20px; padding: 20px; background: rgba(0,0,0,0.3);
  border-radius: 12px; max-width: 500px; margin-left: auto; margin-right: auto;
}
.sezione-chat-lobby h3 { text-align: center; color: #d4af37; margin-bottom: 15px; cursor: pointer; }
.sezione-chat-lobby h3::after { content: ' \25BC'; font-size: 0.7em; }
.sezione-chat-lobby.chiusa h3::after { content: ' \25B6'; }
.sezione-chat-lobby.chiusa .chat-lobby-contenuto { display: none; }
.chat-lobby-messaggi {
  max-height: 250px; overflow-y: auto; padding: 10px;
  background: rgba(0,0,0,0.3); border-radius: 6px; margin-bottom: 10px;
  text-align: left; font-size: 0.85em;
}
.chat-lobby-msg { margin-bottom: 4px; word-wrap: break-word; }
.chat-lobby-ora { color: #666; font-size: 0.8em; }
.chat-lobby-nome { color: #8bc48b; font-weight: bold; }
.chat-lobby-nome.self { color: #d4af37; }
.chat-lobby-testo { color: #e0e0e0; }
.chat-lobby-input-row { display: flex; gap: 8px; }
.chat-lobby-input-row input { flex: 1; padding: 8px; border-radius: 6px; border: none; font-size: 0.9em; }

/* Amici */
.sezione-amici {
  margin-top: 20px; padding: 20px; background: rgba(0,0,0,0.3);
  border-radius: 12px; max-width: 500px; margin-left: auto; margin-right: auto;
}
.sezione-amici h3 { text-align: center; color: #d4af37; margin-bottom: 15px; cursor: pointer; }
.sezione-amici h3::after { content: ' \25BC'; font-size: 0.7em; }
.sezione-amici.chiusa h3::after { content: ' \25B6'; }
.sezione-amici.chiusa .amici-contenuto { display: none; }
.amici-aggiungi { display: flex; gap: 8px; margin-bottom: 15px; }
.amici-aggiungi input { flex: 1; padding: 8px; border-radius: 6px; border: none; font-size: 0.9em; }
.amici-titolo { color: #ffc107; font-size: 0.85em; margin: 10px 0 5px; }
.amici-vuoto { color: #666; text-align: center; font-style: italic; padding: 10px; font-size: 0.9em; }
.amico-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgba(255,255,255,0.05); border-radius: 6px; margin-bottom: 4px;
  font-size: 0.9em;
}
.amico-row.pending { background: rgba(255,193,7,0.1); }
.amico-online { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 4px #4caf50; }
.amico-offline { width: 8px; height: 8px; border-radius: 50%; background: #555; }
.amico-nome { color: #e0e0e0; flex: 1; }
.amico-stanza { font-size: 0.75em; color: #d4af37; }
.btn-amico-accetta { padding: 4px 10px; font-size: 0.75em; border: none; border-radius: 4px; background: #4caf50; color: #fff; cursor: pointer; }
.btn-amico-rifiuta { padding: 4px 10px; font-size: 0.75em; border: none; border-radius: 4px; background: #ef5350; color: #fff; cursor: pointer; }
.btn-amico-invita { padding: 4px 10px; font-size: 0.75em; border: none; border-radius: 4px; background: rgba(212,175,55,0.4); color: #d4af37; cursor: pointer; }
.btn-amico-rimuovi { padding: 2px 8px; font-size: 1em; border: none; border-radius: 4px; background: transparent; color: #888; cursor: pointer; }
.btn-amico-rimuovi:hover { color: #ef5350; }

/* Classifica */
.sezione-classifica {
  margin-top: 25px; padding: 20px; background: rgba(0,0,0,0.3);
  border-radius: 12px; max-width: 500px; margin-left: auto; margin-right: auto;
}
.sezione-classifica h3 {
  text-align: center; color: #d4af37; margin-bottom: 15px; cursor: pointer;
}
.sezione-classifica h3::after { content: ' \25BC'; font-size: 0.7em; }
.sezione-classifica.chiusa h3::after { content: ' \25B6'; }
.sezione-classifica.chiusa .classifica-contenuto { display: none; }
#tabellaClassifica {
  width: 100%; border-collapse: collapse; font-size: 0.9em;
}
#tabellaClassifica th {
  color: #d4af37; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.2);
  text-align: center; font-size: 0.85em;
}
#tabellaClassifica td {
  padding: 7px 6px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05);
}
#tabellaClassifica tr.utente-corrente td { color: #d4af37; font-weight: bold; }
#tabellaClassifica .pos { color: #8bc48b; font-weight: bold; }
#tabellaClassifica .nome-col { text-align: left; }
.classifica-vuota { text-align: center; color: #8bc48b; padding: 15px; }

/* Attesa */
#attesa { text-align: center; padding-top: 60px; }
.codice-stanza {
  background: rgba(255,255,255,0.1); padding: 20px 40px;
  border-radius: 12px; display: inline-block; margin: 20px 0;
}
.codice-stanza strong { font-size: 2.5em; letter-spacing: 5px; color: #d4af37; }

.squadre-attesa { display: flex; justify-content: center; gap: 40px; margin: 20px 0; }
.squadra-attesa {
  background: rgba(255,255,255,0.08); padding: 20px; border-radius: 12px; min-width: 180px;
}
.squadra-attesa h4 { color: #d4af37; margin-bottom: 10px; }
.lista-giocatori-attesa p { padding: 5px 0; color: #8bc48b; }

.loader {
  width: 50px; height: 50px;
  border: 4px solid rgba(255,255,255,0.3); border-top-color: #d4af37;
  border-radius: 50%; margin: 20px auto; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Gioco */
#gioco { display: none; }
#gioco.attiva { display: block; }

#turnoIndicatore {
  font-weight: bold; padding: 8px 16px; border-radius: 20px;
  background: rgba(255,255,255,0.1);
}
#turnoIndicatore.mio-turno { background: #d4af37; color: #1a2a1a; }

/* Altri giocatori */
.altri-giocatori {
  display: flex; justify-content: center; gap: 20px;
  flex-wrap: wrap; margin: 10px 0;
}
.gruppo-giocatori {
  background: rgba(0,0,0,0.25); border-radius: 10px;
  padding: 8px 14px; min-width: 180px;
}
.gruppo-giocatori.compagni { border: 2px solid rgba(212, 175, 55, 0.4); }
.gruppo-giocatori.avversari { border: 2px solid rgba(238, 136, 136, 0.4); }
.gruppo-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 6px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gruppo-nome {
  font-size: 0.8em; font-weight: bold;
  text-transform: uppercase; letter-spacing: 1px;
}
.gruppo-giocatori.compagni .gruppo-nome { color: #d4af37; }
.gruppo-giocatori.avversari .gruppo-nome { color: #e88; }
.gruppo-punti { font-size: 0.95em; font-weight: bold; color: #fff; white-space: nowrap; }
.gruppo-burrachi { font-size: 0.7em; color: #8bc48b; text-align: center; margin-bottom: 6px; }
.gruppo-lista { display: flex; gap: 10px; justify-content: center; }
.altro-giocatore {
  text-align: center; padding: 6px 10px;
  background: rgba(255,255,255,0.06); border-radius: 6px;
}
.altro-giocatore.compagno { border-bottom: 2px solid #d4af37; }
.altro-giocatore.avversario { border-bottom: 2px solid #e88; }
.altro-giocatore .nome-altro { font-size: 0.8em; margin-bottom: 3px; font-weight: bold; }
.altro-giocatore.compagno .nome-altro { color: #d4af37; }
.altro-giocatore.avversario .nome-altro { color: #e88; }
.altro-giocatore .carte-count { font-size: 0.75em; color: #8bc48b; }

/* MODALITA TEST: carte avversario in chiaro */
.mano-altro-test {
  display: flex; flex-wrap: wrap; gap: 2px; justify-content: center;
  margin-top: 6px; padding: 4px;
  background: rgba(255, 200, 0, 0.08); border-radius: 4px;
  border: 1px dashed rgba(255, 200, 0, 0.4);
}
.mano-altro-test .carta { width: 28px; height: 40px; min-width: 28px; }
.mano-altro-test .carta img { width: 100%; height: 100%; object-fit: contain; }
.test-mode-badge {
  position: fixed; top: 4px; right: 4px; z-index: 9999;
  background: rgba(255, 152, 0, 0.9); color: #000;
  padding: 3px 8px; border-radius: 4px;
  font-size: 0.75em; font-weight: bold; letter-spacing: 0.5px;
  pointer-events: none;
}

/* Zona centrale */
.zona-centrale {
  display: flex; align-items: center; justify-content: center;
  gap: 30px; margin: 15px 0;
}

.turno-col {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  min-width: 100px;
}
.turno-col .round-info { font-size: 0.85em; color: #8bc48b; }
.turno-col .round-info strong { color: #fff; }

.mazzo-container, .scarto-container, .pozzetti-container {
  text-align: center;
}
.mazzo-container .label, .scarto-container .label, .pozzetto .label {
  display: block; font-size: 0.75em; color: #8bc48b; margin-top: 5px;
}

.carta-dorso {
  width: 70px; height: 100px;
  background: linear-gradient(135deg, #1a3a6a 0%, #0a2040 100%);
  border-radius: 6px; border: 2px solid #4a7abd;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.carta-dorso::before {
  content: ''; position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1.5px solid #6a9add; border-radius: 3px;
}

.mazzo-carte { cursor: pointer; }
.mazzo-carte:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.4); }
.mazzo-count {
  font-size: 1.2em; font-weight: bold; color: #fff; z-index: 1;
}

.scarto-container {
  max-width: 300px; position: relative;
}
.scarto-slot {
  min-width: 80px; min-height: 105px; position: relative;
  border: 2px dashed rgba(255,255,255,0.3); border-radius: 8px;
  cursor: pointer; display: flex; align-items: flex-end;
  background: rgba(255,255,255,0.05); padding: 4px;
  overflow-x: auto; overflow-y: hidden;
}
.scarto-slot:hover { border-color: #d4af37; }
.scarto-slot .carta {
  width: 60px; height: 86px; flex-shrink: 0;
  margin-left: -42px; transition: margin 0.2s;
}
.scarto-slot .carta:first-child { margin-left: 0; }
.scarto-slot:hover .carta { margin-left: -30px; }
.scarto-slot:hover .carta:first-child { margin-left: 0; }

.pozzetti-container { display: flex; gap: 15px; }
.pozzetto { text-align: center; }
.pozzetto-carte { width: 55px; height: 80px; }
.pozzetto-carte::before { top: 5px; left: 5px; right: 5px; bottom: 5px; }
.pozzetto.preso .pozzetto-carte {
  opacity: 0.3; border-style: dashed; background: transparent;
}
.pozzetto.preso .pozzetto-carte::before { display: none; }

/* Carte */
.carta {
  width: 75px; height: 107px; border-radius: 6px;
  overflow: hidden; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  background: #fff; flex-shrink: 0;
}
.carta img { width: 100%; height: 100%; object-fit: contain; }
.carta:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.5); }
.carta.selezionata {
  transform: translateY(-15px);
  box-shadow: 0 12px 25px rgba(212, 175, 55, 0.6);
  outline: 3px solid #d4af37;
}
.carta.wild { outline: 2px solid #e88; }

/* Combinazioni */
.combinazioni-area {
  display: flex; gap: 20px; margin: 15px 0;
}
.combinazioni-squadra {
  flex: 1; background: rgba(0,0,0,0.2); padding: 12px;
  border-radius: 10px; min-height: 120px;
}
.combinazioni-squadra h4 { color: #8bc48b; font-size: 0.85em; margin-bottom: 8px; }
.combinazioni-squadra.avversari h4 { color: #e88; }

.combinazioni-lista { display: flex; flex-direction: column; gap: 8px; }

.combinazione {
  display: flex; align-items: center; gap: 4px;
  padding: 6px; border-radius: 6px;
  background: rgba(255,255,255,0.05);
  cursor: pointer; position: relative;
}
.combinazione:hover { background: rgba(255,255,255,0.1); }
.combinazione .carta {
  width: 45px; height: 64px; margin-left: -20px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.combinazione .carta:first-child { margin-left: 0; }

.combinazione.burraco-puro {
  border: 2px solid #d4af37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.combinazione.burraco-semipulito {
  border: 2px solid #c0c0c0;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}
.combinazione.burraco-sporco {
  border: 2px solid #a87032;
  box-shadow: 0 0 10px rgba(168, 112, 50, 0.2);
}
.badge-burraco {
  position: absolute; top: -8px; right: 5px;
  font-size: 0.65em; font-weight: bold; padding: 2px 8px;
  border-radius: 10px;
}
.badge-burraco.puro { background: #d4af37; color: #1a2a1a; }
.badge-burraco.semipulito { background: #c0c0c0; color: #1a2a1a; }
.badge-burraco.sporco { background: #a87032; color: #fff; }

/* Combinazioni interattive */
.combinazione { cursor: pointer; transition: outline 0.2s, background 0.2s; }

/* Mano giocatore */
.area-giocatore { margin: 15px 0; text-align: center; }
.area-giocatore h3 { color: #8bc48b; margin-bottom: 8px; font-size: 0.95em; }

/* Etichetta "La tua mano" inline con i bottoni di azione */
.mano-titolo {
  color: #8bc48b; font-size: 0.95em; font-weight: bold;
  margin-right: 8px; align-self: center;
}

.mano-carte {
  display: flex; justify-content: center; gap: 4px;
  flex-wrap: wrap; min-height: 110px; padding: 10px;
}

/* Azioni */
.azioni-mossa {
  display: flex; justify-content: center; gap: 10px;
  margin: 10px 0; flex-wrap: wrap;
}
.btn-azione {
  padding: 10px 20px; font-size: 14px; border: none;
  border-radius: 8px; cursor: pointer; font-weight: bold;
  transition: transform 0.2s;
}
.btn-azione:hover { transform: translateY(-2px); }
.btn-azione.pesca { background: #4a9; color: #fff; }
.btn-azione.gioca { background: #d4af37; color: #1a2a1a; }
.btn-azione.scarta { background: #e88; color: #fff; }
.btn-azione.annulla { background: rgba(255,255,255,0.2); color: #fff; }

/* Fine Round */
#fineRound { text-align: center; padding-top: 30px; }
#fineRound h2 { color: #d4af37; margin-bottom: 20px; }

.riepilogo-burraco {
  display: flex; justify-content: center; gap: 30px;
  margin: 25px 0; flex-wrap: wrap;
}
.colonna-punti {
  background: rgba(255,255,255,0.08); padding: 25px 30px;
  border-radius: 12px; min-width: 250px;
}
.colonna-punti h3 { margin-bottom: 15px; color: #d4af37; }

.tabella-punti { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.tabella-punti td {
  padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tabella-punti td:first-child { text-align: left; }
.tabella-punti td:last-child { text-align: right; font-weight: bold; }
.tabella-punti .riga-totale {
  border-top: 2px solid #d4af37;
  background: rgba(212, 175, 55, 0.15);
}
.tabella-punti .riga-totale td { padding: 10px; font-weight: bold; color: #d4af37; }
.punti-totali { margin-top: 10px; font-size: 1.2em; }

/* Drag & drop */
.carta.dragging { opacity: 0.5; }
.combinazione.drop-hover, .scarto-container.drop-hover {
  outline: 3px dashed #d4af37 !important;
  background: rgba(212, 175, 55, 0.15) !important;
}
.nascosto { display: none !important; }

/* === ANIMATIONS === */

@keyframes cardDraw {
  0% { transform: translateY(-30px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes cardPlay {
  0% { transform: translateY(30px) scale(1.1); opacity: 0.5; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes cardDiscard {
  0% { transform: scale(1.2); opacity: 0.5; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); }
  50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.9); }
  100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); }
}
@keyframes goldFlash {
  0% { background: rgba(212, 175, 55, 0); }
  30% { background: rgba(212, 175, 55, 0.4); }
  100% { background: rgba(212, 175, 55, 0); }
}
@keyframes silverFlash {
  0% { background: rgba(192, 192, 192, 0); }
  30% { background: rgba(192, 192, 192, 0.4); }
  100% { background: rgba(192, 192, 192, 0); }
}
@keyframes slideIn {
  0% { transform: translateX(100px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.anim-pesca .carta { animation: cardDraw 0.4s ease-out; }
.anim-combinazione .combinazione:last-child { animation: cardPlay 0.4s ease-out; }
.anim-scarto .scarto-slot .carta:last-child { animation: cardDiscard 0.5s ease-out; }

.carta.pulse-glow { animation: pulseGlow 1s ease-in-out 2; }
.combinazione.burraco-flash-puro { animation: goldFlash 1s ease-out; }
.combinazione.burraco-flash-sporco { animation: silverFlash 1s ease-out; }

/* Flying card: ghost che vola dal mazzo alla mano con flip a metà */
.carta-volante {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  perspective: 900px;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.3, 1);
  transform-origin: center center;
}
.carta-volante-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.3, 1);
}
.carta-volante-dorso, .carta-volante-faccia {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
.carta-volante-dorso {
  background: linear-gradient(135deg, #1a3a6a 0%, #0a2040 100%);
  border: 2px solid #4a7abd;
}
.carta-volante-dorso::before {
  content: ''; position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1.5px solid #6a9add; border-radius: 3px;
}
.carta-volante-faccia {
  transform: rotateY(180deg);
  background: #fff;
  overflow: hidden;
}
.carta-volante-faccia img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.carta-volante.volo {
  transform: translate(var(--fly-dx), var(--fly-dy)) scale(var(--fly-sx), var(--fly-sy)) rotate(var(--fly-rot, 0deg));
}
.carta-volante.volo .carta-volante-inner {
  transform: rotateY(180deg);
}
@keyframes cartaLanded {
  0% { transform: scale(1.18); }
  50% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
.carta.carta-landed { animation: cartaLanded 0.35s ease-out; }

/* Notifica azione avversario */
.notifica-azione {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85); color: #d4af37;
  padding: 15px 30px; border-radius: 12px;
  font-size: 1.2em; font-weight: bold; z-index: 1001;
  pointer-events: none; border: 2px solid #d4af37;
  animation: fadeInOut 2s ease-in-out forwards;
}

/* Attaccabile highlight */
.combinazione.attaccabile {
  outline: 3px solid #4a9 !important;
  background: rgba(74, 153, 74, 0.15) !important;
}

/* Hand drag reorder */
.carta.drag-over-left { border-left: 3px solid #d4af37; }
.carta.drag-over-right { border-right: 3px solid #d4af37; }
.mano-carte .carta.drag-placeholder { opacity: 0.3; }

/* === LOG MOSSE (in basso, compatto) === */
.pannello-log {
  background: rgba(0,0,0,0.35); border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  max-height: 130px; display: flex; flex-direction: column;
  margin-top: 10px;
}
.log-header {
  padding: 5px 12px; font-weight: bold; font-size: 0.75em; color: #8bc48b;
  border-bottom: 1px solid rgba(255,255,255,0.08); cursor: pointer;
}
.log-header::after { content: ' \25BC'; font-size: 0.7em; }
.pannello-log.chiuso .log-mosse { display: none; }
.pannello-log.chiuso .log-header::after { content: ' \25B6'; }
.log-mosse {
  overflow-y: auto; padding: 4px 10px; font-size: 0.7em;
  display: flex; flex-direction: column; gap: 1px; flex: 1;
}
.log-entry {
  padding: 2px 0; color: #aaa; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.log-entry .log-nome { font-weight: bold; color: #8bc48b; }
.log-entry.burraco { color: #d4af37; font-weight: bold; }
.log-entry.chiusura { color: #e88; font-weight: bold; }

/* Responsive */
.carta-nuova {
  box-shadow: 0 0 12px 3px rgba(76, 175, 80, 0.8);
  transition: box-shadow 0.3s;
}

@media (max-width: 768px) {
  #app { padding: 5px; }
  .carta { width: 45px; height: 65px; }
  .mano-carte { gap: 2px; min-height: 70px; padding: 5px; }
  .mano-carte .carta { margin-left: -10px; }
  .combinazioni-area { flex-direction: column; gap: 5px; }
  .combinazioni-squadra { padding: 5px; }
  .combinazioni-squadra h4 { font-size: 0.75em; margin-bottom: 3px; }
  .combinazioni-lista {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .combinazione { padding: 4px; min-width: 0; }
  .combinazione .carta { width: 36px; height: 52px; margin-left: -16px; }
  /* Burrachi (7+ carte): restano in mezza colonna ma con carte piu' sovrapposte
     per far entrare fino a ~13 carte nello stesso spazio ristretto. */
  .combinazione.burraco-puro .carta,
  .combinazione.burraco-semipulito .carta,
  .combinazione.burraco-sporco .carta {
    margin-left: -25px;
  }
  .combinazione.burraco-puro .carta:first-child,
  .combinazione.burraco-semipulito .carta:first-child,
  .combinazione.burraco-sporco .carta:first-child {
    margin-left: 0;
  }
  .zona-centrale { flex-wrap: nowrap; gap: 8px; padding: 5px 0; justify-content: center; }
  .turno-col { min-width: 72px; gap: 4px; }
  .turno-col #turnoIndicatore { padding: 5px 10px; font-size: 0.8em; border-radius: 14px; }
  .turno-col .round-info { font-size: 0.72em; }
  .carta-dorso { width: 45px; height: 65px; }
  .mazzo-count { font-size: 1em; }
  .scarto-container { max-width: 200px; }
  .scarto-slot { min-width: 50px; min-height: 70px; padding: 2px; }
  .scarto-slot .carta { width: 45px; height: 65px; margin-left: -30px; }
  .pozzetto-carte { width: 40px; height: 58px; }
  .pozzetti-container { gap: 8px; }
  .altri-giocatori { gap: 6px; }
  .gruppo-giocatori { min-width: 150px; padding: 6px 10px; }
  .gruppo-nome { font-size: 0.72em; }
  .gruppo-punti { font-size: 0.9em; }
  .gruppo-burrachi { font-size: 0.65em; margin-bottom: 4px; }
  .riepilogo-burraco { flex-direction: column; gap: 15px; }
  .colonna-punti { min-width: auto; }
  .altri-giocatori { gap: 4px; font-size: 0.8em; }
  .altri-giocatori .giocatore-info { padding: 4px 8px; }
  .area-giocatore { margin: 5px 0; }
  .area-giocatore h3 { font-size: 0.85em; margin-bottom: 4px; }
  .azioni-mossa { gap: 4px; padding: 5px 0; }
  .btn-azione { padding: 8px 12px; font-size: 0.8em; }
  .pannello-log { font-size: 0.8em; }
  #toggleComboAvversari { cursor: pointer; }
  #toggleComboAvversari::after { content: ' \25BC'; font-size: 0.7em; }
  #combinazioniAvversari.nascosto { display: none; }
  #combinazioniAvversari.nascosto + #toggleComboAvversari::after,
  .combinazioni-squadra.avversari:has(#combinazioniAvversari.nascosto) h4::after { content: ' \25B6'; }
  .log-mosse { max-height: 80px; }
  .label { font-size: 0.7em; }
}

/* Badge utenti */
.nome-dorato {
  background: linear-gradient(135deg, #f6d365 0%, #ffcc00 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  text-shadow: 0 0 1px rgba(184, 134, 11, 0.3);
}
.badge {
  display: inline-block;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
  font-weight: bold;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-supporter {
  background: linear-gradient(135deg, #ff6b9d, #c2185b);
  color: #fff;
}
.badge-campione_torneo {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #1a1a1a;
}
.badge .btn-rimuovi-badge {
  color: inherit;
  text-decoration: none;
  margin-left: 4px;
  font-weight: bold;
}
.admin-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.select-badge { font-size: 0.8em; padding: 2px 4px; }

/* Modalità ospite: CTA a fine partita */
.cta-ospite {
  margin-top: 22px;
  padding: 18px;
  border: 2px solid #c9a042;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff8e1 0%, #fef5dd 100%);
  text-align: center;
}
.cta-ospite h3 { margin: 0 0 6px 0; color: #7a5a00; }
.cta-ospite p { margin: 0 0 14px 0; color: #5a4500; }
.cta-ospite-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-ospite-buttons .btn-primario,
.cta-ospite-buttons .btn-cta-scarica {
  text-decoration: none;
  display: inline-block;
  min-width: 150px;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}
/* "Scarica l'app" — verde scuro su fondo dorato, buon contrasto */
.cta-ospite-buttons .btn-cta-scarica {
  background: #2e6b3a;
  color: #fff;
  border: 2px solid #1f5028;
}
.cta-ospite-buttons .btn-cta-scarica:hover { background: #1f5028; }
.btn-tertiario {
  margin-top: 12px;
  background: transparent;
  color: #7a5a00;
  border: 1px solid #c9a042;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
}
.btn-tertiario:hover { background: #fff2c4; }

/* Composizione mista lobby (umani + bot) */
.composizione-mista {
  padding: 8px 10px;
  border: 1px dashed #8bc48b;
  border-radius: 6px;
  background: rgba(139, 196, 139, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.composizione-mista select {
  padding: 5px;
  font-size: 0.9em;
}

/* Pannello suggerimenti IA (modalità ospite /gioca) */
.pannello-suggerimento {
  background: linear-gradient(135deg, #fff8e1 0%, #fff2c4 100%);
  border: 2px solid #c9a042;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 6px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.sugg-riga {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.sugg-icon { font-size: 1.05em; }
.sugg-title {
  color: #7a5a00;
  font-weight: bold;
  font-size: 0.9em;
  white-space: nowrap;
}
.sugg-descrizione {
  color: #2a2a2a;
  font-weight: bold;
}
.sugg-motivazione {
  color: #5a4500;
  font-size: 0.85em;
  font-style: italic;
  margin-top: 3px;
}
/* Evidenzia carte suggerite nella mano */
.mano-carte .carta.suggerita {
  outline: 3px solid #c9a042;
  outline-offset: 2px;
  box-shadow: 0 0 8px rgba(201, 160, 66, 0.6);
}

/* Banner "modalità prova" in alto della schermata gioco */
.banner-ospite {
  background: #c9a042;
  color: #fff;
  padding: 8px 14px;
  text-align: center;
  font-size: 0.9em;
}
.banner-ospite a { color: #fff; text-decoration: underline; font-weight: bold; }
