body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #0b0c2a;
}


/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background-color: #0b0c2a;
  color: #f0f0f0;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  color: #f0f0f0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.back-button-right {
  display: flex;
  justify-content: flex-end;
  max-width: 900px;
  margin: 0 auto 1rem auto;
  padding-right: 1.5rem;
  /* matches padding of file-actions */
}

.back-button-right a {
  padding: 0.5rem 1.2rem;
  background-color: var(--primary);
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.back-button-right a:hover {
  background-color: var(--secondary);
}


.grid-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 95%;
  margin: 0 auto;
  box-sizing: border-box;
}

.topic-card {
  background-color: #1f1359;
  color: #f0f0f0;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 430px;
  width: 250px;
  /* optional, but useful for consistency */
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.topic-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.topic-card h3 {
  margin-top: 0;
  font-size: 1.4rem;
  color: var(--primary);
}

.topic-card p {
  font-size: 0.95rem;
  color: #f0f0f0;
  min-height: 60px;
}

.topic-card a {
  display: inline-block;
  margin-top: 1rem;
  background-color: var(--primary);
  color: #1f1359;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.topic-card a:hover {
  background-color: var(--secondary);
  color: #1f1359;
}

/* Practice Section Redesign */
.practice-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.practice-card {
  background: rgba(31, 19, 89, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(86, 169, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.practice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(86, 169, 255, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.practice-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(86, 169, 255, 0.1);
  border-color: rgba(86, 169, 255, 0.3);
}

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

.practice-icon-wrapper {
  width: 70px;
  height: 70px;
  background: rgba(86, 169, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.8rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.practice-card:hover .practice-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary);
  color: #0b0c2a;
}

.practice-content h3 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  color: #fff;
  font-weight: 600;
}

.practice-content p {
  color: #b0b5c1;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 1rem;
}

.practice-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.8rem;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.practice-btn i {
  transition: transform 0.2s ease;
}

.practice-btn:hover {
  background: var(--primary);
  color: #0b0c2a;
  box-shadow: 0 0 15px rgba(86, 169, 255, 0.4);
}

.practice-btn:hover i {
  transform: translateX(4px);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #1f1359;
  color: #f0f0f0;
  margin-top: 4rem;
  font-size: 0.9rem;
}

@media(width <=768px) {
  #navbarList {
    background-color: #0d47a1;
  }

  .topic-card {
    width: 100%;
  }
}

.glowing-spots {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.glowing-spots span {
  position: absolute;
  display: block;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #806aed, transparent 70%);
  border-radius: 50%;
  animation: moveGlow 20s linear infinite;
  opacity: 0.5;
  filter: blur(8px);
}

@keyframes moveGlow {
  0% {
    transform: translateY(100vh) translateX(0) scale(0.5);
    opacity: 0.2;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-100vh) translateX(50vw) scale(1);
    opacity: 0;
  }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  /* half width */
  margin-top: -20px;
  /* half height */
  border-radius: 50%;
  pointer-events: none;
  background: rgba(134, 110, 237, 0.6);
  box-shadow: 0 0 8px 4px rgba(134, 110, 237, 0.7);
  transition: transform 0.1s ease-out;
  mix-blend-mode: screen;
  z-index: 9999;
  transform: translate3d(0, 0, 0);
}