
/* Jogo do Galo v1.0.3 */
.jdg-game {
  --jdg-bg:     #1a2535;
  --jdg-card:   #243045;
  --jdg-line:   rgba(255,255,255,.18);
  --jdg-text:   #ffffff;
  --jdg-muted:  #a0aec0;
  --jdg-o:      #e74c3c;
  --jdg-x:      #2ecc71;
  --jdg-gold:   #FFD700;
  --jdg-radius: 14px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--jdg-bg);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  box-sizing: border-box;
}
.jdg-screen { width: 100%; }

/* ---- LOGO ---- */
.jdg-logo { text-align: center; font-size: 2em; font-weight: 900; margin-bottom: 4px; }
.jdg-logo-sm { font-size: 1.4em; margin-bottom: 6px; }
.jdg-logo-o { color: var(--jdg-o); margin-right: 6px; }
.jdg-logo-x { color: var(--jdg-x); }

/* ---- SETUP ---- */
.jdg-setup-box {
  background: var(--jdg-card);
  border-radius: var(--jdg-radius);
  padding: 36px 32px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.jdg-title {
  color: var(--jdg-text);
  text-align: center;
  margin: 0 0 4px;
  font-size: 1.6em;
  font-weight: 700;
}
.jdg-subtitle {
  text-align: center;
  color: var(--jdg-muted);
  font-size: .9em;
  margin: 0 0 24px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Sections */
.jdg-section { margin-bottom: 20px; }
.jdg-section-label {
  font-size: .85em;
  color: var(--jdg-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Num buttons */
.jdg-num-btns { display: flex; gap: 8px; }
.jdg-num-btn {
  flex: 1;
  background: #1a2535;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: var(--jdg-muted);
  font-size: 1.1em;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.jdg-num-btn.jdg-num-active,
.jdg-num-btn:hover { border-color: var(--jdg-o); color: #fff; }

/* Player inputs */
.jdg-players-inputs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.jdg-input-row { display: flex; align-items: center; gap: 10px; }
.jdg-input-lbl { color: var(--jdg-muted); font-size: .85em; font-weight: 600; width: 76px; flex-shrink: 0; }
.jdg-name-input {
  flex: 1;
  background: #1a2535;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: #fff;
  font-size: .95em;
  padding: 8px 12px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
}
.jdg-name-input:focus { border-color: #3498db; }

/* ---- BUTTONS ---- */
.jdg-btn {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: opacity .15s, transform .1s;
}
.jdg-btn:hover { opacity: .88; transform: translateY(-1px); }
.jdg-btn-start {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-size: 1.05em;
  letter-spacing: .3px;
}
.jdg-btn-sm {
  padding: 7px 16px;
  background: rgba(255,255,255,.1);
  color: var(--jdg-muted);
  font-size: .85em;
}

/* ---- BRACKET SCREEN ---- */
.jdg-bracket-box {
  background: var(--jdg-card);
  border-radius: var(--jdg-radius);
  padding: 32px 28px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.jdg-bracket-title {
  text-align: center;
  color: var(--jdg-gold);
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.jdg-bracket-matches { display: flex; flex-direction: column; gap: 10px; }

.jdg-match-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 12px 16px;
  border-left: 4px solid transparent;
  flex-wrap: wrap;
}
.jdg-match-current  { border-left-color: var(--jdg-gold); background: rgba(255,215,0,.07); }
.jdg-match-played   { border-left-color: var(--jdg-x); opacity: .75; }
.jdg-match-pending  { border-left-color: rgba(255,255,255,.1); }

.jdg-match-name {
  color: var(--jdg-text);
  font-weight: 600;
  font-size: .95em;
  flex: 1;
  text-align: center;
}
.jdg-match-name.jdg-match-winner {
  color: var(--jdg-gold);
  font-weight: 800;
}
.jdg-match-vs-sm {
  color: var(--jdg-muted);
  font-size: .8em;
  font-weight: 700;
  flex-shrink: 0;
}
.jdg-match-badge {
  width: 100%;
  text-align: center;
  color: var(--jdg-x);
  font-size: .78em;
  font-weight: 600;
  margin-top: 2px;
}

/* ---- BOARD SCREEN ---- */
.jdg-game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 360px;
  margin: 0 auto 16px;
}
.jdg-match-info {
  color: var(--jdg-muted);
  font-size: .82em;
  font-weight: 600;
  letter-spacing: .4px;
  text-align: center;
}
.jdg-status-bar {
  color: var(--jdg-text);
  font-size: 1.05em;
  font-weight: 700;
  text-align: center;
  min-height: 1.4em;
}
.jdg-board-wrap { max-width: 320px; margin: 0 auto; }
.jdg-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--jdg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.jdg-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--jdg-line);
  position: relative;
  transition: background .15s;
}
.jdg-cell:hover:not(.jdg-taken) { background: rgba(255,255,255,.05); }
.jdg-cell.jdg-win-cell { background: rgba(255,215,0,.1); }
.jdg-cell-sym {
  font-size: 3.2em;
  font-weight: 900;
  line-height: 1;
}
.jdg-sym-o { color: var(--jdg-o); }
.jdg-sym-x { color: var(--jdg-x); }
.jdg-cell.jdg-win-cell .jdg-cell-sym {
  animation: jdg-win-pulse .55s ease-in-out infinite alternate;
}
@keyframes jdg-win-pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}
.jdg-draw-notice {
  text-align: center;
  color: var(--jdg-gold);
  font-size: .88em;
  font-weight: 600;
  margin-top: 14px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- CHAMPION ---- */
.jdg-champion-box {
  background: var(--jdg-card);
  border-radius: var(--jdg-radius);
  padding: 56px 36px;
  max-width: 380px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.jdg-champion-trophy { font-size: 4em; margin-bottom: 12px; }
.jdg-champion-label {
  color: var(--jdg-muted);
  font-size: .9em;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.jdg-champion-name {
  color: var(--jdg-gold);
  font-size: 2em;
  font-weight: 900;
  margin-bottom: 4px;
}

/* Best-of selector — same style as num-btn */
.jdg-bo-btn {
  flex: 1;
  background: #1a2535;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: var(--jdg-muted);
  font-size: 1.1em;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.jdg-bo-btn.jdg-bo-active,
.jdg-bo-btn:hover { border-color: var(--jdg-x); color: #fff; }

/* Score bar during match */
.jdg-match-score {
  color: var(--jdg-gold);
  font-size: .95em;
  font-weight: 800;
  text-align: center;
  letter-spacing: .5px;
}

/* ---- LEADERBOARD ---- */
.jdg-leaderboard {
  margin-top: 18px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 12px 16px;
}
.jdg-lb-title {
  color: var(--jdg-gold);
  font-size: .78em;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
}
.jdg-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.jdg-lb-row:last-child { border-bottom: none; }
.jdg-lb-leader .jdg-lb-name { color: var(--jdg-gold); }
.jdg-lb-pos { font-size: 1em; width: 24px; text-align: center; flex-shrink: 0; }
.jdg-lb-name { color: var(--jdg-text); font-weight: 600; flex: 1; }
.jdg-lb-wins { color: var(--jdg-x); font-size: .85em; font-weight: 700; }

@media (max-width: 400px) {
  .jdg-setup-box, .jdg-bracket-box { padding: 20px 14px; }
  .jdg-input-row { flex-direction: column; align-items: flex-start; }
  .jdg-input-lbl { width: auto; }
}
