body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f7f7f7;
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: right;
}
.container {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 24px;
}
h1 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 2.5rem;
  color: #1976d2;
}
.mode-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.mode-switch button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  background: #e0e0e0;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.2s;
  min-width: 120px;
}
.mode-switch button.active {
  background: #1976d2;
  color: #fff;
}
.mode-switch select {
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  min-width: 100px;
}
.alphabet-table {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  justify-items: center;
  direction: ltr;
}
.letter-cell {
  background: #fafafa;
  border: 2px solid #ddd;
  border-radius: 8px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}
.letter-cell:hover {
  background: #e3f2fd;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
  transform: translateY(-2px);
  border-color: #1976d2;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #fff;
  padding: 32px 24px 24px 24px;
  border-radius: 12px;
  min-width: 350px;
  max-width: 90vw;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.close {
  position: absolute;
  left: 16px;
  top: 12px;
  font-size: 28px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}
.close:hover {
  color: #333;
}
.answer-btn {
  display: block;
  width: 100%;
  margin: 12px 0;
  padding: 16px;
  font-size: 18px;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}
.answer-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}
.answer-btn.correct {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}
.answer-btn.wrong {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}
.answer-btn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}
@media (max-width: 600px) {
  .alphabet-table {
    grid-template-columns: repeat(4, 1fr);
  }
  .container {
    padding: 16px;
    margin: 20px auto;
  }
  .modal-content {
    padding: 24px 16px 16px 16px;
    min-width: 300px;
  }
  h1 {
    font-size: 2rem;
  }
  .letter-cell {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
} 