/* CSS Variables for Design System */

/* Dark Mode Variables */
.dark-mode {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-light: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --border-color: #374151;
}

/* Mobile navigation styles are handled by header.css */

/* Base Styles */

@media (max-width: 768px) {
  body {
    padding-top: 70px; /* Smaller header on mobile */
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section Styles */
.section {
  padding: 6rem 0;
}

.section-title {
  font-family: "Poppins", sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 1.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-description {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Vocab Hero Section */
.vocab-hero {
  min-height: calc(55vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  padding: 3rem 0 2.5rem;
}

.vocab-hero .hero-bg {
  display: none; /* Hide any background image */
}

.vocab-hero .floating-elements {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.vocab-hero .floating-element {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

.vocab-hero .floating-element:nth-child(1) {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.vocab-hero .floating-element:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.vocab-hero .floating-element:nth-child(3) {
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.vocab-hero .hero-content {
  text-align: center;
  z-index: 2;
  padding: 2rem;
  max-width: 850px;
}

.vocab-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease forwards;
}

.vocab-hero .hero-badge i {
  color: #f59e0b;
}

.vocab-hero .hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    #00d4ff 0%,
    #46bbe5 25%,
    #2d9cdb 50%,
    #10b981 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.vocab-hero .hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  max-width: 650px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

/* Hero Stats */
.vocab-hero .hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.5s forwards;
  opacity: 0;
}

.vocab-hero .hero-stats .stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem 1.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.vocab-hero .hero-stats .stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

.vocab-hero .hero-stats .stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.vocab-hero .hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
  margin-bottom: 1rem;
}

.vocab-hero .hero-cta-secondary {
  animation: fadeInUp 0.8s ease 0.7s forwards;
  gap: 0.75rem;
  margin-bottom: 0;
}

.vocab-hero .cta-primary,
.vocab-hero .cta-secondary {
  padding: 0.9rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.vocab-hero .cta-primary {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.vocab-hero .cta-primary.cta-featured {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.vocab-hero .cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.vocab-hero .cta-primary.cta-featured:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.vocab-hero .cta-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.vocab-hero .cta-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search Container */
.search-container {
  background: var(--bg-secondary);
  padding: 3rem 0;
  margin-top: 0;
}

.search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0.5rem;
}

.search-box input {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-box button {
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-box button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.search-results {
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.search-results h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.word-list {
  display: grid;
  gap: 1rem;
}

.word-result {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.word-result:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.word-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.word-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.word-pronunciation {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}

.word-definition {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.word-example {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(79, 70, 229, 0.05);
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.word-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.word-category {
  display: inline-block;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
}

.word-level {
  display: inline-block;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
}

.no-results {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: 2rem;
}

/* Daily Challenge Modal */
.daily-challenge-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  color: var(--primary-color);
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--error-color);
}

.challenge-word {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.challenge-word h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
}

.challenge-word .pronunciation {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 1.1rem;
}

.challenge-task {
  margin-bottom: 2rem;
}

.challenge-task p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.definition {
  background: rgba(16, 185, 129, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--success-color);
}

.example {
  background: rgba(79, 70, 229, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

/* Notifications */
.notification {
  position: fixed;
  top: 100px;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: var(--success-color);
}

.notification.error {
  background: var(--error-color);
}

.notification.info {
  background: var(--primary-color);
}

/* Progress Indicators */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.stat-card:hover::before {
  opacity: 1;
}

/* Enhanced Flashcard Styles */
.flashcard-container {
  perspective: 1000px;
  height: 220px;
  margin-bottom: 1rem;
  position: relative;
}

.flashcard-hint {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
}

.flashcard-progress {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.level-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.level-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
}

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

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

/* Search enhancements */
.search-container {
  background: var(--bg-secondary);
  padding: 3rem 0;
  margin-top: 0;
}

.search-box {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 0.75rem;
}

.search-box input {
  flex: 1;
  padding: 1.125rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1.05rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-box button {
  padding: 1.125rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.125rem;
  min-width: 60px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.search-box button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

mark {
  background: rgba(255, 235, 59, 0.3);
  padding: 0.1em;
  border-radius: 2px;
}

/* Accessibility improvements */
.btn:focus,
.control-btn:focus,
.nav-link:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dark mode enhancements */
.dark-mode .search-box input {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.dark-mode .modal-content {
  background: var(--bg-secondary);
}

.dark-mode .challenge-word {
  background: var(--bg-tertiary);
}

.dark-mode .tip-card {
  background: var(--bg-primary);
}

.dark-mode .level-card {
  background: var(--bg-primary);
}

.dark-mode .level-beginner .level-badge {
  background: rgba(16, 185, 129, 0.2);
}

.dark-mode .level-intermediate .level-badge {
  background: rgba(245, 158, 11, 0.2);
}

.dark-mode .level-advanced .level-badge {
  background: rgba(239, 68, 68, 0.2);
}

.dark-mode .word-count {
  background: rgba(79, 70, 229, 0.15);
}

/* Word of the Day Styles */
.word-of-day-content {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.word-of-day-word {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.word-of-day-pronunciation {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.word-of-day-definition {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.word-of-day-example {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.word-of-day-category {
  display: inline-block;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Enhanced button states */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

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

/* Interactive elements */
.quiz-option,
.flashcard,
.category-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulse animation for stats */

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Learning Path */
.learning-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.level-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
}

.level-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.level-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
  text-decoration: none;
}

.level-card:hover::before {
  transform: scaleX(1);
}

/* Level Badge */
.level-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.level-beginner .level-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.level-intermediate .level-badge {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.level-advanced .level-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Level Icons with different colors */
.level-beginner .level-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.level-intermediate .level-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.level-advanced .level-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.level-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.75rem;
  background: var(--gradient-secondary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  transition: all 0.3s ease;
}

.level-card:hover .level-icon {
  transform: scale(1.1) rotate(5deg);
}

.level-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
}

.level-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-size: 1rem;
  flex-grow: 1;
}

.word-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
  padding: 0.625rem 1.25rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.level-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.level-card:hover .level-cta {
  opacity: 1;
  transform: translateY(0);
}

.level-beginner:hover {
  border-color: #10b981;
}

.level-intermediate:hover {
  border-color: #f59e0b;
}

.level-advanced:hover {
  border-color: #ef4444;
}

/* Interactive Vocabulary */
.vocab-interactive {
  background: var(--bg-secondary);
}

.vocab-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 2.5rem;
}

.vocab-tool {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
}

.vocab-tool:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(79, 70, 229, 0.2);
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-color);
}

.tool-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
  flex-shrink: 0;
}

.tool-header h3 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  margin: 0;
}

/* Flashcard Component */
.flashcard-container {
  perspective: 1000px;
  height: 200px;
  margin-bottom: 1rem;
}

.flashcard {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.flashcard-front {
  background: var(--gradient-primary);
  color: white;
}

.flashcard-back {
  background: var(--gradient-secondary);
  color: white;
  transform: rotateY(180deg);
}

.flashcard-word {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.flashcard-pronunciation {
  font-size: 1rem;
  opacity: 0.9;
}

.flashcard-definition {
  font-size: 1.2rem;
  font-weight: 500;
}

/* Quiz Component */
.quiz-container {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.quiz-question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quiz-option {
  padding: 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}

.quiz-option.selected {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.1);
}

.quiz-option.correct {
  border-color: var(--success-color);
  background: rgba(16, 185, 129, 0.1);
}

.quiz-option.incorrect {
  border-color: var(--error-color);
  background: rgba(239, 68, 68, 0.1);
}

/* Progress Bar */
.progress-container {
  background: var(--bg-tertiary);
  border-radius: 10px;
  height: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  border-radius: 10px;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Study Plan Generator Styles */
.study-plan-generator {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  margin-top: 4rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}

.study-plan-generator h3 {
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
}

.plan-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.input-group select {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.input-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.study-plan-result {
  margin-top: 2.5rem;
}

.study-plan-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
  padding: 2.5rem;
  border-left: 5px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.plan-details {
  margin: 1.5rem 0;
}

.plan-item {
  margin: 1rem 0;
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Learning Tips Styles */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.tip-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.tip-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tip-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
  border-color: rgba(79, 70, 229, 0.2);
}

.tip-card:hover::before {
  transform: scaleX(1);
}

.tip-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.75rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  color: white;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.tip-card h4 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
}

.tip-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  font-size: 1rem;
}

.btn-tip {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 1.75rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-tip:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

/* Quick Resources Styles */
.quick-resources {
  margin-top: 3rem;
  text-align: center;
}

.quick-resources h3 {
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.resource-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.resource-btn {
  background: white;
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--primary-color);
}

.resource-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .hero {
    min-height: 320px;
    margin-top: 0;
    padding: 3rem 0 2rem;
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 2.75rem) !important;
  }

  .hero-subtitle {
    font-size: 1.05rem !important;
  }

  .section {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 2.25rem;
    margin-bottom: 2.5rem;
  }

  .learning-path {
    gap: 2rem;
  }

  .level-card {
    padding: 2rem 1.5rem;
  }

  .level-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .vocab-tools {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .vocab-tool {
    padding: 2rem 1.5rem;
  }

  .tool-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .tool-header h3 {
    font-size: 1.4rem;
  }

  .tips-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .tip-card {
    padding: 2rem 1.5rem;
  }

  .plan-inputs {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .resource-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .resource-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .vocab-hero {
    min-height: auto;
    padding: 2rem 0 1.5rem;
  }

  .vocab-hero .hero-badge {
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    margin-bottom: 1rem;
  }

  .vocab-hero .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
  }

  .vocab-hero .hero-subtitle {
    font-size: 0.95rem !important;
    margin-bottom: 1.25rem;
  }

  .vocab-hero .hero-stats {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .vocab-hero .hero-stats .stat-item {
    padding: 0.75rem 1rem;
  }

  .vocab-hero .hero-stats .stat-number {
    font-size: 1.35rem;
  }

  .vocab-hero .hero-stats .stat-label {
    font-size: 0.75rem;
  }

  .vocab-hero .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .vocab-hero .cta-primary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .vocab-hero .hero-cta-secondary {
    flex-wrap: wrap;
  }

  .vocab-hero .cta-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  /* Level cards on small screens */
  .learning-path {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .level-card {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .level-badge {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }

  .level-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
    border-radius: 18px;
    margin-bottom: 1.25rem;
  }

  .level-card h3 {
    font-size: 1.35rem;
  }

  .level-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .word-count {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .level-cta {
    font-size: 0.9rem;
  }

  /* Stats on small screens */
  .stats-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem 1rem;
    border-radius: 12px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .level-card {
    padding: 1.75rem 1.25rem;
  }

  .level-card h3 {
    font-size: 1.5rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1.5rem 1.25rem;
  }

  .vocab-tool {
    padding: 1.75rem 1.25rem;
  }

  .tool-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .tip-card {
    padding: 1.75rem 1.25rem;
  }

  .tip-icon {
    width: 75px;
    height: 75px;
    font-size: 2rem;
  }

  .study-plan-generator {
    padding: 2rem 1.5rem;
  }
}

/* Ensure mobile dropdowns work properly */
@media (max-width: 768px) {
  /* FORCE mobile menu to display full width */
  .nav-links,
  #navLinks,
  ul.nav-links {
    display: flex !important;
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: auto !important;
    min-height: calc(100vh - 70px) !important;
  }

  .nav-links.active,
  #navLinks.active,
  ul.nav-links.active {
    display: flex !important;
    max-height: calc(100vh - 70px) !important;
    height: auto !important;
  }

  /* Make sure nav links with dropdowns are clearly tappable */
  .nav-item .nav-link {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(70, 187, 229, 0.2);
    cursor: pointer;
  }

  /* Ensure chevron is visible and clickable */
  .nav-link .fa-chevron-down {
    transition: transform 0.3s ease !important;
    opacity: 1 !important;
    pointer-events: none; /* Let clicks go through to parent link */
  }

  /* Visual feedback when dropdown is open */
  .nav-item.mobile-open > .nav-link,
  .nav-item.mobile-dropdown-open > .nav-link {
    background: rgba(70, 187, 229, 0.15) !important;
    border-color: var(--primary-color, #46bbe5) !important;
  }

  /* Make dropdowns smoother */
  .dropdown {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Ensure dropdown items are visible when parent is open */
  .nav-item.mobile-open .dropdown,
  .nav-item.mobile-dropdown-open .dropdown {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Ensure dropdown items are clickable */
  .dropdown-item,
  .dropdown > a {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none;
    -webkit-user-select: none;
  }
}

.vocab-category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

@media (max-width: 968px) {
  .vocab-categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .vocab-categories-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Word Association Styles */
.association-tag {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  display: inline-block;
  transition: all 0.3s ease;
}

.association-tag:hover {
  background: rgba(79, 70, 229, 0.2);
  transform: scale(1.05);
}

/* Related Resources Styles */
.section-subtitle {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.resource-grid {
  display: grid;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.resource-link {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--bg-primary);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.resource-link:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: rgba(79, 70, 229, 0.05);
}

.resource-link strong {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.resource-link p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Dark mode for new elements */
.dark-mode .association-tag {
  background: rgba(79, 70, 229, 0.2);
}

.dark-mode .resource-link {
  background: var(--bg-secondary);
}

.dark-mode .resource-link:hover {
  background: var(--bg-tertiary);
}
