body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-image: url("bg.jpg"); 
  background-size: cover;          
  background-position: center;     
  background-attachment: fixed;    
  background-repeat: no-repeat;
  background-color: #89f7fe;
}

h1 {
  color: #222;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#setup-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

input:focus {
  border-color: #66a6ff;
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 10px;
  margin: 20px auto;
}

.cell {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 10px;
  font-size: 2.5rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.3s;
  color: #333;
}

.cell:hover {
  background: #f9f9f9;
  transform: scale(1.02);
}

#status {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  min-height: 1.6em;
}

.controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.1s;
}

#resetBtn:hover {
  background: #555;
}

.game-container {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  text-align: center;
  backdrop-filter: blur(10px);
}

.leaderboard {
  margin-top: 25px;
  padding: 20px;
  border-radius: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  min-width: 220px;
}

.leaderboard h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 5px 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease;
}

.score-row:hover {
  transform: scale(1.05);
}

#scoreX {
  color: #ffdd57;
  font-weight: bold;
}

#scoreO {
  color: #90ee90;
  font-weight: bold;
}

#scoreDraw {
  color: #ffb6c1;
  font-weight: bold;
}

.main-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
}

/* Win line styling */
.win-line {
  position: absolute;
  height: 6px;
  background: grey;
  width: 0;
  top: 50%;
  left: 50%;
  transform-origin: center;
  transition: all 0.4s ease;
  border-radius: 5px;
}
