/**
 * Common styles for educational games
 * Shared across Number Garden, Word Quest, and other learning games
 */

/* ==================== Breadcrumbs ==================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.breadcrumbs a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs .separator {
  opacity: 0.5;
}

.breadcrumbs .current {
  font-weight: 600;
}

/* ==================== Buttons ==================== */
.big-button {
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgb(0, 0, 0, 0.1);
}

.big-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0, 0, 0, 0.15);
}

.big-button:active:not(:disabled) {
  transform: translateY(0);
}

.big-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-button {
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid currentcolor;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  transform: translateY(-1px);
}

.secondary-button:active {
  transform: translateY(0);
}

.nav-button {
  padding: 8px 16px;
  font-size: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.nav-button:hover {
  background: rgb(0, 0, 0, 0.05);
}

.text-button {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s ease;
  text-decoration: underline;
  opacity: 0.8;
}

.text-button:hover {
  opacity: 1;
}

.icon-button {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s ease;
}

.icon-button:hover {
  transform: scale(1.1);
}

/* ==================== Modals ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgb(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 24px;
  text-align: center;
}

/* ==================== Settings ==================== */
.setting-group {
  margin-bottom: 24px;
}

.setting-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.setting-select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.setting-select:focus {
  outline: none;
  border-color: #667eea;
}

.setting-description {
  margin-top: 6px;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0;
}

/* ==================== Utility Classes ==================== */
.hidden {
  display: none !important;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: block;
}

/* ==================== Responsive ==================== */
@media (width <= 768px) {
  .modal-content {
    padding: 24px;
    width: 95%;
  }

  .big-button {
    padding: 10px 24px;
    font-size: 1rem;
  }
}

/* ==================== Dark Mode Support ==================== */
@media (prefers-color-scheme: dark) {
  .modal-content {
    background: #2d3748;
    color: #e2e8f0;
  }

  .setting-select {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .nav-button:hover {
    background: rgb(255, 255, 255, 0.1);
  }
}
