.body {
  background-image: url("/assets/images/StarField-a6f000f7.jpg");
  background-size: cover;
}

.wheel {
  width: 100vw;
  overflow-x: visible;
  overflow-y: hidden;
  position: relative;
  perspective: 1000px;
  padding: 40px 0;

  .wheel-controls {
    text-align: center;
    margin-bottom: 20px;
  }

  .show-current-btn {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
  }

  .show-current-btn:hover {
    background: #218838;
  }

  .show-curved-btn {
    padding: 8px 15px;
    background: #6f42c1;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
  }

  .show-curved-btn:hover {
    background: #5a32a3;
  }

  .weekly-cards-link,
  .wheel-link {
    display: inline-block;
    margin-left: 15px;
    padding: 8px 15px;
    background: #17a2b8;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
  }

  .weekly-cards-link:hover,
  .wheel-link:hover {
    background: #138496;
  }

  &.show-current-only {
    .wheel-rim {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 20px;
      transform: none;
      padding: 40px 20px;
      width: 100%;
      max-width: 1000px;
      margin: 0 auto;
      transition: all 0.3s ease;
    }

    .wheel-rim-card {
      transform: none !important;
      margin: 0;

      &:nth-child(n) {
        transform: none !important;
      }

      .wheel-card-backing {
        transform: none;
      }

      .wheel-card-reading-type,
      .wheel-card-date,
      .wheel-rim-card-planet,
      .wheel-card-spread-link,
      .wheel-card-spread-mini {
        transform: none;
      }
    }

    .wheel-rim-card:not([data-transiting]) {
      display: none;
    }

    /* Fix header width and positioning for perfect centering */
    .wheel-rim-header {
      position: absolute;
      left: 0;
      top: 0;
      width: 80px; /* Fixed width */
      transform: none; /* Remove rotation and positioning */
      text-align: center;
      font-size: 14px;
      z-index: 10;
    }

    /* Special handling for birth rim - always center */
    &.birth {
      justify-content: center;
      flex-wrap: nowrap;
    }

    /* Ensure good spacing for different numbers of cards */
    .wheel-rim-card {
      flex: 0 0 auto;
    }
  }

  .wheel-rim {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    /* // justify-content: center; */
    transform: rotateX(10deg);
    padding: 20px 0;
    transition: all 0.5s ease;

    &.birth {
      justify-content: center;
    }

    &.curved-mode {
      justify-content: center;
      padding: 200px 0;

      .wheel-rim-card {
        &:nth-child(n) {
          transform: translate(var(--curve-x, 0), var(--curve-y, 0))
                    rotateZ(var(--curve-rotate, 0deg))
                    translateZ(calc((var(--offset-from-center, 0) * -1px)))
                    rotateY(calc(var(--offset-from-center, 0) * 1deg));
        }

        .wheel-card-backing,
        .wheel-card-reading-type,
        .wheel-card-date,
        .wheel-rim-card-planet,
        .wheel-card-spread-link,
        .wheel-card-spread-mini,
        .birth-card-label {
          transform: rotateZ(calc(var(--curve-rotate, 0deg) * -1));
        }

        img {
          transform: translate(-50%, -50%) translateZ(25px) rotateZ(calc(var(--curve-rotate, 0deg) * -1));
        }
      }
    }

    .wheel-rim-card {
      position: relative;
      width: 120px;
      height: 160px;
      transform-style: preserve-3d;
      transition: transform 0.5s ease;

      .wheel-card-spread-mini {
        transform: translateZ(30px);
      }

      .wheel-card-backing {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transform: translateZ(5px);
        transition: transform 0.5s ease;
      }

      .wheel-card-reading-type {
        position: absolute;
        top: 8px;
        left: 8px;
        font-size: 9px;
        font-weight: bold;
        color: #333;
        transform: translateZ(20px);
        transition: transform 0.5s ease;
        z-index: 3;
      }

      .wheel-card-date {
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 8px;
        font-weight: bold;
        color: #333;
        text-align: right;
        transform: translateZ(20px);
        transition: transform 0.5s ease;
        z-index: 3;
        max-width: 50px;
        line-height: 1.2;
      }

      img {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 70px;
        transform: translate(-50%, -50%) translateZ(25px);
        transition: transform 0.5s ease;
        z-index: 2;
      }

       .wheel-rim-card-planet {
         position: absolute;
         bottom: 8px;
         left: 50%;
         transform: translateX(-50%) translateZ(20px);
         transition: transform 0.5s ease;
         font-size: 9px;
         font-weight: bold;
         color: #fff;
         text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
         background: rgba(0,0,0,0.8);
         padding: 2px 6px;
         border-radius: 3px;
         white-space: nowrap;
         z-index: 4;
       }

       /* Cycle indicators */
       &.cycle-7,
       &.cycle-13,
       &.cycle-7-year,
       &.cycle-7-planetary,
       &.cycle-7-week,
       &.cycle-7-daily {
         .wheel-card-backing {
           box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(255, 215, 0, 0.6);
         }
       }

       &.cycle-7-start,
       &.cycle-13-start,
       &.cycle-7-year-start,
       &.cycle-7-planetary-start,
       &.cycle-7-week-start,
       &.cycle-7-daily-start {
         .wheel-card-backing {
           box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 255, 0, 0.4);
         }
       }

       /* Planet-specific styling */
       &[data-planet="mercury"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(192, 192, 192, 0.3));
       }

       &[data-planet="venus"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 182, 193, 0.3));
       }

       &[data-planet="mars"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 99, 71, 0.3));
       }

       &[data-planet="jupiter"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 215, 0, 0.3));
       }

       &[data-planet="saturn"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(210, 180, 140, 0.3));
       }

       &[data-planet="uranus"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(173, 216, 230, 0.3));
       }

       &[data-planet="neptune"] .wheel-card-backing {
         background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(0, 0, 139, 0.3));
       }
    }
  }
}

.wheel-rim-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 10px 0;
  
  /* // Optional: Hide scrollbar but keep functionality */
  &::-webkit-scrollbar {
    height: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  &::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }
  
  &::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

  /* Scrollbar is now visible so users know they can scroll */

  .wheel-spoke-container {
    position: relative;
    margin: 10px 0;
  }

  .wheel-rim-header {
    position: sticky;
    transform: rotate(-51deg);
    left: 63px;
    top: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #ff4500;
    text-shadow:
      2px 2px 4px rgba(0,0,0,0.8),
      0 10px 20px rgba(0,0,0,0.5),
      0 20px 40px rgba(0,0,0,0.4),
      0 30px 60px rgba(0,0,0,0.3),
      0 40px 80px rgba(0,0,0,0.2);
    z-index: 100;
    white-space: nowrap;
  }

  .wheel-rim-card.birth-card {
    .wheel-card-backing {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 215, 0, 0.4));
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(255, 215, 0, 0.8);
    }

    .birth-card-label {
      position: absolute;
      bottom: 8px;
      left: 50%;
      transform: translateX(-50%) translateZ(20px);
      transition: transform 0.5s ease;
      font-size: 9px;
      font-weight: bold;
      color: #fff;
      text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
      background: rgba(0,0,0,0.8);
      padding: 2px 6px;
      border-radius: 3px;
      white-space: nowrap;
      z-index: 4;
    }
  }
  
  transform-style: preserve-3d;
}

.delivery_zone {
  display: flex;
  justify-content: center;
}

.panel {
  display: flex;
  justify-content: center;
  vertical-align: top;
  margin-left: 8px;
}

.reading_display_container > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.reading_display_container .panel.birth,
.reading_display_container .panel.personality {
  grid-column: span 1;
  margin-left: 0;
}

.reading_display_container .panel.yearly,
.reading_display_container .panel.planetary {
  grid-column: span 1;
  margin-left: 0;
}

.reading_display_container .card_group_heading,
.reading_display_container hr,
.reading_display_container .clearboth,
.reading_display_container .salon,
.reading_display_container > div > div[id$="_subscription_management_for"],
.reading_display_container #cancellation_policy,
.reading_display_container #exit_interview {
  grid-column: span 2;
}

.reading_display_container .clearboth {
  clear: none;
  height: 0;
}

#access_card_delivery_zone {
  display: flex;
  align-items: flex-start;
  justify-content: center;

  .delivery_zone {
    display: inline-block;
  }
}

#guidance_zone {
  display: flex;
  justify-content: center;
}

@media only screen and (min-width: 310px) and (max-width: 767px) {
  #access_card_delivery_zone{
    flex-direction: column;
    align-items: center; 
  }

  .panel .back {
    margin-left: auto;
    margin-right: auto;
  }
}

.panel .front {
  float: none;
  position: absolute;
  top: 0;
}

.panel .back {
  float: none;
  position: relative;
  top: 0;
  left: 0;
}

.panel.flip {
  .back {
    .pane_guidance {
      display: inline-block !important;
     }
  }
}

#zodiac_center_holder {
  display: flex;
  justify-content: center;
}

div#right_now_zodiac {
  a.zodiac_selection {
    display: flex;
    justify-content: space-evenly;
  }
}

@media (max-width: 991px) {
  .desktop-only {
    display: none;
  }
}

@media (min-width: 992px) {
  .mobile-tablet-only {
    display: none;
  }
}

.desktop-only.button_daily_card {
  margin-top: 10px;
}

.birthday .panel .front {
  position: relative;
}

/* Weekly Cards Page */
.weekly-cards-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.weekly-cards-header {
  text-align: center;
  margin-bottom: 30px;
}

.weekly-cards-header h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 10px;
}

.weekly-cards-header p {
  color: #666;
  font-size: 16px;
}

.weekly-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 40px;

  .weekly-card-item {
    height: 220px;

    .wheel-rim-card-planet {
      font-size: 13px;
    }
  }
}

.weekly-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.weekly-card-number {
  font-size: 11px;
  font-weight: bold;
  color: #666;
  margin-bottom: 6px;
  text-align: center;
}

.weekly-card-container {
  position: relative;
  width: 100px;
  height: 140px;
}

.weekly-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.weekly-card-item.transiting {
  .wheel-card-backing {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    transform: scale(1.05);
  }
}

/* Weekly card specific styling */
.weekly-card-item .wheel-card-reading-type {
  font-size: 8px;
  top: 6px;
  left: 6px;
}

.weekly-card-item .wheel-card-date {
  font-size: 8px;
  top: 6px;
  right: 6px;
}

.weekly-card-item .wheel-rim-card-planet {
  font-size: 8px;
  bottom: 6px;
}

.weekly-card-item .wheel-card-spread-link {
  top: 6px;
  right: 6px;
  font-size: 10px;
}

.weekly-navigation {
  text-align: center;
  margin-top: 30px;
}

.weekly-navigation .nav-link {
  display: inline-block;
  padding: 12px 24px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.weekly-navigation .nav-link:hover {
  background: #0056b3;
}
