/* ==============================================
   Vocabulary Flashcards Page Styles
   For: vbeginner.html, vintermediate.html, vadvanced.html
   ============================================== */

/* Main Content Area */
.main-content {
  padding: 3rem 0 5rem;
  background: var(--bg-primary);
  min-height: calc(100vh - var(--header-height));
}

/* Progress Section */
.progress-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.dark-mode .progress-section {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

.progress-text {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.progress-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  height: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark-mode .progress-container {
  background: var(--bg-primary);
}

.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.dark-mode .stat-item {
  background: var(--bg-primary);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  font-family: var(--font-family-brand);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Learning Controls */
.learning-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-family-primary);
}

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

.control-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

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

.dark-mode .control-btn.secondary {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.control-btn.secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.dark-mode .control-btn.secondary:hover {
  background: var(--bg-secondary);
}

.control-btn i {
  font-size: 1.1rem;
}

/* Flashcard Section */
.flashcard-section {
  margin: 3rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px;
}

.flashcard-category {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation Controls */
.navigation-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: white;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-family-primary);
}

.dark-mode .nav-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.nav-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-btn i {
  font-size: 1.2rem;
}

/* Study Options */
.study-options {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.dark-mode .study-options {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

.study-options h3 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-family: var(--font-family-brand);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.option-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.option-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  background: white;
}

.dark-mode .option-card:hover {
  background: var(--bg-secondary);
}

.option-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.option-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-family: var(--font-family-brand);
}

.option-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Quiz Section */
.quiz-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.dark-mode .quiz-section {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

/* Info Banner */
.info-banner {
  transition: all var(--transition-normal);
}

.dark-mode .info-banner {
  background: var(--bg-tertiary) !important;
  border-left-color: var(--primary-color) !important;
}

.info-banner:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* Theme Toggle Button (floating) */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-normal);
  z-index: var(--z-sticky);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 8px 24px rgba(70, 187, 229, 0.4);
}

.theme-toggle i {
  font-size: 1.5rem;
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-primary);
  z-index: var(--z-fixed);
  transition: width 0.1s ease;
  box-shadow: 0 2px 8px rgba(70, 187, 229, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding: 2rem 0 4rem;
  }

  .progress-section {
    padding: 1.5rem;
  }

  .stats {
    gap: 1rem;
  }

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

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

  .learning-controls {
    gap: 0.75rem;
  }

  .control-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .navigation-controls {
    gap: 1rem;
  }

  .nav-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .study-options {
    padding: 1.5rem;
  }

  .study-options h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

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

  .option-card {
    padding: 1.5rem;
  }

  .option-icon {
    font-size: 2.5rem;
  }

  .theme-toggle {
    width: 48px;
    height: 48px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .theme-toggle i {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-item {
    padding: 0.75rem;
  }

  .learning-controls {
    flex-direction: column;
    width: 100%;
  }

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

  .navigation-controls {
    flex-direction: column;
    width: 100%;
  }

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

  .study-options h3 {
    font-size: 1.35rem;
  }

  .option-icon {
    font-size: 2rem;
  }

  .option-title {
    font-size: 1.1rem;
  }
}

/* Animation Utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Print Styles */
@media print {
  .theme-toggle,
  .scroll-progress,
  .learning-controls,
  .navigation-controls,
  .study-options {
    display: none;
  }

  .flashcard-section {
    page-break-inside: avoid;
  }
}
