*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Regra estrita de tipografia: ZERO sombras em textos */
h1, h2, h3, p, span, label, button, input, textarea, select, code, strong, a, footer {
  text-shadow: none !important;
  filter: none !important;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #eef2f6;
  color: #0f172a;
  line-height: 1.5;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid #dce4ef;
  padding: 0.9rem 1.5rem;
}

.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sub-tag {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 600;
}

.discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.discord-badge a {
  color: inherit;
  text-decoration: none;
}

.avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
}

main {
  flex: 1;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}

.card {
  background: #ffffff;
  border: 1px solid #dce4ef;
  border-radius: 20px;
  padding: 1.65rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 26px -10px rgba(15, 23, 42, 0.07);
}

.card-top {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-block;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pill-neutral {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.desc {
  color: #475569;
  font-size: 0.94rem;
  margin-bottom: 1.2rem;
}

.controls-bar {
  display: flex;
  gap: 0.85rem;
  align-items: flex-end;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.select-input {
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
}

.turn-banner {
  background: #0f172a;
  color: #ffffff;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.cell {
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #3b82f6;
}

.cell:disabled {
  cursor: default;
}

.cell.sym-x {
  color: #1d4ed8;
}

.cell.sym-o {
  color: #b91c1c;
}

.cell.win-cell {
  background: #dcfce7;
  border-color: #16a34a;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.score-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.score-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.score-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.input-text {
  flex: 1;
  min-width: 220px;
  padding: 0.72rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.btn-primary, .btn-secondary {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: #1d4ed8;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e40af;
}

.btn-secondary {
  background: #0f172a;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #1e293b;
}

.status-msg {
  font-size: 0.88rem;
  font-weight: 700;
  color: #166534;
  margin-bottom: 0.7rem;
}

.records-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 240px;
  overflow-y: auto;
}

.records-list li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
}

footer {
  text-align: center;
  padding: 1.2rem;
  background: #ffffff;
  border-top: 1px solid #dce4ef;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
}

.input-compact {
  min-width: 180px;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
}

.resume-btn {
  margin-left: 0.5rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.resume-btn:hover {
  background: #dbeafe;
}