@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600&display=swap');

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

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* 🧭 Navbar */
nav {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  padding: 18px 0;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #38bdf8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  animation: navGlow 4s ease-in-out infinite alternate;
}

@keyframes navGlow {
  0% { text-shadow: 0 0 8px rgba(56,189,248,0.2); }
  100% { text-shadow: 0 0 20px rgba(56,189,248,0.5); }
}

/* 🎮 Game Container */
.gameContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 60px;
  gap: 50px;
}

/* 📦 Board */
.container {
  display: grid;
  grid-template-rows: repeat(3, 10vw);
  grid-template-columns: repeat(3, 10vw);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.45);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

/* 🎯 Box */
.box {
  border: 1.2px solid rgba(255, 255, 255, 0.08);
  font-size: 7vw;
  font-weight: 600;
  color: #38bdf8;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
  border-radius: 12px;
}

.box:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56,189,248,0.2);
}

/* 🧾 Info Section */
.gameInfo {
  text-align: center;
  max-width: 300px;
  color: #cbd5e1;
}

.gameInfo h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56,189,248,0.3);
}

.info {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #7dd3fc;
}

/* 🧮 Scoreboard */
.scoreboard {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
}

.score {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 🕹️ Buttons */
.buttons button {
  margin: 6px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #e2e8f0;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(59,130,246,0.3);
}

.buttons button:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 0 25px rgba(56,189,248,0.6);
}

/* 🔵 Winner Line */
.line {
  background-color: #38bdf8;
  height: 3px;
  width: 0;
  position: absolute;
  transition: width 0.6s ease-in-out;
  border-radius: 5px;
}

/* 🏁 Win + Draw Animations */
.win {
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  animation: winPulse 1.2s ease-in-out infinite alternate;
}

@keyframes winPulse {
  0% { box-shadow: 0 0 10px rgba(56,189,248,0.3); }
  100% { box-shadow: 0 0 25px rgba(56,189,248,0.8); }
}

.winner-glow {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56,189,248,0.5),
               0 0 20px rgba(56,189,248,0.4);
  animation: glowText 1.5s infinite alternate ease-in-out;
}

@keyframes glowText {
  0% { text-shadow: 0 0 8px rgba(56,189,248,0.2); }
  100% { text-shadow: 0 0 20px rgba(56,189,248,0.7); }
}

.draw-flash {
  animation: drawFlash 1.2s ease-in-out 2 alternate;
}

@keyframes drawFlash {
  0% {
    box-shadow: 0 0 10px rgba(56,189,248,0.2);
    background: rgba(56,189,248,0.05);
  }
  100% {
    box-shadow: 0 0 30px rgba(56,189,248,0.6);
    background: rgba(56,189,248,0.15);
  }
}

/* 👣 Footer */
footer {
  margin-top: 60px;
  padding: 15px;
  font-size: 0.95rem;
  color: #7dd3fc;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-weight: 500;
  letter-spacing: 0.5px;
  animation: footerGlow 6s infinite alternate ease-in-out;
}

@keyframes footerGlow {
  0% { text-shadow: 0 0 8px rgba(56,189,248,0.1); }
  100% { text-shadow: 0 0 18px rgba(56,189,248,0.4); }
}

footer span {
  color: #38bdf8;
  font-weight: 600;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .container {
    grid-template-rows: repeat(3, 25vw);
    grid-template-columns: repeat(3, 25vw);
  }
  nav { font-size: 1.4rem; }
  .gameInfo h1 { font-size: 1.6rem; }
  .info { font-size: 1rem; }
  .buttons button {
    padding: 8px 18px;
    font-size: 0.85rem;
  }
}
.imgbox {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
}

.imgbox img {
  width: 120px;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease-in-out;
  filter: drop-shadow(0 0 10px rgba(56,189,248,0.4));
}
