.course-shell {
  gap: clamp(1.2rem, 2vh, 2rem);
}

.course-detail {
  gap: clamp(1.5rem, 2.2vh, 2.8rem);
}

.course-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  max-width: 100%;
  padding: 0 2rem;
}

@media (min-width: 1200px) {
  .course-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.course-outline .course-card {
  border-color: var(--border-primary);
  background: var(--bg-control-panel);
}

.course-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 26px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  height: 100%;
}

.course-card .course-link {
  align-self: flex-end;
  width: auto;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
}

.course-badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--border-secondary);
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

.course-visual .course-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 500;
}

.course-visual {
  width: calc(100% + 3rem);
  margin: -1.5rem -1.5rem 0 -1.5rem;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 26px 26px 0 0;
  background: #000425;
  border-bottom: 1px solid var(--border-primary);
  overflow: hidden;
}

.course-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Level 01 - Neurons */
.course-visual--neurons {
  gap: 0.8rem;
}

.neuron-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
  animation: neuronPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.neuron-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.neuron-dot:nth-child(3) {
  animation-delay: 0.6s;
}

.neuron-connection {
  position: absolute;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
  top: 50%;
  left: 30%;
  z-index: 1;
}

.neuron-connection:nth-child(5) {
  left: 50%;
}

@keyframes neuronPulse {

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

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Level 02 - Layers */
.course-visual--layers {
  gap: 0.5rem;
}

.layer-bar {
  width: 12px;
  height: 100%;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  animation: layerGrow 2s ease-in-out infinite;
}

.layer-bar:nth-child(1) {
  height: 40%;
  animation-delay: 0s;
}

.layer-bar:nth-child(2) {
  height: 70%;
  animation-delay: 0.2s;
}

.layer-bar:nth-child(3) {
  height: 85%;
  animation-delay: 0.4s;
}

.layer-bar:nth-child(4) {
  height: 55%;
  animation-delay: 0.6s;
}

@keyframes layerGrow {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(1.1);
  }
}

.course-link--disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-control-panel);
  border: 1px solid var(--border-secondary);
  color: var(--text-tertiary);
  pointer-events: none;
}

/* Level 03 - Gradient Arrows */
.course-visual--gradient {
  gap: 0.6rem;
}

.gradient-arrow {
  width: 30px;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  position: relative;
  animation: arrowFlow 2s ease-in-out infinite;
}

.gradient-arrow::after {
  content: '';
  position: absolute;
  left: -6px;
  top: -3px;
  width: 0;
  height: 0;
  border-right: 8px solid #8b5cf6;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.gradient-arrow:nth-child(2) {
  animation-delay: 0.3s;
}

.gradient-arrow:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes arrowFlow {

  0%,
  100% {
    opacity: 0.6;
    transform: translateX(0);
  }

  50% {
    opacity: 1;
    transform: translateX(-5px);
  }
}

/* Level 04 - Convolutional Grid */
.conv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
}

.conv-grid span {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
  animation: convFlash 3s ease-in-out infinite;
}

.conv-grid span:nth-child(1) {
  animation-delay: 0s;
}

.conv-grid span:nth-child(2) {
  animation-delay: 0.2s;
}

.conv-grid span:nth-child(3) {
  animation-delay: 0.4s;
}

.conv-grid span:nth-child(4) {
  animation-delay: 0.6s;
}

.conv-grid span:nth-child(5) {
  animation-delay: 0.8s;
  background: linear-gradient(135deg, #ec4899, #f472b6);
}

.conv-grid span:nth-child(6) {
  animation-delay: 1s;
}

.conv-grid span:nth-child(7) {
  animation-delay: 1.2s;
}

.conv-grid span:nth-child(8) {
  animation-delay: 1.4s;
}

.conv-grid span:nth-child(9) {
  animation-delay: 1.6s;
}

@keyframes convFlash {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

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

/* Level 05 - Sequence Blocks */
.course-visual--sequence {
  gap: 0.4rem;
}

.seq-block {
  width: 20px;
  height: 35px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  animation: seqPulse 2s ease-in-out infinite;
}

.seq-block:nth-child(1) {
  animation-delay: 0s;
}

.seq-block:nth-child(2) {
  animation-delay: 0.2s;
}

.seq-block:nth-child(3) {
  animation-delay: 0.4s;
}

.seq-block:nth-child(4) {
  animation-delay: 0.6s;
}

.attention-beam {
  position: absolute;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ec4899, transparent);
  top: 50%;
  animation: beamSweep 3s ease-in-out infinite;
}

@keyframes seqPulse {

  0%,
  100% {
    transform: scaleY(1);
    opacity: 0.7;
  }

  50% {
    transform: scaleY(1.15);
    opacity: 1;
  }
}

@keyframes beamSweep {

  0%,
  100% {
    opacity: 0;
    transform: translateX(-20%);
  }

  50% {
    opacity: 1;
    transform: translateX(20%);
  }
}

/* Level 06 - Distributed Server Racks */
.course-visual--distributed {
  gap: 1rem;
  padding: 1rem;
}

.server-rack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: var(--bg-control-panel);
  border: 1px solid var(--border-secondary);
  position: relative;
  animation: rackPulse 3s ease-in-out infinite;
}

.server-rack:nth-child(2) {
  animation-delay: 0.5s;
}

.server-rack:nth-child(3) {
  animation-delay: 1s;
}

.server-line {
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
  animation: serverBlink 2s ease-in-out infinite;
}

.server-line:nth-child(1) {
  animation-delay: 0s;
}

.server-line:nth-child(2) {
  animation-delay: 0.3s;
}

.server-line:nth-child(3) {
  animation-delay: 0.6s;
}

.data-flow {
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ec4899, transparent);
  top: 50%;
  animation: dataStream 2s linear infinite;
}

@keyframes rackPulse {

  0%,
  100% {
    opacity: 0.8;
  }

  50% {
    opacity: 1;
  }
}

@keyframes serverBlink {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

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

  50% {
    opacity: 1;
  }

  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Level 07 - Autoencoder Layers */
.course-visual--autoencoder {
  gap: 0.5rem;
  padding: 1rem;
}

.ae-layer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.ae-layer span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
  animation: aePulse 2s ease-in-out infinite;
}

.ae-latent span {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #ec4899, #f472b6);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.8);
  animation: aeLatentGlow 2s ease-in-out infinite;
}

.ae-output span {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.ae-layer span:nth-child(1) {
  animation-delay: 0s;
}

.ae-layer span:nth-child(2) {
  animation-delay: 0.2s;
}

.ae-layer span:nth-child(3) {
  animation-delay: 0.4s;
}

.ae-layer span:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes aePulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }

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

@keyframes aeLatentGlow {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.8);
  }

  50% {
    transform: scale(1.3);
    box-shadow: 0 0 25px rgba(236, 72, 153, 1);
  }
}

/* Level 08 - GAN Battle */
.course-visual--gan {
  gap: 0.8rem;
}

.gan-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.gan-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

.gan-gen .gan-label {
  color: #6366f1;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

.gan-disc .gan-label {
  color: #ec4899;
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.8);
}

.gan-output,
.gan-verdict {
  width: 30px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
  animation: ganPulse 2s ease-in-out infinite;
}

.gan-verdict {
  background: linear-gradient(90deg, #ec4899, #f472b6);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
  animation-delay: 1s;
}

.gan-battle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}

.battle-spark {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  animation: sparkle 1.5s ease-in-out infinite;
}

.battle-spark:nth-child(1) {
  animation-delay: 0s;
}

.battle-spark:nth-child(2) {
  animation-delay: 0.5s;
}

.battle-spark:nth-child(3) {
  animation-delay: 1s;
}

@keyframes ganPulse {

  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.8;
  }

  50% {
    transform: scaleX(1.2);
    opacity: 1;
  }
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

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

/* Level 09 - Graph SVG */
.course-visual--graph {
  padding: 0.5rem;
}

.graph-svg {
  width: 100%;
  height: 100%;
}

.graph-line {
  stroke: rgba(139, 92, 246, 0.5);
  stroke-width: 2;
  animation: lineGlow 3s ease-in-out infinite;
}

.graph-line:nth-child(1) {
  animation-delay: 0s;
}

.graph-line:nth-child(2) {
  animation-delay: 0.3s;
}

.graph-line:nth-child(3) {
  animation-delay: 0.6s;
}

.graph-line:nth-child(4) {
  animation-delay: 0.9s;
}

.graph-line:nth-child(5) {
  animation-delay: 1.2s;
}

.graph-line:nth-child(6) {
  animation-delay: 1.5s;
}

.graph-circle {
  fill: #6366f1;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.8));
  animation: nodePulse2 2.5s ease-in-out infinite;
}

.graph-circle:nth-child(7) {
  animation-delay: 0s;
}

.graph-circle:nth-child(8) {
  animation-delay: 0.3s;
}

.graph-circle:nth-child(9) {
  animation-delay: 0.6s;
}

.graph-circle:nth-child(10) {
  animation-delay: 0.9s;
}

.graph-circle:nth-child(11) {
  animation-delay: 1.2s;
  fill: #ec4899;
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.8));
}

@keyframes lineGlow {

  0%,
  100% {
    stroke: rgba(139, 92, 246, 0.4);
    stroke-width: 2;
  }

  50% {
    stroke: rgba(139, 92, 246, 0.8);
    stroke-width: 2.5;
  }
}

@keyframes nodePulse2 {

  0%,
  100% {
    r: 5;
    opacity: 0.8;
  }

  50% {
    r: 6;
    opacity: 1;
  }
}

/* Level 10 - Reinforcement Learning Cycle */
.course-visual--rl {
  padding: 0.8rem;
}

.rl-cycle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.rl-state,
.rl-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.state-icon,
.action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
  animation: rlPulse 2s ease-in-out infinite;
}

.action-icon {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  animation-delay: 0.5s;
}

.state-label,
.action-label {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rl-action-arrow {
  font-size: 1.2rem;
  color: #8b5cf6;
  font-weight: 700;
  animation: arrowBounce 2s ease-in-out infinite;
}

.rl-reward-badge {
  position: absolute;
  top: -8px;
  right: 10%;
  background: linear-gradient(135deg, #10b981, #34d399);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
  animation: rewardPop 2s ease-in-out infinite;
}

.reward-value {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

@keyframes rlPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes arrowBounce {

  0%,
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }

  50% {
    transform: translateX(3px);
    opacity: 1;
  }
}

@keyframes rewardPop {

  0%,
  100% {
    transform: scale(0.9) translateY(0);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1) translateY(-2px);
    opacity: 1;
  }
}

/* Math Visual - Mathematical Symbols */
.course-visual--math {
  gap: 1rem;
}

.math-symbol {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.4));
  animation: mathFloat 3s ease-in-out infinite;
}

.math-symbol:nth-child(1) {
  animation-delay: 0s;
}

.math-symbol:nth-child(2) {
  animation-delay: 0.5s;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
}

.math-symbol:nth-child(3) {
  animation-delay: 1s;
  background: linear-gradient(135deg, #ec4899, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.4));
}

@keyframes mathFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-5px) scale(1.1);
    opacity: 1;
  }
}

.course-card h3 {
  color: var(--text-primary);
}

.course-card p {
  color: var(--text-tertiary);
  line-height: 1.5;
}

.course-outline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.course-outline li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 1rem;
  position: relative;
}

.course-outline li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #8b5cf6;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-hint);
}

.course-status {
  font-weight: 600;
}

.badge-soon {
  color: #fbbf24;
}

.course-duration {
  opacity: 0.75;
}

.course-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  background: transparent;
  position: relative;
  overflow: hidden;
}

@keyframes subtleGradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.course-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.course-link:hover::before {
  width: 200px;
  height: 200px;
}

.course-link:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-link--disabled {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-primary) !important;
  color: var(--text-hint) !important;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none !important;
  animation: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.3rem;
}

.course-link--disabled::before {
  display: none;
}

.course-link--disabled:hover {
  background: var(--bg-card) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-hint) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Module navigation */
.module-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.module-navigation .course-link {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.course-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.course-content h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.course-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.course-content ul {
  margin-left: 2rem;
  margin-bottom: 2rem;
}

.course-content ul li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.course-lab {
  background: var(--bg-control-panel);
  border: 1px solid var(--border-tertiary);
  border-radius: 28px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lab-header h2 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.lab-header p {
  color: var(--text-tertiary);
  max-width: 760px;
}

.lab-shell {
  border-radius: 28px;
  background: var(--bg-lab-container);
  padding: 1rem;
  border: 1px solid var(--border-primary);
  overflow: hidden;
}

@keyframes checkPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

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