.horoscope-page {
  padding-bottom: var(--page-bottom-with-nav);
  overflow-x: hidden;
}

.topbar,
.page-title-wrap,
.horoscope-hero-card,
.period-switch,
.section-title-block,
.event-card,
.site-footer {
  width: var(--w-content);
  margin: 0 auto;
}

.topbar {
  width: var(--w-topbar);
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  margin: 0;
}

.topbar-actions {
  width: auto;
  height: 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 16px;
  height: 16px;
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  place-items: center;
}

.icon-image {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.menu-icon {
  width: 12px;
  height: 12px;
}

.page-title-wrap {
  margin-top: -2px;
}

.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  color: #f9d366;
}

.horoscope-hero-card {
  position: relative;
  width: var(--w-content);
  height: auto;
  overflow: visible;
}

.horoscope-hero-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid #fdf5d7;
  box-sizing: border-box;
}

.horoscope-hero-track {
  display: flex;
  width: 100%;
  will-change: transform;
  transition: transform 0.32s ease;
}

.horoscope-hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 180px;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}

.horoscope-hero-image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.horoscope-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 12, 0) 34%, rgba(8, 8, 12, 0.26) 58%, rgba(8, 8, 12, 0.88) 100%);
  pointer-events: none;
}

.horoscope-hero-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
}

.horoscope-hero-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.horoscope-hero-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.horoscope-hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.24s ease, background-color 0.24s ease, opacity 0.24s ease;
  opacity: 0.9;
}

.horoscope-hero-dot.is-active {
  width: 20px;
  background: #f9d366;
}

.horoscope-hero-card.is-loading .horoscope-hero-dot {
  pointer-events: none;
}

.horoscope-hero-slide-skeleton {
  cursor: default;
}

.horoscope-hero-slide-skeleton::after {
  background:
    linear-gradient(180deg, rgba(8, 8, 12, 0) 34%, rgba(8, 8, 12, 0.22) 58%, rgba(8, 8, 12, 0.76) 100%);
}

.horoscope-hero-slide-skeleton .horoscope-hero-image.skeleton-box {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.horoscope-hero-slide.horoscope-hero-empty {
  cursor: default;
}

.horoscope-hero-empty-text {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.horoscope-hero-title-skeleton {
  height: 16px;
  width: calc(100% - 8px);
  border-radius: 8px;
}

.horoscope-hero-title-skeleton.short {
  width: 76%;
  margin-top: 8px;
}

.period-switch {
  --active-index: 0;
  --thumb-left: 0px;
  --thumb-width: 72px;
  --period-gap: 6px;
  --period-inline-padding-start: 5px;
  --period-inline-padding-end: 5px;
  --period-block-padding: 5px;
  --period-btn-inline-padding: 12px;
  --period-btn-min-inline-size: 72px;
  width: var(--w-content);
  height: 44px;
  position: relative;
  border-radius: 80px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--period-gap);
  padding: var(--period-block-padding) var(--period-inline-padding-end) var(--period-block-padding) var(--period-inline-padding-start);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--period-inline-padding-start);
  scroll-padding-right: var(--period-inline-padding-end);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.period-switch:not(.is-scrollable) .period-btn {
  flex: 1 1 0;
  width: 0;
  min-inline-size: 0;
}

.period-switch::-webkit-scrollbar {
  display: none;
}

.period-switch::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 30%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.78;
  pointer-events: none;
  z-index: 0;
}

.period-switch::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.01);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.period-thumb {
  position: absolute;
  left: 0;
  top: var(--period-block-padding);
  width: var(--thumb-width);
  height: calc(100% - (var(--period-block-padding) * 2));
  border-radius: 80px;
  background: rgba(254, 184, 53, 0.22);
  transform: translateX(var(--thumb-left));
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  transition-property: transform, width;
  transition-duration: 0.42s, 0.32s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1), cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.14);
}

.period-btn {
  height: calc(100% - (var(--period-block-padding) * 2));
  flex: 0 0 auto;
  width: max-content;
  min-inline-size: var(--period-btn-min-inline-size);
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 80px;
  padding: 0 var(--period-btn-inline-padding);
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: normal;
  white-space: nowrap;
  transition: color 0.24s ease;
}

.period-btn.active {
  color: #feb835;
}

.period-btn:focus-visible {
  outline: none;
}

.period-switch.is-scrollable {
  justify-content: flex-start;
}

.period-switch.is-scrollable .period-btn {
  scroll-snap-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .period-thumb,
  .period-btn {
    transition: none;
  }
}

.section-title-block .title-section {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  color: #ffffff;
}

.all-signs {
  height: auto;
}

.all-signs [data-signs-skeleton] {
  display: none;
}

.all-signs.is-loading [data-signs-grid] {
  display: none;
}

.all-signs.is-loading [data-signs-skeleton] {
  display: grid;
}

.all-signs:not(.is-loading) [data-signs-grid] {
  display: grid;
}

.signs-grid {
  display: grid;
  grid-template-columns: repeat(3, 108px);
  gap: 14px 13px;
  margin-top: 20px;
}

.signs-grid-skeleton .sign-card-skeleton {
  pointer-events: none;
}

.sign-card-skeleton {
  background:
    linear-gradient(180deg, rgba(13, 18, 54, 0.28) 0%, rgba(13, 18, 54, 0.48) 100%),
    rgba(9, 13, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(9, 12, 32, 0.24);
}

.skeleton-box,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.08) 28%, rgba(255, 255, 255, 0.22) 45%, rgba(255, 255, 255, 0.08) 62%);
  background-size: 240% 100%;
  animation: horoscope-skeleton-shimmer 1.8s linear infinite;
}

.signs-grid-skeleton .sign-icon.skeleton-box {
  width: 66px;
  height: 66px;
  margin: 0 auto 8px;
  border-radius: 50%;
  transform: translateY(3px);
}

.sign-title-skeleton {
  width: 58px;
  height: 14px;
  border-radius: 6px;
}

.sign-date-skeleton {
  width: 72px;
  height: 12px;
  margin-top: 8px;
  border-radius: 6px;
}

@keyframes horoscope-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.sign-card {
  height: 128px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
  border-radius: var(--radius-md);
  border: 0;
  background:
    linear-gradient(180deg, rgba(13, 18, 54, 0.22) 0%, rgba(13, 18, 54, 0.4) 100%),
    url("../assets/images/all-signs-default-bg.webp?v=20260417122805") center / 100% 100% no-repeat;
}

.sign-card.active {
  border: 1px solid rgba(183, 199, 255, 0.95);
  background: url("../assets/images/all-signs-active-bg.webp?v=20260417122805") center / 170% 150% no-repeat;
  box-shadow: 0 10px 22px rgba(142, 171, 255, 0.18);
}

.sign-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.05) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 80%, rgba(255, 255, 255, 0.05) 0 1px, transparent 2px);
  pointer-events: none;
}

.sign-card > * {
  position: relative;
  z-index: 2;
}

.sign-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 3px;
  object-fit: contain;
  transform: translateY(3px);
}

.sign-card p {
  margin: 2px 0 0;
  width: 100%;
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  text-align: center;
  color: #ffffff;
}

.sign-card h3 {
  width: 100%;
  margin: 0;
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  text-transform: capitalize;
  letter-spacing: normal;
  color: #ffffff;
  text-align: center;
}

.sign-card.active h3,
.sign-card.active p {
  color: #ffffff;
}

.event-card {
  height: 118px;
  width: var(--w-content);
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(253, 245, 215, 0.85);
  box-shadow: 0 12px 24px rgba(21, 18, 7, 0.18);
  position: relative;
  overflow: hidden;
}

.event-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.event-arrow-shell {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 49px;
  height: 39px;
  display: grid;
  place-items: center;
  z-index: 2;
  border-top-left-radius: 20px;
  border-bottom-right-radius: 20px;
  background: rgba(157, 147, 216, 0.28);
  backdrop-filter: blur(10px) saturate(100%);
  -webkit-backdrop-filter: blur(10px) saturate(100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.event-arrow-icon {
  width: 9px;
  height: 16px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .topbar,
  .page-title-wrap,
  .horoscope-hero-card,
  .period-switch,
  .section-title-block,
  .event-card,
  .site-footer {
    width: 100%;
  }

  .signs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-title,
  .section-title-block .title-section {
    font-size: 20px;
  }
}
