/* Game specific styles for Sign Master */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.back-btn {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.back-btn:hover {
  transform: translateX(-5px);
  color: var(--primary);
}

.game-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.game-info {
  background-color: var(--surface);
  padding: 2rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
}

.stat-item i {
  font-size: 1.2rem;
  color: var(--primary);
}

.game-mode, 
.category-select, 
.difficulty {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mode-buttons, 
.category-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.difficulty-buttons {
  display: flex;
  gap: 0.5rem;
}

.mode-btn, 
.category-btn, 
.difficulty-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: none;
  padding: 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn.active, 
.category-btn.active, 
.difficulty-btn.active {
  background-color: var(--primary);
  transform: scale(1.05);
}

.action-btn {
  background-color: var(--accent);
  color: var(--text);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
}

.action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 137, 6, 0.4);
}

/* Gameplay Area */
.gameplay-area {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border-radius: 15px;
  padding: 2rem;
  height: 100%;
}

.game-mode-container {
  display: none;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
}

.game-mode-container.active {
  display: flex;
}

/* Learn Mode */
.sign-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.sign-image-container {
  width: 100%;
  max-width: 300px;
  height: 300px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sign-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sign-info {
  text-align: center;
  max-width: 400px;
}

.sign-info h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.sign-info p {
  line-height: 1.6;
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.nav-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background-color: var(--primary);
}

/* Quiz Mode */
.sign-question {
  text-align: center;
  margin-bottom: 2rem;
}

.sign-question p {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.answer-option {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  padding: 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.answer-option:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.answer-option.correct {
  background-color: var(--secondary);
  color: white;
}

.answer-option.incorrect {
  background-color: #e74c3c;
  color: white;
}

.feedback {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 2rem;
  margin-top: 1.5rem;
}

.feedback.correct {
  color: var(--secondary);
}

.feedback.incorrect {
  color: #e74c3c;
}

/* Challenge Mode */
.timer {
  position: relative;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.timer-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: var(--accent);
  border-radius: 5px;
  transition: width 1s linear;
}

.timer-text {
  position: absolute;
  top: -25px;
  right: 0;
  font-weight: bold;
}

.challenge-question {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.challenge-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.challenge-option {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  padding: 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.challenge-option:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.challenge-streak {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}

/* Game Over Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(22, 22, 26, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.overlay-content {
  text-align: center;
  padding: 2rem;
  background-color: var(--surface);
  border-radius: 15px;
  max-width: 90%;
  width: 400px;
}

.overlay-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#final-score, 
#final-accuracy {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#new-high-score {
  color: var(--secondary);
  font-weight: bold;
  margin-bottom: 1.5rem;
  display: none;
}

/* Media Queries */
@media (max-width: 768px) {
  .game-container {
    grid-template-columns: 1fr;
  }
  
  .game-info {
    order: 2;
  }
  
  .gameplay-area {
    order: 1;
  }
  
  .answer-options,
  .challenge-options {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes correct {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes incorrect {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.sign-image-container.correct {
  animation: correct 0.5s ease;
  box-shadow: 0 0 20px var(--secondary);
}

.sign-image-container.incorrect {
  animation: incorrect 0.5s ease;
  box-shadow: 0 0 20px #e74c3c;
}