* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

.gbg {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #ffffff;
}
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
body {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.main-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.heading {
  font-size: 3.8rem;
  margin-bottom: 0.2rem;
  margin-top: 0.5rem;
  padding: 0 2rem;
}

.game-description {
  font-size: 1rem;
  margin-bottom: 2rem;
  padding: 0 2rem;
}

#name-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.players {
  height: 70vh;
  width: 35vw;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background-color: rgba(222, 217, 217, 0.171);
  border-radius: 2rem;
  box-shadow: 0 0 20px black;
  backdrop-filter: blur(6px);
  margin-bottom: 4rem;
}

.name {
  font-size: 2.5rem;
}

.players input {
  width: 40vw;
  color: #fff;
  background: transparent;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
  font-size: 1.2rem;
  border: none;
  border-radius: 1rem;
  padding: 20px;
}
.players input::placeholder {
  color: #ccc;
}
.players input:-webkit-autofill,
.players input:-webkit-autofill:hover,
.players input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
  -webkit-text-fill-color: #fff;
  transition: background-color 5000s ease-in-out 0s;
}

.players button {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

#turn-indicator {
  margin-top: 1.5rem;
  font-size: 1.3rem;
  position: relative;
  bottom: 50px;
  color: white;
  transition: all 0.4s ease;
}
.turn-x {
  color: #ffe66d;
  transform: translateY(-3px);
  filter: drop-shadow(0 0 8px #ffe66d);
}
.turn-o {
  color: #6dfcff;
  transform: translateY(3px);
  filter: drop-shadow(0 0 8px #6dfcff);
}

.container {
  height: 60vh;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  position: relative;
  bottom: 40px;
}

.game {
  height: 60vmin;
  width: 60vmin;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5vmin;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  transition: 0.5s ease;
}

.box {
  height: 18vmin;
  width: 18vmin;
  font-size: 8vmin;
  font-weight: 600;
  border: none;
  border-radius: 0.8rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.8);
  transition:
    transform 0.2s ease,
    background-color 0.3s ease;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.box:hover {
  transform: scale(1.04);
  background-color: rgba(255, 255, 255, 0.3);
}
.box:active {
  transform: scale(0.95);
}

button {
  transition: all 0.3s ease;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

.btn {
  padding: 1rem;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.3s ease;
}

.btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.8);
}

.btn:active {
  transform: scale(0.95);
}

#reset-btn {
  position: relative;
  bottom: 10px;
}

.msg {
  font-size: 2.8rem;
  padding: 0 20px;
}

.msg-container {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}
#msg {
  height: 90%;
  width: 60%;
  background-color: rgba(222, 217, 217, 0.171);
  border-radius: 2rem;
  box-shadow: 0 0 20px black;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.msg-btns {
  width: 80%;
  display: flex;
  justify-content: space-evenly;
}

/* Scoreboard */
#scoreboard {
  width: 50%;
  height: 50%;
  padding: 5px;

  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  text-align: center;

  transition: 0.3s ease;
}

#scoreboard:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.22);
}

#scoreboard > p {
  font-size: 1.6rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.5px;
}

#scoreboard strong {
  font-weight: 700;
  color: #ffe66d; /* Highlight Player Names */
}

/* Title */
#scoreboard-title {
  text-align: center;
  color: #fff;
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 700;
}

.hide {
  display: none !important;
}

.winner-text {
  font-size: 2rem;
  font-weight: bold;
  color: white;
}

/* Reset Countdown Overlay */
#countdown-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.2);
  z-index: 200;
}

.countdown-box {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px 60px;
  font-size: 6rem;
  color: white;
  font-weight: bold;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#countdown-number {
  animation: zoom 1s ease forwards;
}

@keyframes zoom {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Winning Celebration */
.win-pattern {
  background: linear-gradient(45deg, #ff4d4d, #ff0000);
  color: #fff;
  font-weight: 700;
  box-shadow:
    0 0 12px #ff6b6b,
    0 0 24px #ff0000;
  animation: winPulse 0.8s infinite alternate;
  transform: scale(1.1);
}
@keyframes winPulse {
  0% {
    box-shadow:
      0 0 10px #ff6b6b,
      0 0 20px #ff0000;
  }
  100% {
    box-shadow:
      0 0 16px #ff0000,
      0 0 32px #ff0000;
  }
}
.fade-box {
  opacity: 0.4;
  pointer-events: none;
  filter: blur(0.6px);
}

@media (max-width: 480px) {
  .heading {
    font-size: 2.8rem;
    margin-top: 6vh;
  }

  .players {
    margin-top: 1rem;
    width: 75vw;
    height: 60vh;
    padding: 2rem 1rem;
  }
  .players .name {
    font-size: 1.8rem;
  }

  .players input {
    width: 60vw;
    font-size: 1.2rem;
    padding: 12px;
  }
  .players button {
    font-size: 1rem;
  }
  #turn-indicator {
    font-size: 1.1rem;
    bottom: 14px;
  }
  .game {
    height: 71vmin;
    width: 70vmin;
    gap: 2vmin;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }

  .box {
    height: 21vmin;
    width: 21vmin;
    font-size: 9vmin;
    border-radius: 0.6rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.8rem 0.8rem;
  }

  #msg {
    width: 80vw;
    height: 70vh;
  }
  .msg {
    padding: 0 20px;
    font-size: 1.7rem;
  }
  #scoreboard {
    max-width: 90%;
    padding: 15px;
  }
  #scoreboard > p {
    font-size: 1.2rem;
  }
  #scoreboard-title {
    font-size: 1.5rem;
  }
}

@media (min-width: 481px) and (max-width: 900px) {
  .heading {
    font-size: 3.5rem;
    margin-top: 5vh;
  }

  .players {
    width: 60vw;
    height: 65vh;
  }
  .players .name {
    font-size: 2.3rem;
  }

  .players input {
    width: 45vw;
    font-size: 1.2rem;
  }

  #turn-indicator {
    font-size: 1.3rem;
    bottom: 45px;
  }
  .game {
    height: 60vmin;
    width: 60vmin;
  }

  .box {
    height: 18vmin;
    width: 18vmin;
    font-size: 8vmin;
  }

  .btn {
    font-size: 3vmin;
  }

  #msg {
    width: 70vw;
    height: 70vh;
  }
  .msg {
    font-size: 2rem;
  }
  #scoreboard > p {
    font-size: 1.4rem;
  }
  #scoreboard-title {
    font-size: 1.8rem;
  }
}

@media (min-width: 901px) {
  .heading {
    font-size: 3.8rem;
  }

  .players {
    width: 35vw;
    height: 70vh;
  }

  .players input {
    width: 28vw;
  }

  #turn-indicator {
    font-size: 1.3rem;
    bottom: 50px;
  }

  .game {
    width: 60vmin;
    height: 60vmin;
  }
}
/* ================================
   Neon XO - Features / SEO Section
================================ */

.seo-content {
  width: min(1100px, 92%);
  margin: 120px auto 40px;
  padding: 40px 30px;

  color: #f5f7ff;
  text-align: center;

  background: rgba(10, 15, 35, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;

  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.25),
    inset 0 0 30px rgba(255, 255, 255, 0.02);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Main headings */

.seo-content h2 {
  margin: 0 0 18px;

  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;

  letter-spacing: -0.5px;

  color: #ffffff;

  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(0, 255, 255, 0.15);
}

.seo-content h2:not(:first-child) {
  margin-top: 55px;
}

/* Paragraphs */

.seo-content > p {
  max-width: 780px;
  margin: 0 auto;

  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.8;

  color: rgba(255, 255, 255, 0.72);
}

/* ================================
   Feature Grid
================================ */

.features {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;

  margin-top: 30px;
}

/* Feature Card */

.feature {
  padding: 25px 20px;

  text-align: left;

  background: rgba(255, 255, 255, 0.045);

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

/* Feature title */

.feature h3 {
  margin: 0 0 10px;

  font-size: 1.05rem;
  font-weight: 600;

  color: #ffffff;
}

/* Feature description */

.feature p {
  margin: 0;

  font-size: 0.9rem;
  line-height: 1.7;

  color: rgba(255, 255, 255, 0.65);
}

/* Hover */

.feature:hover {
  transform: translateY(-5px);

  background: rgba(255, 255, 255, 0.07);

  border-color: rgba(0, 255, 255, 0.35);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 255, 255, 0.08);
}

/* ================================
   Tablet
================================ */

@media (max-width: 850px) {
  .seo-content {
    width: 94%;
    padding: 35px 22px;
    margin-top: 200px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .feature {
    padding: 22px 18px;
  }
}

/* ================================
   Mobile
================================ */

@media (max-width: 600px) {
  .seo-content {
    width: 92%;

    margin: 200px auto 25px;

    padding: 30px 17px;

    border-radius: 18px;
  }

  .seo-content h2 {
    font-size: 1.45rem;
    margin-bottom: 14px;
  }

  .seo-content h2:not(:first-child) {
    margin-top: 42px;
  }

  .seo-content > p {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .features {
    grid-template-columns: 1fr;

    gap: 13px;

    margin-top: 24px;
  }

  .feature {
    padding: 20px 17px;

    border-radius: 15px;
  }

  .feature h3 {
    font-size: 1rem;
  }

  .feature p {
    font-size: 0.86rem;
    line-height: 1.65;
  }
}

/* ================================
   Small Phones
================================ */

@media (max-width: 380px) {
  .seo-content {
    width: 94%;
    padding: 25px 14px;
    margin-top: 50px;
  }

  .seo-content h2 {
    font-size: 1.3rem;
  }

  .seo-content > p {
    font-size: 0.83rem;
  }

  .feature {
    padding: 17px 15px;
  }

  .feature h3 {
    font-size: 0.95rem;
  }

  .feature p {
    font-size: 0.82rem;
  }
}
