/* Hide page elements when vowel game is active */
body.vowel-game-active .navbar,
body.vowel-game-active nav,
body.vowel-game-active .content:not(#vowelGameContainer),
body.vowel-game-active .filterPanel,
body.vowel-game-active header,
body.vowel-game-active footer {
  display: none;
}

/* Make sure the body doesn't scroll when vowel game is active */
body.vowel-game-active {
  overflow: hidden !important;
  height: 100vh;
  max-height: 100vh;
}

/* Additional scrollbar removal for all child elements */
#vowelGameContainer * {
  overflow-x: hidden;
}

/* Prevent any potential scrolling on the table body */
#vowelGameContainer .matching-pairs tbody {
  overflow: hidden;
}

/* Ensure table cells don't cause overflow */
#vowelGameContainer .matching-pairs td,
#vowelGameContainer .matching-pairs th {
  overflow: hidden;
  word-wrap: break-word;
}

#vowelGameContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f2e0b3;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 20px;
  overflow: hidden !important;
  box-sizing: border-box;
}

/* Remove scrollbars from questions container */
#vowel-game-questions-container {
  overflow: hidden !important;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  box-sizing: border-box;
}

.game-header, .game-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-footer {
  justify-content: flex-end;
}

.game-stats span {
  color: black;
  font-size: 1.5rem;
  margin-left: 20px;
}

/* Vowel Palette */
.vowels {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 5px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.draggable-vowel {
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: move;
  user-select: none;
  transition: all 0.2s ease;
  font-family: "Serto Antioch Bible", serif;
  /* Better centering adjustments */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 1;
  padding-bottom: 16px;
  padding-right: 17px;
  box-sizing: border-box;
}

.draggable-vowel:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
}

/* Table Styles - Blended with Background */
#vowelGameContainer .matching-pairs {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: #f2e0b3 !important;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(191, 132, 50, 0.2);
  max-height: calc(100vh - 200px);
  table-layout: fixed;
}

/* Table Headers */
#vowelGameContainer .matching-pairs th {
  padding: 15px;
  border-bottom: 2px solid rgb(191, 132, 50) !important;
  font-size: 1.8rem;
  font-weight: bold;
  text-align: center;
  background-color: #f2e0b3 !important;
  color: rgb(101, 67, 33) !important;
}

/* Table Cells - Remove forced centering */
#vowelGameContainer .matching-pairs td {
  padding: 20px;
  border-bottom: 1px solid rgba(191, 132, 50, 0.3) !important;
  vertical-align: top;
  background-color: #f2e0b3 !important;
}

/* Information Column */
#vowelGameContainer .conjugation-info-cell {
  width: 25%;
  text-align: left; /* Changed from center to left */
  font-size: 1.2rem;
  background-color: #f2e0b3 !important;
}

/* Remove the inline-block wrapper that was causing issues */
#vowelGameContainer .conjugation-info-cell > div {
  text-align: left; /* Keep left alignment */
  display: block; /* Changed from inline-block to block */
  width: 100%;
}

#vowelGameContainer .conjugation-info-cell p {
  margin: 8px 0;
  line-height: 1.4;
}

#vowelGameContainer .conjugation-info-cell strong {
  color: #495057;
}

/* Verb Column */
#vowelGameContainer .verb-cell {
  width: 45%;
  text-align: center;
  font-size: 3.5rem;
  font-family: "Serto Antioch Bible", serif;
  position: relative;
  background-color: #f2e0b3;
}

/* Answer Column */
#vowelGameContainer .answer-cell {
  width: 30%;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  font-family: "Serto Antioch Bible", serif;
  background-color: rgba(225, 172, 97, 0.2);
  transition: opacity 0.5s ease;
}

/* Word Container and Landing Zones */
#vowelGameContainer .word-container {
  position: relative;
  display: inline-block;
  margin: 20px 0;
}

#vowelGameContainer .syriac-word-unvocalized {
  position: relative;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  font-feature-settings: "kern" off, "liga" off;
  text-rendering: geometricPrecision;
  font-variant-ligatures: none;
  line-height: 1;
  vertical-align: baseline;
  display: inline-block;
}

/* Landing Zones */
#vowelGameContainer .landing-zone {
  position: absolute;
  background: transparent !important;
  border: 2px dashed transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 10;
  transition: all 0.2s ease;
  border-radius: 4px;
  min-width: 20px;
  min-height: 40px;
}

/* Landing zone states */
#vowelGameContainer .landing-zone.drag-over {
  background: rgba(173, 216, 230, 0.8) !important;
  border: 2px dashed #0d6efd !important;
  transform: scale(1.05);
}

#vowelGameContainer .landing-zone:not(:empty) {
  background: rgba(144, 238, 144, 0.3) !important;
  border: 2px solid rgba(40, 167, 69, 0.5) !important;
  color: #d73502 !important;
  font-size: 1.4rem !important;
  font-weight: bold !important;
  cursor: move;
  align-items: flex-start; /* Position vowels at the top of the landing zone */
  padding-top: 5px; /* Add some space from the very top */
}

#vowelGameContainer .landing-zone:not(:empty):hover {
  background: rgba(144, 238, 144, 0.5) !important;
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Next Verb Button */
#vowelGameContainer .next-verb-btn {
  margin-top: 15px;
  font-size: 1rem;
  padding: 8px 16px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#vowelGameContainer .next-verb-btn:hover {
  background-color: #218838;
}

/* Drag Feedback */
body.dragging-vowel {
  background-color: rgba(255, 235, 235, 0.5);
}

body.dragging-vowel::after {
  content: "Drop anywhere outside landing zones to delete vowel";
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 53, 69, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1.1em;
  z-index: 1000;
  pointer-events: none;
}

/* Toggle Switch Styles for Vocalization Checkbox */
.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1rem 0;
}

.switch-label {
  font-family: 'Baskerville';
  font-size: 1.3rem;
  color: #333;
  user-select: none;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 34px;
  border: 2px solid rgb(191, 132, 50);
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: rgb(225, 172, 97);
}

input:focus + .slider {
  box-shadow: 0 0 1px rgb(225, 172, 97);
}

input:checked + .slider:before {
  transform: translateX(26px);
  background-color: white;
}

.slider:hover {
  background-color: #b8b8b8;
}

input:checked + .slider:hover {
  background-color: rgb(200, 150, 75);
}

/* Animation for switch state changes */
.slider, .slider:before {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional: Add icons or text inside the switch */
.slider:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  transition: opacity 0.3s;
}

input:checked + .slider:after {
  content: '';
  left: auto;
  right: 8px;
}