/* General page styling */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
}

.back-link {
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: 1.2em;
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
}

.back-link:hover {
  color: #555;
}

/* Main game board with dividers positioned externally for # shape */
#main-game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Vertical dividers for main game board */
#main-game-board::before, #main-game-board::after {
  content: "";
  position: absolute;
  width: 6px;
  height: calc(100% - 20px);
  background-color: #333;
  top: 10px;
  z-index: 2;
}

#main-game-board::before {
  left: 33.33%;
}

#main-game-board::after {
  left: 65.66%;
}

/* Horizontal dividers for main game board */
#main-game-board .horizontal-divider {
  position: absolute;
  width: calc(100% - 20px);
  height: 6px;
  background-color: #333;
  left: 10px;
  z-index: 2;
}

#main-game-board .horizontal-divider.top {
  top: 33.33%;
}

#main-game-board .horizontal-divider.bottom {
  top: 65.66%;
}

/* Main game cell styling */
.main-cell {
  position: relative;
  background-color: #e0e0e0;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mini game wrapper styling with grid */
.mini-game-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Restores the 3x3 grid */
  gap: 5px;
  width: 100%;
  height: 100%;
}

/* Fading for mini game wrapper only */
.mini-game-wrapper.faded {
  opacity: 0.3;
}

/* Winning style for main cell */
.main-cell.winning,
.main-cell.winning .cell{
  background-color: yellow;
}



/* Large marker for main game - sized and colored appropriately */
.main-marker {
  font-size: 10em;
  font-weight: bold;
  color: inherit;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3; /* Place on top of faded cell */
  opacity: 1;
}

/* Mini game cell styling */
.cell {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  background-color: #f9f9f9;
  border: 1px solid #333;
  transition: background-color 0.3s;
}

.cell.X {
  color: blue;
}

.cell.O {
  color: red;
}

.cell:hover {
  background-color: #ddd;
}

.cell.winning {
  background-color: yellow;
}

#game-info {
  margin-top: 20px;
  font-size: 1.2em;
  text-align: center;
}