@import url('https://fonts.googleapis.com/css2?family=Dongle:wght@300&display=swap');
/* Increase base font size for better readability */
:root {
  font-size: 18px;
}
/* Base styles */
#menu, #practice, body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #000;
  color: #fff;
  font-family: 'Dongle', sans-serif;
  font-weight: normal;
  text-align: center;
  transition: background-color 0.5s ease;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ */
  user-select: none; /* Standard syntax */
}

/* Hide elements */
.hidden {
  display: none;
}

/* Center menu and practice screens */
#menu, #practice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#menu {
  background: radial-gradient(ellipse at center, #333 0%, #000 100%);
}

/* Main heading */
#menu h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.5s ease-in-out forwards;
  opacity: 0;
}

.subtitle {
  font-size: 1.5rem;
  color: #aaa;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-in-out 0.2s forwards;
  opacity: 0; /* Start hidden for animation */
}

/* Buttons container */
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  animation: fadeIn 0.5s ease-in-out 0.4s forwards;
  opacity: 0;
}


/* Better main menu button styles */
.buttons button {
  min-width: 150px;
  padding: 1rem 2rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #333, #111);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.buttons button:hover {
  background: linear-gradient(135deg, #444, #222);
}
.buttons button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Pretty smaller back button */
#back {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
#back:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.6);
}

/* Display area for words */
/* Display area for words */
#practice, #display, #display span {
  text-transform: none !important; /* Prevent auto-capitalization */
}
#display span {
  pointer-events: none; /* Let clicks pass through spans */
}
#display {
  width: 80vw; /* 80% of viewport width */
  height: 20vh; /* 20% of viewport height */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3vw; /* Add space between syllables */
  font-size: 15vw; /* Responsive font size */
  font-weight: normal;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.75);
  padding: 1rem;
  border-radius: 20px;
  color: #fff; /* Base text color for display */
  line-height: 1; /* Adjust line height for large font */
  text-transform: none; /* Prevent any auto-capitalization */
}

/* Back button positioning */
#back {
  position: absolute;
  top: 1rem;
  left: 1rem;
}
 
/* Highlighted syllable */
.highlight {
  color: #fff;
}
/* Dimmed syllable for alternating effect */
.dim {
  color: #aaa;
}
 
/* Counter styling */
#counter {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
  /* Smaller buttons */
  .buttons button,
  #back {
    padding: 1rem 2rem;
    font-size: 1.5rem;
  }
  /* Adjust display font size */
  #display {
    width: 90vw;
    height: 40vh;
    font-size: 20vw;
  }
  /* Adjust heading size */
  #menu h1 {
    font-size: 2rem;
  }
  /* Button grid for mobile */
  .buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .buttons button {
    flex: 1 1 100%;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
