* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive;
    image-rendering: pixelated;
  }
  
  /* Custom Scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(10, 10, 25, 0.8);
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(10, 10, 25, 0.8);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
  }
  
  body {
    background: linear-gradient(to bottom, #0a0a15, #1a1a2e, #000000);
    color: #fff;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 40px;
  }

  /* Multiple star layers for depth */
  body::before,
  body::after,
  .stars-1,
  .stars-2,
  .stars-3 {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  /* First star layer - bright stars */
  body::before {
    background-image: 
      radial-gradient(1px 1px at 25% 25%, rgba(255, 255, 255, 0.9), transparent),
      radial-gradient(1px 1px at 75% 75%, rgba(255, 255, 255, 0.9), transparent),
      radial-gradient(2px 2px at 50% 50%, rgba(255, 255, 255, 0.9), transparent),
      radial-gradient(1px 1px at 10% 90%, rgba(255, 255, 255, 0.9), transparent);
    background-size: 400px 400px;
    background-repeat: repeat;
    animation: twinkle 4s ease-in-out infinite;
  }

  /* Second star layer - medium stars */
  body::after {
    background-image: 
      radial-gradient(1px 1px at 65% 15%, rgba(255, 255, 255, 0.7), transparent),
      radial-gradient(1px 1px at 35% 85%, rgba(255, 255, 255, 0.7), transparent),
      radial-gradient(1.5px 1.5px at 85% 35%, rgba(255, 255, 255, 0.7), transparent),
      radial-gradient(1.5px 1.5px at 15% 65%, rgba(255, 255, 255, 0.7), transparent);
    background-size: 300px 300px;
    background-repeat: repeat;
    animation: twinkle 6s ease-in-out infinite;
  }

  /* Additional star layers */
  .stars-1 {
    background-image: 
      radial-gradient(1px 1px at 45% 55%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 55% 45%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 95% 5%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 5% 95%, rgba(255, 255, 255, 0.5), transparent);
    background-size: 250px 250px;
    background-repeat: repeat;
    animation: twinkle 7s ease-in-out infinite;
  }

  .stars-2 {
    background-image: 
      radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.4), transparent),
      radial-gradient(1px 1px at 20% 90%, rgba(255, 255, 255, 0.4), transparent),
      radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.4), transparent),
      radial-gradient(1px 1px at 70% 30%, rgba(255, 255, 255, 0.4), transparent);
    background-size: 350px 350px;
    background-repeat: repeat;
    animation: twinkle 8s ease-in-out infinite;
  }

  .stars-3 {
    background-image: 
      radial-gradient(1px 1px at 40% 60%, rgba(255, 255, 255, 0.3), transparent),
      radial-gradient(1px 1px at 60% 40%, rgba(255, 255, 255, 0.3), transparent),
      radial-gradient(1px 1px at 90% 10%, rgba(255, 255, 255, 0.3), transparent),
      radial-gradient(1px 1px at 10% 90%, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    animation: twinkle 9s ease-in-out infinite;
  }

  @keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
  }
  
  .container {
    max-width: 700px;
    margin: 0 auto;
    padding: 25px;
    background-color: rgba(10, 10, 25, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
  }
  
  h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #67B3FF;
    text-shadow: 0 0 5px rgba(103, 179, 255, 0.5);
    font-size: 22px;
    line-height: 1.3;
  }
  
  h2 {
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    font-size: 18px;
    line-height: 1.3;
  }

  /* Zodiac Sign Title Colors */
  h2[data-sign="Aries"] {
    color: #FF4D4D;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.5);
  }

  h2[data-sign="Taurus"] {
    color: #7EB356;
    text-shadow: 0 0 5px rgba(126, 179, 86, 0.5);
  }

  h2[data-sign="Gemini"] {
    color: #FFE74C;
    text-shadow: 0 0 5px rgba(255, 231, 76, 0.5);
  }

  h2[data-sign="Cancer"] {
    color: #7DD3FC;
    text-shadow: 0 0 5px rgba(125, 211, 252, 0.5);
  }

  h2[data-sign="Leo"] {
    color: #FFB347;
    text-shadow: 0 0 5px rgba(255, 179, 71, 0.5);
  }

  h2[data-sign="Virgo"] {
    color: #90EE90;
    text-shadow: 0 0 5px rgba(144, 238, 144, 0.5);
  }

  h2[data-sign="Libra"] {
    color: #FFB6C1;
    text-shadow: 0 0 5px rgba(255, 182, 193, 0.5);
  }

  h2[data-sign="Scorpio"] {
    color: #9D4EDD;
    text-shadow: 0 0 5px rgba(157, 78, 221, 0.5);
  }

  h2[data-sign="Sagittarius"] {
    color: #FF7F50;
    text-shadow: 0 0 5px rgba(255, 127, 80, 0.5);
  }

  h2[data-sign="Capricorn"] {
    color: #4A5568;
    text-shadow: 0 0 5px rgba(74, 85, 104, 0.5);
  }

  h2[data-sign="Aquarius"] {
    color: #4FD1C5;
    text-shadow: 0 0 5px rgba(79, 209, 197, 0.5);
  }

  h2[data-sign="Pisces"] {
    color: #88D5F7;
    text-shadow: 0 0 5px rgba(136, 213, 247, 0.5);
  }

  h3 {
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.3;
    color: #B5E2FF;
    text-shadow: 0 0 3px rgba(181, 226, 255, 0.5);
  }
  
  select {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    margin: 0 auto 25px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 12px auto;
    text-align: left;
    text-align-last: left;
    padding-right: 30px;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
  }

  /* iOS-specific styles */
  @supports (-webkit-touch-callout: none) {
    select {
      font-size: 16px; /* Prevent zoom on iOS */
      padding: 10px;
      padding-right: 30px;
    }
  }

  select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  }

  select option {
    background-color: #0a0a15;
    color: #fff;
    padding: 10px;
    font-size: 14px;
  }
  
  #zodiac-info {
    text-align: center;
  }
  
  #zodiac-image {
    max-width: 100%;
    height: auto;
    margin: 0 auto 25px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    display: block;
    image-rendering: pixelated;
  }
  
  p {
    margin-bottom: 18px;
    color: #fff;
    font-size: 12px;
    line-height: 1.6;
  }

  p strong {
    color: #B5E2FF;
    text-shadow: 0 0 3px rgba(181, 226, 255, 0.5);
  }

  .mythology-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .gemstone-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .gemstone-text {
    text-align: left;
    line-height: 1.6;
    font-style: normal;
    padding: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
  }

  .mythology-text {
    text-align: left;
    line-height: 1.3;
    font-style: normal;
    padding: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-top: 12px;
    font-size: 12px;
  }

  .planet-info, .modality-info {
    font-style: normal;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin-top: 10px;
    margin-bottom: 18px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    line-height: 1.6;
  }

  .compatibility-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
  }

  .compatibility-section h3 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.2rem;
  }

  .compatibility-section select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
  }

  .compatibility-text {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.5;
    display: none;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
  }

  .compatibility-text.active {
    display: block;
  }

  @media (max-width: 600px) {
    .container {
      padding: 20px;
    }
  
    h1 {
      font-size: 18px;
    }
  
    h2 {
      font-size: 16px;
    }

    h3 {
      font-size: 14px;
    }
  
    select {
      font-size: 11px;
      padding: 10px;
      background-position: right 10px top 50%;
      background-size: 10px auto;
    }

    p, .mythology-text, .planet-info, .modality-info, .compatibility-text {
      font-size: 11px;
      line-height: 1.5;
    }
    
    #zodiac-image {
      max-width: 100%;
    }
  }

  .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 25, 0.8);
    padding: 8px 0;
    text-align: center;
    z-index: 1000;
  }

  .pixel-oracle-link {
    display: inline-block;
    color: rgba(157, 78, 221, 0.5);
    text-decoration: none;
    font-size: 8px;
    letter-spacing: 1px;
    text-shadow: 0 0 2px rgba(157, 78, 221, 0.2);
    transition: all 0.3s ease;
  }

  .pixel-oracle-link:hover {
    color: rgba(157, 78, 221, 0.9);
    text-shadow: 0 0 4px rgba(157, 78, 221, 0.4);
    transform: scale(1.05);
  }

  .element-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    align-items: center;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
  }

  .legend-title {
    font-weight: bold;
    color: #fff;
    margin-right: 0.5rem;
    font-size: 1rem;
    white-space: nowrap;
    display: inline-block;
  }

  .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-right: 0.5rem;
  }

  .legend-item span {
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    display: inline-block;
  }

  .years-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
  }

  .years-section p {
    margin: 0.5rem 0;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
  }

  .years-section strong {
    color: #fff;
    margin-right: 0.5rem;
    display: inline-block;
  }

  /* iPad specific styles */
  @media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) {
    .element-legend {
      font-size: 0.85rem;
      padding: 0.6rem;
      gap: 0.4rem;
    }

    .legend-title {
      font-size: 0.95rem;
    }

    .years-section {
      padding: 1rem;
      margin-top: 1.5rem;
    }

    .years-section p {
      font-size: 0.85rem;
    }

    #zodiac-element {
      display: inline-block;
      white-space: nowrap;
    }

    .compatibility-section {
      padding: 1rem;
      margin-top: 1.5rem;
    }

    .compatibility-section h3 {
      font-size: 1.1rem;
      margin-bottom: 0.8rem;
    }

    .compatibility-section select {
      padding: 0.7rem;
      font-size: 0.85rem;
    }

    .compatibility-text {
      font-size: 0.85rem;
      padding: 0.8rem;
      line-height: 1.4;
    }

    .compatibility-text.active {
      display: block;
      opacity: 1;
      max-height: 2000px;
      visibility: visible;
    }
  }

  /* iPad Pro specific styles */
  @media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1366px) {
    .element-legend {
      font-size: 0.9rem;
      padding: 0.7rem;
      gap: 0.5rem;
    }

    .legend-title {
      font-size: 1rem;
    }

    .years-section {
      padding: 1.2rem;
      margin-top: 2rem;
    }

    .years-section p {
      font-size: 0.9rem;
    }

    .compatibility-section {
      padding: 1.2rem;
      margin-top: 2rem;
    }

    .compatibility-section h3 {
      font-size: 1.2rem;
      margin-bottom: 1rem;
    }

    .compatibility-section select {
      padding: 0.8rem;
      font-size: 0.9rem;
    }

    .compatibility-text {
      font-size: 0.9rem;
      padding: 1rem;
      line-height: 1.5;
    }

    .compatibility-text.active {
      max-height: 2000px;
    }
  }

  /* Hide compatibility section on mobile devices */
  @media screen and (max-width: 768px) {
    .compatibility-section {
      display: none !important;
      visibility: hidden !important;
      position: absolute !important;
      z-index: -1 !important;
      pointer-events: none !important;
      opacity: 0 !important;
      height: 0 !important;
      padding: 0 !important;
      margin: 0 !important;
      overflow: hidden !important;
    }

    .compatibility-section * {
      display: none !important;
    }
  }

  /* Ensure compatibility section is visible on iPad and desktop */
  @media screen and (min-width: 769px) {
    .compatibility-section {
      display: block !important;
      visibility: visible !important;
      position: relative !important;
      z-index: auto !important;
      pointer-events: auto !important;
      opacity: 1 !important;
      height: auto !important;
      overflow: visible !important;
    }
  }