 body {
     padding: 24px 40px;
     max-width: 1200px;
     margin: 0 auto;
 }

 header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 24px;
 }

 header h1 {
     font-size: 22px;
     margin: 0;
 }

 .top-actions {
     display: flex;
     gap: 10px;
 }

 .top-actions button {
     padding: 10px 16px;
     font-size: 14px;
 }

 .setup-form {
     max-width: 520px;
     margin: 60px auto;
 }

 .setup-form label {
     display: block;
     margin: 14px 0 6px;
     font-size: 14px;
     color: var(--text-muted);
 }

 .setup-form h2 {
     margin-top: 0;
 }

 .waiting-grid {
     display: grid;
     grid-template-columns: 320px 1fr;
     gap: 24px;
 }

 .pin-box {
     text-align: center;
 }

 .pin-box .pin {
     font-size: 56px;
     font-weight: 800;
     letter-spacing: 4px;
     color: var(--accent);
     margin: 8px 0;
 }

 .pin-box img {
     width: 220px;
     height: 220px;
     border-radius: 12px;
     background: #fff;
     padding: 8px;
 }

 .link-row {
     display: flex;
     gap: 8px;
     margin-top: 12px;
 }

 .link-row input {
     font-size: 13px;
 }

 .players-list {
     display: flex;
     flex-direction: column;
     gap: 8px;
     margin-top: 12px;
 }

 .player-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     background: var(--panel-light);
     border-radius: 10px;
     padding: 10px 14px;
 }

 .player-row .credits {
     color: var(--accent);
     font-weight: 700;
 }

 .ready-panel {
     text-align: center;
 }

 .ready-panel input {
     font-size: 22px;
     text-align: center;
     margin: 16px 0;
 }

 .ready-panel .sell-btn {
     font-size: 20px;
     padding: 16px 40px;
 }

 .bidding-panel {
     text-align: center;
 }

 .bidding-panel .player-name {
     font-size: 40px;
     font-weight: 800;
     margin: 4px 0 8px;
 }

 .bidding-panel .current-bid {
     font-size: 72px;
     font-weight: 900;
     color: var(--accent);
     margin: 4px 0;
 }

 .bidding-panel .leader {
     font-size: 20px;
     color: var(--text-muted);
     margin-bottom: 12px;
 }

 .bidding-panel .bidding-actions {
     display: flex;
     gap: 10px;
     justify-content: center;
     flex-wrap: wrap;
     margin-top: 12px;
 }

 .bidding-panel .bidding-actions button {
     flex: 1 1 180px;
     min-width: 180px;
 }

 .timer {
     font-size: 96px;
     font-weight: 900;
     margin: 12px 0;
 }

 .timer.low {
     color: var(--danger);
 }

 .confirm-panel {
     text-align: center;
 }

 .confirm-panel .winner-name {
     font-size: 34px;
     font-weight: 800;
     color: var(--accent);
 }

 .confirm-panel .amount {
     font-size: 24px;
     margin: 8px 0 20px;
 }

 .confirm-actions {
     display: flex;
     gap: 16px;
     justify-content: center;
     margin-top: 16px;
 }

 .confirm-actions button {
     padding: 16px 30px;
     font-size: 18px;
 }

 .cancel-options {
     display: flex;
     gap: 16px;
     justify-content: center;
     margin-top: 20px;
 }

 .layout-with-side {
     display: grid;
     grid-template-columns: 1fr 340px;
     gap: 24px;
     align-items: start;
 }

 .side-panel h3 {
     margin-top: 0;
     font-size: 15px;
     color: var(--text-muted);
     text-transform: uppercase;
     letter-spacing: 0.05em;
 }

 .log-item {
     font-size: 13px;
     padding: 6px 0;
     border-bottom: 1px solid var(--border);
 }

 .modal-backdrop {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.6);
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 50;
 }

 .modal {
     max-width: 420px;
     text-align: center;
 }

 .modal-actions {
     display: flex;
     gap: 12px;
     justify-content: center;
     margin-top: 20px;
 }

 /* Radio ruoli per random per ruolo */
 .role-radio-group {
     display: flex;
     flex-wrap: wrap;
     gap: 8px;
 }

 .role-radio {
     display: flex;
     align-items: center;
     gap: 6px;
     padding: 8px 12px;
     border: 1px solid var(--border, #444);
     border-radius: 8px;
     cursor: pointer;
     user-select: none;
     transition: background 0.15s, border-color 0.15s;
 }

 .role-radio:hover {
     border-color: var(--accent, #4c9aff);
 }

 .role-radio input {
     margin: 0;
 }

 .role-radio-count {
     font-size: 12px;
     color: var(--text-muted, #999);
 }

 .role-radio.exhausted {
     opacity: 0.45;
     cursor: not-allowed;
 }

 .role-radio.exhausted .role-radio-label {
     text-decoration: line-through;
 }

 .drawn-player-box {
     background: rgba(255, 255, 255, 0.03);
 }
 
 .setup-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--panel-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.setup-form select:hover {
  border-color: var(--accent);
}

.setup-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.setup-form select option {
  color: var(--text);
  background: var(--panel);
}