:root {
  --correct-color: #6aaa64;
  --present-color: #c9b458;
  --absent-color: #787c7e;
  --key-bg: #d3d6da;
  --border-color: #d3d6da;
  --transition-duration: 0.3s;
}

[data-bs-theme="dark"] {
  --key-bg: #818384;
  --border-color: #3a3a3c;
  --correct-color: #538d4e;
  --present-color: #b59f3b;
  --absent-color: #3a3a3c;
}

body {
  transition: background-color var(--transition-duration), color var(--transition-duration);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Mobilde zoom engelleyici - sadece game section için */
#gameSection {
  touch-action: manipulation; /* Double-tap zoom'u engeller */
  user-select: none; /* Text selection'ı engeller */
  -webkit-user-select: none; /* Safari için */
  -webkit-touch-callout: none; /* iOS'ta long press menu'yu engeller */
  -webkit-tap-highlight-color: transparent; /* Tap highlight'ı kaldırır */
}

.container {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
  width: 100%;
}

.grid-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.grid-cell {
  width: 60px;
  height: 60px;
  border: 2px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  transition: border-color var(--transition-duration);
}

@media (max-width: 768px) {
  .grid-cell {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }
}

.keyboard-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
  touch-action: manipulation;
}

.key {
  background-color: var(--key-bg);
  border: none;
  border-radius: 4px;
  padding: 15px 10px;
  min-width: 40px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--transition-duration);
}

.key[data-key="ß"] {
  text-transform: none;
}

/* Special case for German ß character in grid cells */
.grid-cell.has-szlig {
  text-transform: none;
}

.key[data-key="ENTER"],
.key[data-key="DELETE"] {
  min-width: 65px;
  font-size: 0.8rem;
}

/* DELETE tuşundaki icon'un tıklama alanını etkilememesi için */
.key[data-key="DELETE"] i {
  pointer-events: none; /* Icon'a tıklama girmesin, button'a gitsin */
}

@media (max-width: 480px) {
  .keyboard-container {
    padding: 5px;
  }

  .keyboard-row {
    gap: 3px;
    margin-bottom: 5px;
  }

  .key {
    padding: 12px 8px;
    min-width: 28px;
    font-size: 0.9rem;
  }

  .key[data-key="ENTER"],
  .key[data-key="DELETE"] {
    min-width: 55px;
    font-size: 0.7rem;
    padding: 14px 10px; /* Daha büyük tıklama alanı */
  }
}

@media (max-width: 360px) {
  .key {
    padding: 10px 6px;
    min-width: 24px;
    font-size: 0.8rem;
  }

  .key[data-key="ENTER"],
  .key[data-key="DELETE"] {
    min-width: 50px;
    font-size: 0.65rem;
    padding: 12px 8px; /* En küçük ekranlarda bile yeterli alan */
  }
}

.correct {
  background-color: var(--correct-color);
  color: white;
  border-color: var(--correct-color);
}

.present {
  background-color: var(--present-color);
  color: white;
  border-color: var(--present-color);
}

.absent {
  background-color: var(--absent-color);
  color: white;
  border-color: var(--absent-color);
}

.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  10% {
    transform: translateX(-10px);
  }
  20% {
    transform: translateX(10px);
  }
  30% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  50% {
    transform: translateX(-6px);
  }
  60% {
    transform: translateX(6px);
  }
  70% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
  90% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

.bounce {
  animation: bounce 0.5s;
}

@keyframes bounce {
  0%,
  20% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  50% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(-15px);
  }
  80% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Add modal animation */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
}

.modal.fade .modal-dialog {
  transform: scale(0.8);
}

.modal.show .modal-dialog {
  transform: scale(1);
}

/* Language Dropdown */
.flag-icon {
  font-size: 1.1em;
  margin-right: 0.5rem;
}

.dropdown-menu {
  min-width: 160px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-item {
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  transform: translateX(2px);
}

.dropdown-item .flag-icon {
  margin-right: 0.75rem;
  font-size: 1em;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: #2d3748;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--bs-dark);
  border-color: #495057;
}

/* Word Length Selection Buttons */
.btn-group {
  flex-wrap: wrap;
  justify-content: center;
}

.btn-group .btn {
  min-width: 80px;
  margin: 2px;
  border-radius: 6px !important;
  font-weight: 500;
}

@media (max-width: 768px) {
  .btn-group {
    gap: 3px;
  }
  
  .btn-group .btn {
    font-size: 0.7rem;
    min-width: 60px;
    padding: 0.25rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .btn-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .btn-group .btn {
    font-size: 0.65rem;
    min-width: auto;
    padding: 0.3rem 0.15rem;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .btn-group {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-width: 250px;
  }
  
  .btn-group .btn {
    font-size: 0.6rem;
    padding: 0.25rem 0.1rem;
  }
}

/* FAQ Section Styles */
#faq {
  background: #f8f9fa;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 40px 32px;
  max-width: 800px;
  margin: 0 auto 48px auto;
}
#faq h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2rem;
}
#faq h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}
#faq p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 0.5rem;
}
#faq .mb-4 {
  margin-bottom: 1.7rem !important;
}
@media (max-width: 768px) {
  #faq {
    padding: 24px 10px;
    max-width: 98vw;
  }
  #faq h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
  }
  #faq h3 {
    font-size: 1rem;
  }
  #faq p {
    font-size: 0.97rem;
  }
}
@media (max-width: 480px) {
  #faq {
    padding: 14px 2vw;
    border-radius: 10px;
  }
  #faq h2 {
    font-size: 1.05rem;
  }
  #faq h3 {
    font-size: 0.95rem;
  }
  #faq p {
    font-size: 0.93rem;
  }
}
