/* Reset */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #585858;
  color: #fff;
}

/* ---------- Navigation ---------- */
nav {
  width: 100%;
  height: 70px;
  background-color: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

nav ul li {
  color: #fff;
  font-size: 1rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: 0.2s ease;
}

nav ul li:hover {
  background-color: #333;
  color: #f44336;
}

/* ---------- Section Layout ---------- */
section > div {
  width: 100%;
  height: calc(100vh - 70px);
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #181818;
  position: absolute;
  top: 70px;
  left: 0;
  opacity: 0;
  z-index: 0;
  transition: 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

section > div.show {
  opacity: 1;
  z-index: 1;
}

/* ---------- Shared Containers ---------- */
.game-container,
.xo-container,
.guess-container {
  background-color: #1f1f1f;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 420px;
  text-align: center;
}

/* ---------- Headings ---------- */
h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #ff5959;
}

/* ---------- Rock Paper Scissors ---------- */
#rockPaperScissors {
  text-align: center;
}

.buttons button {
  font-size: 1rem;
  padding: 0.6rem 1.1rem;
  margin: 0.4rem;
  border: 1px solid #94352f;
  border-radius: 10px;
  background-color: transparent;
  color: #f44336;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buttons button:hover {
  background-color: #f44336;
  color: #1a1a1a;
}

.result p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #ccc;
}

#winner {
  color: #ff7777;
  font-weight: 600;
}

/* ---------- X O Game ---------- */
#XO {
  flex-direction: column;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 10px;
  margin-bottom: 1.5rem;
}

.cell {
  width: 100px;
  height: 100px;
  background-color: #222;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cell:hover {
  background-color: #333;
}

/* Scoreboard */
.scoreboard {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.scoreboard .score span {
  font-weight: bold;
  margin-left: 0.3rem;
}

/* Popup */
.pop {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(10, 10, 10, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(6px);
  display: none;
}

.pop.hide {
  opacity: 0;
  pointer-events: none;
}

.pop .box {
  width: 400px;
  background: linear-gradient(145deg, #1e1e1e, #2c2c2c);
  border-radius: 16px;
  padding: 2rem;
  color: #f1f1f1;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  animation: popIn 0.4s ease-out;
}

.pop .box h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #ffd54f;
}

.pop .box p {
  font-size: 1rem;
  line-height: 1.6;
  color: #ccc;
}

.pop .box button {
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background-color: mediumseagreen;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.pop .box button:hover {
  background-color: seagreen;
  transform: scale(1.05);
}

/* ---------- Guess The Number ---------- */
#GuessTheNumber {
  flex-direction: column;
  text-align: center;
}

input[type="number"] {
  padding: 0.5rem;
  width: 80px;
  font-size: 1.2rem;
}

button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin-top: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  transition: background 0.3s ease;
}

button:hover {
  background: #005bcc;
}

#message {
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

#score {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #aaa;
}