:root {
  --primary: #8e44ad;
  /* Deep Purple */
  --secondary: #00d2ff;
  --secondary-rgb: 0, 210, 255;
  /* Sky Blue */
  --accent: #2ecc71;
  /* Success Green */
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-sidebar: #1e293b;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --glass: blur(12px) saturate(180%);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-en: 'Plus Jakarta Sans', sans-serif;
  --font-bn: 'Hind Siliguri', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-en);
  background: var(--bg-dark);
  background-image:
    radial-gradient(at 0% 0%, rgba(142, 68, 173, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 210, 255, 0.1) 0px, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.Bengali-text {
  font-family: var(--font-bn);
  line-height: 1.6;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 110;
  background: var(--primary);
  border: none;
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar-header {
  margin-bottom: 2.5rem;
}

.logo-stack {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
}

.mini-logo {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--text-primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary), #6c3483);
  color: #fff;
  box-shadow: 0 4px 20px rgba(142, 68, 173, 0.4);
}

.sidebar-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.progress-info {
  font-size: 0.85rem;
}

.user-meta-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.user-meta-sidebar .badge {
  text-align: center;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  width: 0%;
  transition: width 0.8s ease-out;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 0;
  max-width: 1400px;
  margin: 0 auto;
  height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  min-width: 0;
}

#dashboard .main-content {
  padding: 2rem 0;
  max-width: 100%;
}

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

.top-header h2 {
  font-size: 2rem;
  font-weight: 700;
}

.badge {
  padding: 0.4rem 0.8rem;
  background: rgba(46, 204, 113, 0.1);
  color: var(--accent);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Sections */
.section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard Styles */
.video-container-premium {
  margin-bottom: 2rem;
  padding: 2.5rem 3rem 0;
  /* Move below and align with content sides */
}

.hero-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Standard video ratio */
  min-height: 400px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  background: #000;
  /* Backdrop for contain mode */
}

.video-controls-bar {
  background: var(--bg-sidebar);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--border);
}

.v-ctrl-left,
.v-ctrl-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.v-ctrl-center {
  flex: 1;
}

.v-bar-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
}

.v-bar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary);
}

.v-bar-btn.main-play {
  background: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.v-bar-btn.main-play:hover {
  background: #a55eea;
  color: white;
}

.video-bar-progress {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.hero-text-standalone {
  padding: 2rem 3rem 0;
}

.hero-text-standalone h3 {
  font-size: 2.2rem;
  font-family: var(--font-bn);
  margin-bottom: 0.5rem;
}

.hero-text-standalone p {
  color: var(--text-muted);
}

.unmute-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(142, 68, 173, 0.9);
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  width: fit-content;
  cursor: pointer;
  z-index: 5;
  animation: pulse 2s infinite;
}

#dashboard .podcast-section,
#dashboard .recent-activity,
#dashboard .stats-grid {
  padding: 0 3rem;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensure full video is visible */
  display: block;
  transition: transform 0.5s ease;
}

.hero-card:hover .hero-img {
  transform: scale(1.05);
}

.hero-card:hover .video-control-btn,
/* Full screen video aspect ratio fix */
.hero-img:fullscreen {
  object-fit: contain;
  background: #000;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  pointer-events: none;
}

.hero-overlay h3 {
  font-size: 2.2rem;
  font-family: var(--font-bn);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.horizontal-gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
  scrollbar-color: var(--primary) transparent;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.horizontal-gallery::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  flex: 0 0 240px;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  scroll-snap-align: start;
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.gallery-card-info {
  padding: 0.8rem 1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.gallery-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Unmute Hint */
.unmute-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(142, 68, 173, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
  margin-top: 1rem;
  cursor: pointer;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Podcast Section */
.podcast-section {
  margin-bottom: 2.5rem;
}

.podcast-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  backdrop-filter: var(--glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.podcast-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.podcast-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.podcast-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.podcast-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.podcast-player {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.podcast-btn {
  background: var(--primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.podcast-btn:hover {
  transform: scale(1.1);
  background: #a55eea;
}

.podcast-progress-container {
  flex: 1;
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.podcast-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
}

.podcast-seek {
  position: absolute;
  top: -5px;
  left: 0;
  width: 100%;
  height: 16px;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.podcast-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 40px;
}

/* Flashcards */
.flashcard-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  perspective: 1000px;
  scroll-snap-type: x proximity;
}

.flashcard {
  flex: 0 0 300px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
  scroll-snap-align: start;
}

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

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  font-family: var(--font-bn);
  font-size: 1.1rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.flashcard-front {
  background: var(--bg-card);
  color: var(--text-primary);
}

.flashcard-back {
  background: linear-gradient(135deg, var(--primary), #6c3483);
  color: white;
  transform: rotateY(180deg);
}

.module-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.module-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.section-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  border-left: 4px solid var(--secondary);
  padding-left: 1rem;
  margin-bottom: 0.5rem;
  background: rgba(var(--secondary-rgb), 0.1);
  padding-block: 0.5rem;
  border-radius: 0 8px 8px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 20px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
}

/* Module Grid */
.search-bar-container {
  margin-bottom: 2rem;
}

.search-input {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.search-input input {
  background: none;
  border: none;
  color: #fff;
  width: 100%;
  font-family: var(--font-en);
}

.tabs-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab {
  padding: 0.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: var(--transition);
}

.tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tab.active {
  background: var(--primary);
  color: #fff;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--bg-card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 20px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.module-card.completed {
  border-color: var(--accent);
}

.module-card.completed::after {
  content: '✓';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-family: var(--font-bn);
}

/* Buttons */
.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-en);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6c3483);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  cursor: default;
}

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

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  font-size: 1.1rem;
  color: #e2e8f0;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* Records & Timeline */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-dot {
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}

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

.log-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
}

textarea {
  height: 120px;
  resize: none;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-sidebar);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .records-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1.5rem;
  }
}

/* Quiz Styles */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.option-btn {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  color: var(--text-primary);
  font-family: var(--font-bn);
  font-size: 1rem;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--secondary);
}

.option-btn.correct {
  background: rgba(46, 204, 113, 0.2);
  border-color: var(--accent);
}

.option-btn.wrong {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.result-score {
  font-size: 4rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 1.5rem 0;
}

.text-center {
  text-align: center;
}

i[data-lucide="graduation-cap"] {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  color: var(--secondary);
}

#quiz-desc {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

#question-text {
  margin: 1.5rem 0;
}

#quiz-question-view {
  display: none;
}

#quiz-result-view {
  display: none;
}

.resource-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1rem;
}

/* Animations and WOW factors */
.card {
  position: relative;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: var(--transition);
}

.card:hover::before {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.module-card:hover .card-title {
  color: var(--secondary);
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: var(--transition);
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  text-align: center;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  border-color: var(--secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sidebar-footer {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1rem;
  margin-top: auto;
}

.auth-section {
  margin-top: 1rem;
}

.w-full {
  width: 100%;
}

.auth-modal-content {
  max-width: 400px;
}

.auth-toggle {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-toggle a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.5rem;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.version-info {
  margin-top: 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .quick-links {
    flex-direction: column;
  }
}

/* Toast Styles */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-sidebar);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideIn 0.3s ease-out;
  min-width: 300px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Modal Navigation */
.modal-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.modal-nav .btn-secondary {
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-nav .btn-secondary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
  }

  .sidebar.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    padding: 1.5rem;
  }

  .top-header {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    height: 40vh;
    min-height: 200px;
    max-height: 300px;
  }

  .hero-overlay h3 {
    font-size: 1.25rem;
  }

  .top-header h2 {
    font-size: 1.5rem;
  }

  .toast-container {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
  }

  .toast {
    min-width: auto;
  }

  .module-group-grid {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
  }

  .modal {
    padding: 1rem;
  }

  .sidebar {
    padding: 1rem 1rem;
  }

  .hero-card {
    height: 30vh;
    min-height: 150px;
    max-height: 250px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .hero-overlay h3 {
    font-size: 1rem;
  }

  .top-header h2 {
    font-size: 1.25rem;
  }

  .card {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
  }
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.guide-step {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 1rem;
}


/* Language Toggle Button styling */
.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1.25rem;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--secondary);
  color: #fff;
}

.lang-btn i {
  width: 18px;
  height: 18px;
  color: var(--secondary);
}

/* FAQ Styles */
.quick-faq-chips {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
}

.quick-faq-chips::-webkit-scrollbar {
  display: none;
}

.faq-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.faq-chip:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.faq-chip.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.faq-card-display {
  display: none;
  margin-bottom: 2rem;
  animation: slideDown 0.3s ease-out;
}

#faq-item-q {
  margin: 0;
  color: var(--secondary);
}

i[data-lucide="copy"] {
  width: 14px;
}

#faq-item-a {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mt-3 {
  margin-top: 2rem;
}

/* Moved inline styles */
#result-text {
  margin-bottom: 2rem;
}

#resources-desc {
  margin: 1rem 0;
  color: var(--text-muted);
}

.resource-item>div:first-child {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.resource-item i[data-lucide] {
  color: var(--secondary);
}

.resource-item>div>div>div:first-child {
  font-weight: 700;
}

.resource-item>div>div>div:nth-child(2) {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Slideshow Styles */
#slide-container {
  text-align: center;
  margin: 1rem 0;
}

#pdf-canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.slide-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

#page-info {
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Times New Roman', serif;
}

/* Quiz next button styles */
#next-question-btn {
  display: none;
  margin-top: 1rem;
}

#pdf-loading {
  display: none;
  text-align: center;
  padding: 1rem;
}