/* --- Styles for the Test Your Tamil Page --- */

/* --- Test Page Hero Section --- */
.test-hero {
  padding: 4rem 1rem;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('https://placehold.co/1200x400/A00000/ffffff?text=சோதனை');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  text-align: center;
  border-radius: var(--border-radius);
  margin-bottom: 2.5rem;
}

.test-hero h1 {
  margin: 0;
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.test-hero p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- General Game Section Styling --- */
.game-section {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.game-section h2 {
  text-align: center;
  color: var(--primary-color);
  margin-top: 0;
}

.game-section > p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
}

.game-controls {
  text-align: center;
  margin-top: 1.5rem;
}

.game-btn {
  padding: 10px 25px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin: 5px;
  font-size: 1rem;
}

.game-btn.check {
  background-color: #28a745;
  color: white;
}
.game-btn.reset {
  background-color: #ffc107;
  color: var(--text-color);
}
.game-btn.cta {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* --- Sentence Builder Game --- */
.sentence-result-container {
  max-width: 800px;
  margin: 0 auto;
}

.sentence-box {
  min-height: 60px;
  border: 2px dashed #ccc;
  padding: 10px;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

.word-bank {
  min-height: 60px;
  padding: 10px;
  border-radius: var(--border-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background-color: #e0e0e0;
}

.word-token {
  padding: 8px 15px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 20px;
  cursor: grab;
  user-select: none;
  font-family: var(--tamil-font);
  font-size: 1.2rem;
  transition: background-color 0.2s, transform 0.2s;
}
.word-token:hover {
  transform: scale(1.05);
}
.word-token:active {
  cursor: grabbing;
}

.feedback {
  min-height: 24px;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

.feedback.correct {
  color: #28a745;
}
.feedback.incorrect {
  color: #dc3545;
}

/* --- Quiz Game --- */
#quiz-container {
  max-width: 700px;
  margin: auto;
}
#question-text {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
}
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.option-btn {
  width: 100%;
  padding: 1rem;
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: left;
  font-size: 1.1rem;
  transition: background-color 0.2s;
}
.option-btn:not(:disabled):hover {
  background: #f8d7da;
}
.option-btn.correct {
  background: #d4edda;
  border-color: #28a745;
}
.option-btn.incorrect {
  background: #f8d7da;
  border-color: #dc3545;
}
.option-btn:disabled {
  cursor: not-allowed;
}

/* --- Catch the Letter Game --- */
#catch-game-area {
  position: relative;
}
#game-canvas {
  background-color: #e0f7fa;
  width: 100%;
  border-radius: var(--border-radius);
  cursor: pointer;
}
#game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}
#target-letter-display,
#score,
#timer {
  font-size: 1.2rem;
  font-weight: bold;
}
#target-letter-display span {
  font-family: var(--tamil-font);
  color: var(--primary-color);
  font-size: 1.5rem;
}

#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(224, 247, 250, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--border-radius);
}
