* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: transparent;
  color: white;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: black;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.58);
  z-index: -1;
}

/* Video Background */
#bg-video {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -2;
  filter: blur(8px);
}

/* Instruction Overlay */
.instruction-overlay {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 15, 30, 0.3);
  color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2em;
  overflow: hidden;
}

.instruction-content {
  background: #1d1c1c;
  padding: 2em;
  border-radius: 0.75em;
  max-width: 800px;
  max-height: 90vh;
  box-shadow: 0 0 25px #000000;
  overflow-y: auto;
  scrollbar-width: none;
}

.instruction-content h1,
.instruction-content h2 {
  color: #00ffcc;
  margin-bottom: 0.5em;
}

.instruction-content p,
.instruction-content li {
  margin-bottom: 1em;
  line-height: 1.6;
}

#start-game-btn {
  margin-top: 1em;
  padding: 0.8em 2em;
}

/* Hangman Container */
.hangman-container {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100vw;
  max-width: 36em;
  padding: 2.5em;
  border-radius: 0.75em;
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.4);
  text-align: center;
  color: #f0f0f0;
  animation: glowBorder 2.5s infinite ease-in-out;
  z-index: 1;
  position: relative;
}

@keyframes glowBorder {
  0% { box-shadow: 0 0 10px rgba(138, 43, 226, 0.4); }
  50% { box-shadow: 0 0 20px rgba(138, 43, 226, 0.7); }
  100% { box-shadow: 0 0 10px rgba(138, 43, 226, 0.4); }
}

/* Game Fullscreen */
.game-fullscreen {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
}

/* Options */
#options-container h3 {
  font-size: 1.2em;
  margin-bottom: 1em;
  color: #ffffff;
}

#options-container div {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2em;
}

#options-container button {
  padding: 0.5em 1.2em;
  border: 2px solid #bb86fc;
  background-color: transparent;
  color: #bb86fc;
  font-weight: 600;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.3s ease;
}

#options-container button:hover,
#options-container button.active {
  background-color: #bb86fc;
  color: #1e1e2f;
}

/* User Input */
#user-input-section {
  display: flex;
  justify-content: center;
  gap: 0.4em;
  font-size: 2em;
  margin: 1.5em 0;
}

.dashes {
  border-bottom: 2px solid #ffffff;
  padding: 0 0.2em;
  width: 1em;
  text-align: center;
  color: #ffffff;
}

/* Canvas */
canvas {
  display: block;
  margin: 1em auto;
  border: 8px solid #bb86fc;
  border-radius: 0.5em;
  background-color: #2e2e40;
  width: 100%;
  max-width: 600px;
  height: auto;
}

/* Result Popup */
.new-game-popup {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 0.6em;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 0 25px rgba(138, 43, 226, 0.6);
  transition: all 0.3s ease-in-out;
  z-index: 100;
}


#result-text h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: white;
}

#result-text p {
  font-size: 1.2em;
  color: #fff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}


#result-text span {
  font-weight: bold;
  color: #bb86fc;
}

.hide {
  display: none;
}

.win-msg {
  color: #4caf50;
}

.lose-msg {
  color: #f44336;
}

/* Game Action Buttons */
.game-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}

.game-actions button,
#new-game-button,
#exit-button {
  margin: 0 10px;
  width: 200px;
}

/* Button Styling */
.btn {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 45px;
  background: transparent;
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #39ff14;
  border-radius: 6px;
  cursor:pointer;
  overflow: hidden;
  z-index: 1;
  transition: color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  color:#39ff14;
  background: #39ff14;
  opacity: 0;
  z-index: -1;
  border-radius: 50%;
  transition: opacity 0.3s;
}

.btn a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}
.btn:hover {
  color: #39ff14;
  box-shadow: 0 0 12px #39ff14, 0 0 25px #39ff14;
  transform: scale(1.05);
}

.btn:hover::before {
  opacity: 0.1;
}


.btn-purple {
  color: #dd2c2c;
  border-color: #dd2c2c;
}

.btn-purple:hover {
  color: #ffffff;
  box-shadow: 0 0 12px #dd2c2c, 0 0 25px #dd2c2c;
}

.btn-green {
  color: #39ff14;
  border-color: #39ff14;
}

.btn-green:hover {
  color: white;
  box-shadow: 0 0 12px #39ff14, 0 0 25px #39ff14;
}
