body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  margin: 0;
}

.wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.main-layout-container {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding-top: 40px;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ad-unit {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

@media (max-width: 1024px) {
  .main-layout-container {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    max-width: 600px;
  }
}

h1 {
  text-align: center;
  margin-bottom: 24px;
}

#status,
#game-status {
  text-align: center;
  margin: 12px 0;
  font-size: 1.1em;
}

.board {
  display: grid;
  grid-template-columns: repeat(7, 70px);
  grid-template-rows: repeat(6, 70px);
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
  background: #5b7a9e;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
}

.cell {
  width: 70px;
  height: 70px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2em;
  transition: background 0.2s;
  position: relative;
  pointer-events: none;
}

.cell.column-hover:not(.red):not(.yellow):not(.preview-piece) {
  background: #bbdefb;
}

.cell.preview-piece.preview-red {
  background: #e85d75;
  opacity: 0.75;
}

.cell.preview-piece.preview-yellow {
  background: #f4a261;
  opacity: 0.75;
}

.cell.red {
  background: #e85d75;
  color: #fff;
}

.cell.yellow {
  background: #f4a261;
  color: #fff;
}

#restart {
  display: block;
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 1em;
  border-radius: 6px;
  border: none;
  background: #0077cc;
  color: #fff;
  cursor: pointer;
}

#restart:hover {
  background: #005fa3;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
  .container {
    margin: 20px auto;
    padding: 16px;
    border-radius: 8px;
  }

  h1 {
    font-size: 1.5em;
    margin-bottom: 16px;
  }

  .board {
    grid-template-columns: repeat(7, 48px);
    grid-template-rows: repeat(6, 48px);
    gap: 6px;
    padding: 8px;
    margin: 12px 0;
  }

  .cell {
    width: 48px;
    height: 48px;
    font-size: 1.5em;
  }

  #status,
  #game-status {
    font-size: 1em;
    margin: 8px 0;
  }

  #player-names {
    font-size: 0.9em;
  }

  #player-names span {
    min-width: 80px !important;
  }

  #player-names img,
  #player-names div[style*="border-radius: 50%"] {
    width: 24px !important;
    height: 24px !important;
  }
}

@media (max-width: 400px) {
  .container {
    margin: 10px;
    padding: 12px;
  }

  h1 {
    font-size: 1.3em;
  }

  .board {
    grid-template-columns: repeat(7, 40px);
    grid-template-rows: repeat(6, 40px);
    gap: 5px;
    padding: 6px;
  }

  .cell {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }

  #player-names {
    font-size: 0.85em;
  }

  #player-names span {
    min-width: 60px !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
  }

  #player-names img,
  #player-names div[style*="border-radius: 50%"] {
    width: 20px !important;
    height: 20px !important;
  }

  #timer-container {
    font-size: 0.9em;
  }
}