@keyframes cdpFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes cdpSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cdp-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: cdpFadeIn 0.2s ease-out;
}

.cdp-content {
  width: 340px;
  background: #0b1019;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  animation: cdpSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Starry background effect */
.cdp-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px), radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px;
  background-position: 0 0, 20px 20px;
  opacity: 0.2;
  pointer-events: none;
}

.cdp-inner {
  position: relative;
  z-index: 1;
}

.cdp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-right: 4px;
}

.cdp-title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #fff;
}

.cdp-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.cdp-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cdp-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 4px;
}

.cdp-month-label {
  font-size: 15px;
  font-weight: 400;
  color: #e2e8f0;
}

.cdp-nav-btn {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  padding: 5px;
}

.cdp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 12px;
}

.cdp-weekday {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cdp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 8px;
  margin-bottom: 24px;
}

.cdp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  width: 36px;
  height: 36px;
  margin: 0 auto;
}

.cdp-day:hover:not(.empty) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cdp-day.selected {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
  box-shadow: 0 0 0 1px #22d3ee, 0 0 12px rgba(34, 211, 238, 0.5);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.cdp-day.today {
  color: #22d3ee;
  font-weight: 600;
}

.cdp-day.empty {
  cursor: default;
}

.cdp-datetime-str {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.95);
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.cdp-time-wrap {
  position: relative;
  height: 110px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.cdp-time-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, #0b1019 5%, transparent 40%, transparent 60%, #0b1019 95%);
  z-index: 2;
}

.cdp-highlight {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 40px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent 10%, rgba(34, 211, 238, 0.08) 30%, rgba(34, 211, 238, 0.08) 70%, transparent 90%);
  border-top: 1px solid rgba(34, 211, 238, 0.2);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  z-index: 0;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.05);
}

.cdp-cols {
  display: flex;
  gap: 40px;
  z-index: 1;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.cdp-col {
  width: 40px;
  height: 100%;
  overflow-y: scroll;
  scrollbar-width: none;
  padding: 35px 0;
  scroll-snap-type: y mandatory;
  text-align: center;
}

.cdp-col::-webkit-scrollbar {
  display: none;
}

.cdp-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.4);
  scroll-snap-align: center;
  transition: all 0.2s;
  font-family: monospace;
  letter-spacing: 1px;
}

.cdp-item.active {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.cdp-ampm-btn {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 8px 4px;
  transition: all 0.2s;
  z-index: 3;
}

.cdp-ampm-btn.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.cdp-foot {
  display: flex;
  gap: 12px;
  margin-top: 5px;
}

.cdp-btn {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.cdp-btn-can {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.cdp-btn-can:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.cdp-btn-sub {
  background: linear-gradient(90deg, #22d3ee 0%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cdp-btn-sub:hover {
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
}
