/* ===============================
   RESET + BASE
================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7fb;
  color: #1f2937;
  text-align: center;
  line-height: 1.6;
}

/* ===============================
   HEADER
================================ */
header {
  padding: 36px 20px 24px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.subtitle {
  color: #6b7280;
  font-size: 1rem;
}

/* ===============================
   CONTROLS
================================ */
.controls {
  margin-top: 18px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.control-group {
  text-align: left;
}

.control-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  background: #ffffff;
  cursor: pointer;
}

/* ===============================
   MAIN / GAME CARD
================================ */
main {
  padding: 20px;
}

.game-area {
  background: #ffffff;
  max-width: 420px;
  margin: 0 auto 40px;
  padding: 26px 20px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

/* ===============================
   BOARD
================================ */
#board-wrapper {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

#board {
  display: grid;
  grid-template-columns: repeat(3, 90px);
  gap: 12px;
}

.cell {
  width: 90px;
  height: 90px;
  background: #eef2ff;
  border-radius: 14px;
  font-size: 42px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

/* ===============================
   STATUS + BUTTON
================================ */
#status {
  margin-top: 12px;
  font-weight: 500;
}

button {
  margin-top: 18px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ===============================
   WIN LINE (RISCO)
================================ */
#win-line {
  position: absolute;
  height: 6px;
  width: 0;
  left: 0;
  top: 0;
  border-radius: 4px;
  transform-origin: left center;
  transition: width 0.4s ease;
  display: none;
  z-index: 3;
}

.row-0 { top: 45px; }
.row-1 { top: 147px; }
.row-2 { top: 249px; }

.col-0 { transform: rotate(90deg); top: 140px; left: -90px; }
.col-1 { transform: rotate(90deg); top: 140px; left: 10px; }
.col-2 { transform: rotate(90deg); top: 140px; left: 110px; }

.diag-0 { transform: rotate(45deg); top: 140px; left: 0; width: 360px; }
.diag-1 { transform: rotate(-45deg); top: 140px; left: 0; width: 360px; }

/* ===============================
   CONFETTI
================================ */
#confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

/* ===============================
   SEO TEXT
================================ */
.seo-text {
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 0 20px;
  text-align: left;
}

.seo-text h2 {
  font-size: 1.4rem;
  margin: 24px 0 8px;
}

.seo-text p {
  color: #374151;
  font-size: 1rem;
}

/* ===============================
   FOOTER
================================ */
footer {
  padding: 20px;
  color: #6b7280;
}

footer nav {
  margin-bottom: 8px;
}

footer a {
  color: #4f46e5;
  text-decoration: none;
  margin: 0 6px;
  font-size: 14px;
}
