/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Arial', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s, color 0.3s;
}

/* Theme Variables */
:root {
  --bg-color: #f4f4f9;
  --text-color: #222;
  --nav-bg: #222;
  --btn-bg: #222;
  --btn-text: #fff;
  --cell-bg: #fff;
  --cell-border: #444;
}

body.dark-mode {
  --bg-color: #000;
  --text-color: cyan;
  --nav-bg: #333;
  --btn-bg: cyan;
  --btn-text: #000;
  --cell-bg: #111;
  --cell-border: cyan;
}

/* Layout Containers */
.center-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
  text-align: center;
}

#setup, #game {
  width: 100%;
  max-width: 500px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  color: var(--btn-text);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0 auto;
}

.navbar .nav-links a {
  color: var(--btn-text);
  text-decoration: none;
}

.navbar .nav-links a:hover {
  color: #00bcd4;
}

.menu-toggle {
  display: none;
  font-size: 1.8em;
  cursor: pointer;
  color: var(--btn-text);
}

.theme-btn {
  background: transparent;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  color: #ffd700;
}

/* Game Board */
.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  gap: 5px;
  margin: 20px auto;
}

.cell {
  width: 100px;
  height: 100px;
  background-color: var(--cell-bg);
  color: var(--text-color);
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--cell-border);
  transition: background 0.3s, color 0.3s, border 0.3s;
}

input {
  width: 100%;
  max-width: 300px;
  padding: 8px;
  margin-bottom: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Buttons */
button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

/* Scoreboard */
.scoreboard {
  margin-top: 20px;
}

/* Footer */
footer {
  background: var(--nav-bg);
  color: var(--btn-text);
  text-align: center;
  padding: 20px;
  width: 100%;
}

footer .social-links a {
  color: #00bcd4;
  margin: 0 8px;
  text-decoration: none;
}

/* Typing Effect */
#typedText {
  border-right: 2px solid #ffd700;
  padding-right: 5px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--nav-bg);
    position: absolute;
    top: 60px;
    right: 0;
    padding: 15px;
    border-radius: 5px;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

}
