:root {
  --primary-color: #6366f1;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --purple-color: #8b5cf6;
  --gradient-bg: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

body {
  background: var(--gradient-bg);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--purple-color), var(--primary-color));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.stat-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bg-purple {
  background-color: var(--purple-color) !important;
}

.text-purple {
  color: var(--purple-color) !important;
}

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

.btn-purple:hover {
  background-color: #7c3aed;
  border-color: #7c3aed;
  color: white;
}

.hover-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.hover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.flashcard-preview {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.kanji-large {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.vocab-large {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.furigana-text {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.grammar-large {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.timer-badge {
  background: #fee2e2;
  color: #dc2626;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.flashcard {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.flashcard:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kanji-display {
  font-size: 5rem;
  font-weight: bold;
  color: #374151;
}

.vocab-display {
  font-size: 3rem;
  font-weight: bold;
  color: #374151;
}

.furigana-display {
  font-size: 1.5rem;
  color: #6b7280;
}

.answer-option {
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.answer-option:hover {
  border-color: var(--primary-color);
  background-color: #f8fafc;
}

.answer-option.selected {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

.grammar-item {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.grammar-item:hover {
  background-color: #f8fafc;
}

.grammar-item.active {
  background-color: #eff6ff;
  border-left: 4px solid var(--primary-color);
}

.grammar-item:last-child {
  border-bottom: none;
}

.nav-pills .nav-link {
  border-radius: 8px;
  margin-right: 0.5rem;
  color: #6b7280;
  font-weight: 500;
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
}

.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 12px 12px 0 0 !important;
}

.progress {
  border-radius: 10px;
}

.progress-bar {
  border-radius: 10px;
}

.badge {
  font-weight: 500;
}

.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  border-bottom: 1px solid #e5e7eb;
  border-radius: 12px 12px 0 0;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #5856eb;
  border-color: #5856eb;
}

/* Timeline styles for journey page */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-content {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-content h6 {
  margin-bottom: 0.5rem;
  color: #374151;
}

footer {
  margin-top: auto;
}

@media (max-width: 768px) {
  .kanji-display {
    font-size: 3rem;
  }

  .vocab-display {
    font-size: 2rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .flashcard-preview {
    padding: 1rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline::before {
    left: 0.75rem;
  }

  .timeline-marker {
    left: -1.5rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.vocab-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.vocab-item:hover {
  background-color: #f8f9fa;
}

.vocab-item.active {
  background-color: #e9f5ff;
  border-left: 3px solid #0d6efd;
}

.kanji-item {
  padding: 1rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.kanji-item:hover {
  background-color: #f8f9fa;
}

.kanji-item.active {
  background-color: #e9f5ff;
  border-left: 3px solid #0d6efd;
}