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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  overflow: hidden;
  position: relative;
}

/* Background Animation */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #04fafd, 5%, #119dff, 70%, #030423);
  z-index: -1;
  overflow: hidden;
}

.bubble {
  height: 60px;
  width: 60px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  position: absolute;
  animation: 4s linear infinite;
}

.bubble::before {
  content: "";
  height: 10px;
  width: 10px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: 20%;
  right: 20%;
}

.bubble:nth-child(1) {
  top: 20%;
  left: 20%;
  animation: animate 8s linear infinite;
}
.bubble:nth-child(2) {
  top: 60%;
  left: 80%;
  animation: animate 10s linear infinite;
}
.bubble:nth-child(3) {
  top: 40%;
  left: 40%;
  animation: animate 3s linear infinite;
}
.bubble:nth-child(4) {
  top: 66%;
  left: 30%;
  animation: animate 7s linear infinite;
}
.bubble:nth-child(5) {
  top: 90%;
  left: 10%;
  animation: animate 9s linear infinite;
}
.bubble:nth-child(6) {
  top: 30%;
  left: 60%;
  animation: animate 5s linear infinite;
}
.bubble:nth-child(7) {
  top: 70%;
  left: 20%;
  animation: animate 8s linear infinite;
}
.bubble:nth-child(8) {
  top: 75%;
  left: 60%;
  animation: animate 10s linear infinite;
}
.bubble:nth-child(9) {
  top: 50%;
  left: 50%;
  animation: animate 6s linear infinite;
}
.bubble:nth-child(10) {
  top: 45%;
  left: 20%;
  animation: animate 10s linear infinite;
}
.bubble:nth-child(11) {
  top: 10%;
  left: 90%;
  animation: animate 9s linear infinite;
}
.bubble:nth-child(12) {
  top: 20%;
  left: 70%;
  animation: animate 7s linear infinite;
}
.bubble:nth-child(13) {
  top: 20%;
  left: 20%;
  animation: animate 8s linear infinite;
}
.bubble:nth-child(14) {
  top: 60%;
  left: 5%;
  animation: animate 6s linear infinite;
}
.bubble:nth-child(15) {
  top: 90%;
  left: 80%;
  animation: animate 9s linear infinite;
}

@keyframes animate {
  0% {
    transform: scale(0) translateY(0) rotate(70deg);
  }
  100% {
    transform: scale(1.3) translateY(-100px) rotate(360deg);
  }
}

/* Screen Layout */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.hidden {
  display: none !important;
}

/* Main Menu */
.menu-container {
  text-align: center;
  max-width: 1200px;
  width: 95%;
  padding: 2rem;
  background: rgba(3, 4, 35, 0.175);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  margin: 6rem auto 2rem; /* Added top margin for navbar */
}

.game-title {
  margin-bottom: 3rem;
}

.game-title h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.game-title p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Game Modes Layout */
.game-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
  max-width: 1000px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.game-mode-card {
  background: rgba(17, 157, 255, 0.15);
  border-radius: 20px;
  padding: 2rem;
  border: 2px solid rgba(4, 250, 253, 0.3);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(5px);
}

.game-mode-card:hover {
  transform: translateY(-5px);
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mode-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 250, 253, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(4, 250, 253, 0.4);
}

.mode-icon svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.mode-header h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0;
}

.mode-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
}

/* Options Row Layout */
.options-row {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  justify-content: center;
}

.level-card,
.precision-option {
  background: rgba(4, 250, 253, 0.1);
  border-radius: 15px;
  padding: 1.5rem 1rem;
  border: 2px solid rgba(4, 250, 253, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  flex: 1;
  min-width: 0;
  backdrop-filter: blur(5px);
}

.level-card:hover,
.precision-option:hover {
  transform: translateY(-3px);
  border-color: rgba(4, 250, 253, 0.6);
  background: rgba(4, 250, 253, 0.15);
}

.level-card.active,
.precision-option.active {
  background: rgba(3, 7, 32, 0.223);
}

.level-icon,
.option-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 250, 253, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(4, 250, 253, 0.4);
  margin: 0 auto 0.75rem;
}

.level-icon svg,
.option-icon svg {
  width: 20px;
  height: 20px;
  color: #04fafd;
}

.level-card h4,
.precision-option h4 {
  color: #04fafd;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.level-card p,
.precision-option p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.select-btn {
  background: #119dff;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.level-card:not(.active) .select-btn,
.precision-option:not(.active) .select-btn {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  box-shadow: none;
}

/* Buttons */
.menu-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.menu-btn,
.mode-btn,
.action-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  font-family: inherit;
}

.mode-btn {
  width: 100%;
  margin-top: auto;
}

.menu-btn.primary,
.mode-btn.primary,
.action-btn.primary {
  background: #119dff;
  color: #ffffff;
}

.menu-btn.primary:hover,
.mode-btn.primary:hover,
.action-btn.primary:hover {
  transform: translateY(-3px);
}

.menu-btn.secondary,
.action-btn.secondary {
  background: rgba(4, 250, 253, 0.1);
  color: #04fafd;
  border: 2px solid rgba(4, 250, 253, 0.4);
}

.menu-btn.secondary:hover,
.action-btn.secondary:hover {
  transform: translateY(-3px);
}

/* Instructions Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 4, 35, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.modal-content {
  background: linear-gradient(
    135deg,
    rgba(3, 4, 35, 0.95),
    rgba(17, 157, 255, 0.1)
  );
  border-radius: 20px;
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  border: 2px solid rgba(4, 250, 253, 0.4);
  backdrop-filter: blur(10px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(4, 250, 253, 0.3);
  background: rgba(3, 4, 35, 0.8);
  border-radius: 20px 20px 0 0;
}

.modal-header h2 {
  color: #ffffff;
  font-size: 1.8rem;
}

.close-btn {
  background: none;
  border: none;
  color: #04fafd;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.close-btn:hover {
  background: rgba(4, 250, 253, 0.1);
  transform: scale(1.1);
}

/* Instructions Tabs */
.instructions-tabs {
  display: flex;
  border-bottom: 1px solid rgba(4, 250, 253, 0.3);
  margin-bottom: 1.5rem;
}

.tab-button {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  font-family: inherit;
}

.tab-button.active {
  color: #04fafd;
  border-bottom-color: #04fafd;
}

.tab-button:hover {
  color: #04fafd;
  background: rgba(4, 250, 253, 0.1);
}

.tab-content {
  display: none;
  padding: 0 2rem 2rem;
}

.tab-content.active {
  display: block;
}

.instructions {
  padding: 0;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.step-number {
  background: #04fafd;
  color: #030423;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content h4 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.step-content p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.tip {
  background: rgba(255, 119, 0, 0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 119, 0, 0.3);
}

/* Game Screen */
#gameScreen {
  flex-direction: column;
  background: linear-gradient(180deg, #04fafd, 5%, #119dff, 50%, #030423);
}

.game-header {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.score-display {
  background: rgba(3, 4, 35, 0.8);
  padding: 1rem 2rem;
  border-radius: 15px;
  border: 2px solid rgba(4, 250, 253, 0.4);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(4, 250, 253, 0.3);
}

.score-label {
  color: #04fafd;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.score-value {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#gameCanvas {
  width: 100vw;
  height: 100vh;
  display: block;
}

/* Game Over Overlay */
.overlay-container {
  background: rgba(3, 4, 35, 0.95);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

.result-card {
  background: linear-gradient(
    135deg,
    rgba(3, 4, 35, 0.9),
    rgba(17, 157, 255, 0.2)
  );
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  width: 95%;
  border: 2px solid rgba(4, 250, 253, 0.4);
  backdrop-filter: blur(10px);
}

.result-card h2 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.final-score {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 2rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.stat-item {
  background: rgba(4, 250, 253, 0.1);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(4, 250, 253, 0.3);
  backdrop-filter: blur(5px);
}

.stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Floating Text */
@keyframes floatUp {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-50px) scale(1.2);
  }
}

.floating-text {
  position: absolute;
  font-family: "Segoe UI", sans-serif;
  font-weight: bold;
  font-size: 24px;
  pointer-events: none;
  animation: floatUp 1.2s ease-out forwards;
  z-index: 10;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Bubble Pop Animation */
@keyframes bubblePop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.bubble-pop {
  position: absolute;
  pointer-events: none;
  animation: bubblePop 0.6s ease-out forwards;
}
/* Bubble Pop Animation */
@keyframes bubblePop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.bubble-pop {
  position: fixed; /* Change from absolute to fixed */
  pointer-events: none;
  animation: bubblePop 0.6s ease-out forwards;
  z-index: 1000; /* Much higher z-index */
  transform-origin: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-modes {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .game-mode-card {
    padding: 1.5rem;
  }

  .options-row {
    flex-direction: column;
    align-items: center;
  }

  .level-card,
  .precision-option {
    width: 100%;
    max-width: 200px;
  }

  .instructions-tabs {
    flex-direction: column;
  }

  .tab-button {
    text-align: center;
    border-bottom: none;
    border-right: 3px solid transparent;
  }

  .tab-button.active {
    border-right-color: #04fafd;
    border-bottom: none;
  }

  .game-title h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .menu-container {
    padding: 1rem;
  }

  .game-title h1 {
    font-size: 2rem;
  }

  .game-mode-card {
    padding: 1rem;
  }

  .mode-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .menu-btn,
  .mode-btn,
  .action-btn {
    min-width: 120px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* Smooth Bubble Pop Animation */
@keyframes bubblePop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  30% {
    transform: scale(1.4);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes particleFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

.bubble-pop {
  position: fixed;
  pointer-events: none;
  animation: bubblePop 0.5s ease-out forwards;
  z-index: 1000;
  transform-origin: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  animation: particleFly 0.6s ease-out forwards;
  z-index: 1000;
}

/* Typing Test Specific Styles */
.typing-test-container {
  max-width: 1000px;
  width: 95%;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(3, 4, 35, 0.9);
  border-radius: 20px;
  border: 2px solid rgba(4, 250, 253, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.typing-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(4, 250, 253, 0.3);
}

.timer {
  font-size: 3rem;
  font-weight: bold;
  color: #f6f6f6;
}

.back-btn {
  background: rgba(4, 250, 253, 0.1);
  color: #ffffff;
  border: 2px solid rgba(4, 250, 253, 0.4);
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.back-btn:hover {
  transform: translateY(-2px);
}

.words-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.6rem;
  line-height: 1.8; /* Tighter line height */
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  font-family: "Courier New", monospace;
  scroll-behavior: smooth;
  text-align: left;
}

.word {
  margin: 0 0.2rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: inline;
  white-space: normal;
}

/* Current word being typed */
.word.current {
  background: rgba(33, 150, 243, 0.3);
  border-bottom: 3px solid #2196f3;
}

/* Completed words */
.word.completed {
  opacity: 0.6;
}

.word.completed.correct {
  color: #4caf50;
}

.word.completed.incorrect {
  color: #f44336;
  text-decoration: line-through;
}

/* Character-level styling */
.char.correct-char {
  color: #4caf50;
}

.char.incorrect-char {
  color: #f44336;
  text-decoration: underline;
}
.input-container {
  margin-top: 2rem;
}

.typing-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  font-size: 1.4rem;
  border: 3px solid rgba(4, 250, 253, 0.4);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
  transition: all 0.3s ease;
  font-family: "Courier New", monospace;
}

.typing-input:focus {
  border-color: #04fafd;
  background: rgba(255, 255, 255, 0.15);
}

.typing-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Custom time input */
.custom-time {
  margin: 1rem 0;
}

.custom-time-input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(4, 250, 253, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.custom-time-input:focus {
  border-color: #04fafd;
  outline: none;
}

/* Results card */
.test-complete {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 4, 35, 0.355);
  display: flex;
  border-radius: 20px;

  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.results-card {
  background: linear-gradient(
    135deg,
    rgba(3, 4, 35, 0.95),
    rgba(17, 157, 255, 0.2)
  );
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  width: 95%;
  border: 2px solid rgba(4, 250, 253, 0.4);
}

.results-card h2 {
  background: linear-gradient(45deg, #04fafd, #119dff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.results-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.results-stats .stat {
  background: rgba(4, 250, 253, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(4, 250, 253, 0.3);
}

.results-stats .stat label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.results-stats .stat span {
  display: block;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.screen {
  position: fixed; /* Change back to fixed */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.scrollable-screen {
  position: relative;
  min-height: 100vh;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

#mainMenu {
  position: relative;
  min-height: 100vh;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

/* Game screens and overlays should remain fixed */
#gameScreen,
#gameOverScreen,
#precisionGameScreen,
#precisionGameOverScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* Game Over Overlay - ensure it's on top */
#gameOverScreen,
#precisionGameOverScreen {
  z-index: 1000; /* Higher z-index */
}

.game-modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  /* No height restrictions */
}

.small-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.game-mode-block {
  grid-column: 1 / -1;
}

/* Ensure body can scroll */
body {
  overflow-y: auto; /* Ensure body can scroll */
}

/* Remove any overflow hidden from parent elements */
html,
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Responsive */
@media (max-width: 1024px) {
  .game-modes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .typing-test-container {
    padding: 1rem;
  }

  .words-container {
    font-size: 1.3rem;
    padding: 1rem;
  }

  .timer {
    font-size: 2rem;
  }

  .results-stats {
    grid-template-columns: 1fr;
  }

  .results-actions {
    flex-direction: column;
  }
}

/* Navbar Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(3, 4, 35, 0.367);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(4, 250, 253, 0.3);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo .logo {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.nav-logo .logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #d0e4f3;
}

/* How to Play button in navbar */
.navbar .how-to-play-btn {
  background: rgba(4, 250, 253, 0.1);
  color: #ffffff;
  border: 2px solid rgba(4, 250, 253, 0.4);
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .how-to-play-btn:hover {
  transform: translateY(-2px);
}

/* Adjust menu container to account for navbar */

/* Remove old header styles since we moved to navbar */
.menu-header {
  display: none;
}

/* Responsive navbar */
@media (max-width: 768px) {
  .navbar {
    padding: 0.8rem 1rem;
  }

  .nav-logo .logo {
    width: 40px;
    height: 40px;
  }

  .nav-logo .logo-text {
    font-size: 1.5rem;
  }

  .navbar .how-to-play-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .menu-container {
    margin-top: 5rem;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-logo .logo-text {
    font-size: 1.3rem;
  }

  .navbar .how-to-play-btn span {
    display: none; /* Hide text on very small screens */
  }

  .navbar .how-to-play-btn i {
    margin-right: 0;
  }
}

.level-select {
  width: 300px;
  background-color: #119dff;
  border-radius: 12px;
  border: none;
  color: white;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.watermark {
  position: fixed;
  bottom: 20px;
  left: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-family: "Segoe UI", sans-serif;
  font-weight: bold;
  z-index: 99999; /* Much higher z-index */
  pointer-events: none;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  background: rgba(3, 4, 35, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(4, 250, 253, 0.3);
}
