body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
  background-color: #f4f4f9;
}

.carousel {
  position: relative;
  margin-bottom: 5px;
  width: 98%;
  max-width: 98%;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 4rem;
  margin-left: 1rem;
}

.carousel > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.slide > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.75rem;
}

.slide[data-active] {
  opacity: 1;
  z-index: 1;
  transform: scale(1.02);
}

.carousel i {
  position: absolute;
  z-index: 2;
  font-size: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 50%;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.carousel i:hover {
  color: white;
  background: rgba(0, 0, 0, 0.5);
}

.carousel-button-prev {
  left: 1rem;
}

.carousel-button-next {
  right: 1rem;
}

.dot-indicators {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 0.5rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #333;
}

.ad img {
  width: 98%;
  margin: 1.5rem auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.app-download {
  display: block;
  width: fit-content;
  margin: 2rem auto;
  background-color: #f48c06;
  color: #fff;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.app-download:hover {
  background-color: #e67605;
  transform: translateY(-2px);
}

.content {
  margin-bottom: 4rem;
  padding: 0 2rem;
}

.content h3 {
  text-align: center;
  font-size: 2.2rem;
  margin-top: 4rem;
  margin-bottom: 2rem;
  font-weight: bold;
  color: #333;
}

.courses {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.courses ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.courses ul li a {
  display: inline-flex;
  height: 7rem;
  width: 20rem;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.courseTile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #072f2e;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.courseTile:hover {
  background: #064a4a;
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Tabbed Navigation for Exams */
.exam-tabs-section {
  margin: 15px auto;
  max-width: 900px;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background: transparent;
}

.exam-tabs-section h3 {
  font-size: 1.6em;
  /* color: #f1c40f; */
  margin: 0 0 15px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exam-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1),
              0 4px 15px rgba(0, 0, 0, 0.05);
}

.exam-tab {
  padding: 10px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2c3e50;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.35s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1),
              inset 0 -2px 5px rgba(255, 255, 255, 0.3);
}

.exam-tab:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.exam-tab.active {
  background: linear-gradient(145deg, #ffffff, #e0f7e9);
  color: #1e3a5f;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transform: scale(1.08);
}

/* Toppers Section */
.toppers-section {
  margin: 15px auto;
  padding: 15px;
  width: 100%;
  text-align: center;
  background: transparent;
  border-radius: 8px;
}

.toppers-section h3 {
  font-size: 1.6em;
  /* color: #f1c40f; */
  margin: 0 0 15px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toppers-list {
  display: grid;
  grid-template-columns: repeat(8, 160px);
  gap: 10px;
  justify-content: center;
}

/* Updated Topper Card Styles (Smaller Design) */
.topper-card {
  width: 160px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.topper-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-color: #2ecc71;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
}

.image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-bottom: 2px solid #2ecc71;
  transition: border-color 0.3s ease;
}

.topper-card

:hover .profile-image {
  border-color: #f1c40f;
}

.rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #2ecc71;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  text-align: center;
}

#user-name {
  font-size: 0.9em;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.user-score {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e67e22;
  margin: 0;
}

.button-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem auto;
}

.view-more,
.view-less {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  font-size: 1.0rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #fff;
  background-color: #f48c06;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease-in-out;
  text-decoration: none;
  text-align: center;
}

.view-more:hover,
.view-less:hover {
  background-color: #e07c04;
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.view-less {
  background-color: #666;
  display: none; /* Hidden by default */
}

.view-more:focus,
.view-less:focus {
  outline: 2px solid #e67605;
  outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
  .toppers-list {
    grid-template-columns: repeat(4, 140px);
  }

  .topper-card {
    width: 140px;
  }
}

@media (max-width: 768px) {
  .carousel i {
    font-size: 2rem;
  }

  .courses ul li a {
    width: 15rem;
    height: 6rem;
  }

  .exam-tab {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .toppers-list {
    grid-template-columns: repeat(2, 140px);
    gap: 25px;
  }

  .topper-card {
    width: 140px;
  }

  .user-name {
    font-size: 0.9rem;
  }

  .user-score {
    font-size: 0.8rem;
  }

  .rank-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .view-more,
  .view-less {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .courses ul li a {
    width: 13rem;
    height: 5rem;
  }

  .content h3 {
    font-size: 1.8rem;
  }

  .carousel i {
    font-size: 1.8rem;
  }

  .exam-tab {
    padding: 6px 10px;
    font-size: 0.8em;
  }

  .exam-tabs {
    flex-wrap: wrap;
  }

  .toppers-list {
    grid-template-columns: repeat(1, 120px);
    gap: 25px;
  }

  .topper-card {
    width: 120px;
  }

  .user-name {
    font-size: 0.85rem;
  }

  .user-score {
    font-size: 0.75rem;
  }

  .rank-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .view-more,
  .view-less {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }
}
