body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* --- SNAKE GRID LAYOUT (Desktop) --- */
@media (min-width: 1024px) {
  .snake-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 40px;
    position: relative;
    padding: 20px;
  }

  .snake-item:nth-child(1) {
    grid-area: 1 / 1;
  }
  .snake-item:nth-child(2) {
    grid-area: 1 / 2;
  }
  .snake-item:nth-child(3) {
    grid-area: 1 / 3;
  }

  .snake-item:nth-child(4) {
    grid-area: 2 / 3;
  }
  .snake-item:nth-child(5) {
    grid-area: 2 / 2;
  }
  .snake-item:nth-child(6) {
    grid-area: 2 / 1;
  }

  .snake-item:nth-child(7) {
    grid-area: 3 / 1;
  }
  .snake-item:nth-child(8) {
    grid-area: 3 / 2;
  }
  .snake-item:nth-child(9) {
    grid-area: 3 / 3;
  }

  .snake-item:nth-child(1)::after,
  .snake-item:nth-child(2)::after,
  .snake-item:nth-child(7)::after,
  .snake-item:nth-child(8)::after {
    content: "";
    position: absolute;
    top: 55px;
    right: -50%;
    width: 100%;
    height: 3px;
    background: #cbd5e1;
    z-index: 1;
  }

  .snake-item:nth-child(4)::after,
  .snake-item:nth-child(5)::after {
    content: "";
    position: absolute;
    top: 55px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: #cbd5e1;
    z-index: -1;
  }

  .snake-item:nth-child(3)::before {
    content: "";
    position: absolute;
    top: 55px;
    right: 50%;
    width: 3px;
    height: calc(100% + 60px);
    background: #cbd5e1;
    z-index: -1;
  }

  .snake-item:nth-child(6)::before {
    content: "";
    position: absolute;
    top: 55px;
    left: 50%;
    width: 3px;
    height: calc(100% + 60px);
    background: #cbd5e1;
    z-index: -1;
  }
}

/* --- MOBILE VERTICAL TIMELINE --- */
@media (max-width: 1023px) {
  .snake-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-left: 10px;
  }
  .snake-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
    position: relative;
  }
  .snake-item::before {
    content: "";
    position: absolute;
    left: 55px;
    top: 110px;
    height: 40px;
    width: 3px;
    background: #cbd5e1;
    z-index: -1;
  }
  .snake-item:last-child::before {
    display: none;
  }

  .badge-wrapper {
    margin: 0 !important;
  }
  .snake-item div.text-container {
    margin-top: 10px;
  }
}

/* BADGE STYLES */
.badge-wrapper {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: white;
  border: 5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  position: relative;
  margin: 0 auto 15px auto;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.badge-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.badge-wrapper img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  pointer-events: none;
}

.badge-completed {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2) !important;
  background: #f0fdf4;
}

.badge-pending {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2) !important;
  background: #fffbeb;
}

.badge-scheduled {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
  background: #eff6ff;
}

.status-icon {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  display: none;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
