/* ===================================
   MODERN COURSE INTERFACE
   Module loading on demand
   =================================== */

.modern-course-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Course Header */
.course-header {
  margin-bottom: 2rem;
}

.course-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.course-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.course-title {
  color: var(--x0ne-text-primary);
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.course-description {
  color: var(--x0ne-text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

/* Course Layout */
.course-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  min-height: 600px;
}

/* Modules Sidebar */
.modules-sidebar {
  background: var(--x0ne-bg-card);
  border: 1px solid var(--x0ne-border-light);
  border-radius: 0.5rem;
  height: fit-content;
  position: sticky;
  top: 1rem;
}

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

.sidebar-header h3 {
  color: var(--x0ne-text-primary);
  margin: 0;
  font-size: 1rem;
}

.modules-count {
  background: var(--x0ne-bg-secondary);
  color: var(--x0ne-text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
}

.modules-list {
  padding: 0.5rem;
}

/* Module Navigation Item */
.module-nav-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.module-nav-item.unlocked {
  background: var(--x0ne-bg-secondary);
  border-color: var(--x0ne-border-light);
}

.module-nav-item.unlocked:hover {
  background: var(--x0ne-bg-tertiary);
  border-color: var(--x0ne-primary);
}

.module-nav-item.locked {
  background: var(--x0ne-bg-secondary);
  border-color: var(--x0ne-border-light);
  opacity: 0.6;
  cursor: not-allowed;
}

.module-nav-item.active {
  background: var(--x0ne-primary);
  border-color: var(--x0ne-primary);
  color: var(--x0ne-bg-primary);
}

.module-nav-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.module-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.module-icon svg {
  width: 100%;
  height: 100%;
}

.module-nav-item.unlocked .module-icon {
  color: var(--x0ne-primary);
}

.module-nav-item.locked .module-icon {
  color: var(--x0ne-text-muted);
}

.module-nav-item.active .module-icon {
  color: var(--x0ne-bg-primary);
}

.module-info {
  flex: 1;
  min-width: 0;
}

.module-name {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: inherit;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-type {
  display: block;
  font-size: 0.75rem;
  color: var(--x0ne-text-muted);
  text-transform: lowercase;
}

.module-nav-item.active .module-type {
  color: var(--x0ne-bg-secondary);
}

.module-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-align: center;
  min-width: 50px;
}

.module-status.unlocked {
  background: var(--x0ne-primary);
  color: var(--x0ne-bg-primary);
}

.module-status.locked {
  background: var(--x0ne-bg-tertiary);
  color: var(--x0ne-text-muted);
}

.module-nav-item.active .module-status.unlocked {
  background: var(--x0ne-bg-primary);
  color: var(--x0ne-primary);
}

/* Module Content Area */
.module-content-area {
  background: var(--x0ne-bg-primary);
  border: 1px solid var(--x0ne-border-light);
  border-radius: 0.5rem;
  overflow: hidden;
}

.content-container {
  min-height: 600px;
}

/* Placeholder */
.module-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 600px;
  color: var(--x0ne-text-secondary);
  text-align: center;
}

.placeholder-icon {
  width: 4rem;
  height: 4rem;
  color: var(--x0ne-text-muted);
  margin-bottom: 1.5rem;
}

.placeholder-icon svg {
  width: 100%;
  height: 100%;
}

.module-placeholder h3 {
  margin: 0 0 0.5rem 0;
  color: var(--x0ne-text-primary);
}

.module-placeholder p {
  margin: 0;
  color: var(--x0ne-text-muted);
}

/* Loading State */
.module-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 600px;
  color: var(--x0ne-text-secondary);
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--x0ne-border-light);
  border-top-color: var(--x0ne-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error State */
.module-error,
.module-locked-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--x0ne-text-secondary);
  text-align: center;
  padding: 2rem;
}

.module-error h3,
.module-locked-content h2 {
  color: var(--x0ne-danger);
  margin: 0 0 1rem 0;
}

.retry-btn {
  background: var(--x0ne-primary);
  color: var(--x0ne-bg-primary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.retry-btn:hover {
  background: var(--x0ne-primary-hover);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .course-layout {
    grid-template-columns: 250px 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .course-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .modules-sidebar {
    position: static;
    order: 2;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .module-content-area {
    order: 1;
  }
  
  .course-info {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .modern-course-container {
    padding: 0.5rem;
  }
  
  .module-nav-item {
    padding: 0.5rem;
  }
  
  .module-nav-content {
    gap: 0.5rem;
  }
  
  .module-status {
    display: none;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification {
  animation: slideIn 0.3s ease;
}



