body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #ece9e6, #ffffff);
  }
  
  h1 {
    margin: 1rem 0;
    color: #333;
  }
  
  .setup {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
  }
  
  .setup input {
    padding: 0.5rem;
    font-size: 1rem;
    border: 2px solid #333;
    border-radius: 6px;
  }
  
  #startBtn {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    background: #333;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  #startBtn:hover {
    background: #555;
  }
  
  #status {
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #222;
  }
  
  .board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);    
    width: 90vmin;   /* keeps square scaling */
    height: 90vmin;
    max-width: 500px;
    max-height: 500px;
    border: 4px solid #333; 
    background-color: white;
  }
  
  .cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    border: 2px solid #333; /* grid lines */
    cursor: pointer;
    background-color: #f0f0f0;
    transition: background 0.3s ease;
    user-select: none;
  }
  
  .cell:hover {
    background-color: #ddd;
  }
  
  /* X and O colors */
  .cell:contains("X") {
    color: #e63946; /* red */
  }
  
  .cell:contains("O") {
    color: #457b9d; /* blue */
  }
  