* {
    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;
    background: linear-gradient(
      45deg,
      #67B3FF 0%,
      #ffffff 25%,
      #67B3FF 50%,
      #ffffff 75%,
      #67B3FF 100%
    );
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
    position: relative;
  }

  @keyframes shimmer {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  h2 {
    margin-bottom: 20px;
    text-shadow: 
      0 0 5px rgba(255, 255, 255, 0.3),
      0 0 10px rgba(255, 255, 255, 0.2),
      0 0 15px rgba(255, 255, 255, 0.1),
      0 0 20px rgba(255, 255, 255, 0.05);
    font-size: 18px;
    line-height: 1.3;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    transition: all 0.3s ease;
    cursor: pointer;
  }

  h2:hover {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.6),
      0 0 20px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(255, 255, 255, 0.3),
      0 0 40px rgba(255, 255, 255, 0.2),
      0 0 50px rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    transform: scale(1.05);
  }

  /* Zodiac Sign Title Colors with Enhanced Glow */
  h2[data-sign="Rat"] {
    color: #4A90E2;
    text-shadow: 
      0 0 5px rgba(74, 144, 226, 0.6),
      0 0 10px rgba(74, 144, 226, 0.4),
      0 0 15px rgba(74, 144, 226, 0.2);
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.5));
  }

  h2[data-sign="Rat"]:hover {
    text-shadow: 
      0 0 10px rgba(74, 144, 226, 0.8),
      0 0 20px rgba(74, 144, 226, 0.6),
      0 0 30px rgba(74, 144, 226, 0.4),
      0 0 40px rgba(74, 144, 226, 0.3),
      0 0 50px rgba(74, 144, 226, 0.2);
    filter: drop-shadow(0 0 15px rgba(74, 144, 226, 0.7));
  }

  h2[data-sign="Ox"] {
    color: #228B22;
    text-shadow: 
      0 0 5px rgba(34, 139, 34, 0.6),
      0 0 10px rgba(34, 139, 34, 0.4),
      0 0 15px rgba(34, 139, 34, 0.2);
    filter: drop-shadow(0 0 8px rgba(34, 139, 34, 0.5));
  }

  h2[data-sign="Tiger"] {
    color: #FF4500;
    text-shadow: 
      0 0 5px rgba(255, 69, 0, 0.6),
      0 0 10px rgba(255, 69, 0, 0.4),
      0 0 15px rgba(255, 69, 0, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.5));
  }

  h2[data-sign="Rabbit"] {
    color: #8B4513;
    text-shadow: 
      0 0 5px rgba(139, 69, 19, 0.6),
      0 0 10px rgba(139, 69, 19, 0.4),
      0 0 15px rgba(139, 69, 19, 0.2);
    filter: drop-shadow(0 0 8px rgba(139, 69, 19, 0.5));
  }

  h2[data-sign="Dragon"] {
    color: #FFD700;
    text-shadow: 
      0 0 5px rgba(255, 215, 0, 0.6),
      0 0 10px rgba(255, 215, 0, 0.4),
      0 0 15px rgba(255, 215, 0, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
  }

  h2[data-sign="Dragon"]:hover {
    text-shadow: 
      0 0 10px rgba(255, 215, 0, 0.8),
      0 0 20px rgba(255, 215, 0, 0.6),
      0 0 30px rgba(255, 215, 0, 0.4),
      0 0 40px rgba(255, 215, 0, 0.3),
      0 0 50px rgba(255, 215, 0, 0.2);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
  }

  h2[data-sign="Snake"] {
    color: #9D4EDD;
    text-shadow: 
      0 0 5px rgba(157, 78, 221, 0.6),
      0 0 10px rgba(157, 78, 221, 0.4),
      0 0 15px rgba(157, 78, 221, 0.2);
    filter: drop-shadow(0 0 8px rgba(157, 78, 221, 0.5));
  }

  h2[data-sign="Horse"] {
    color: #FF7F50;
    text-shadow: 
      0 0 5px rgba(255, 127, 80, 0.6),
      0 0 10px rgba(255, 127, 80, 0.4),
      0 0 15px rgba(255, 127, 80, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 127, 80, 0.5));
  }

  h2[data-sign="Goat"] {
    color: #90EE90;
    text-shadow: 
      0 0 5px rgba(144, 238, 144, 0.6),
      0 0 10px rgba(144, 238, 144, 0.4),
      0 0 15px rgba(144, 238, 144, 0.2);
    filter: drop-shadow(0 0 8px rgba(144, 238, 144, 0.5));
  }

  h2[data-sign="Monkey"] {
    color: #C0C0C0;
    text-shadow: 
      0 0 5px rgba(192, 192, 192, 0.6),
      0 0 10px rgba(192, 192, 192, 0.4),
      0 0 15px rgba(192, 192, 192, 0.2);
    filter: drop-shadow(0 0 8px rgba(192, 192, 192, 0.5));
  }

  h2[data-sign="Rooster"] {
    color: #FFB347;
    text-shadow: 
      0 0 5px rgba(255, 179, 71, 0.6),
      0 0 10px rgba(255, 179, 71, 0.4),
      0 0 15px rgba(255, 179, 71, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 179, 71, 0.5));
  }

  h2[data-sign="Dog"] {
    color: #8B4513;
    text-shadow: 
      0 0 5px rgba(139, 69, 19, 0.6),
      0 0 10px rgba(139, 69, 19, 0.4),
      0 0 15px rgba(139, 69, 19, 0.2);
    filter: drop-shadow(0 0 8px rgba(139, 69, 19, 0.5));
  }

  h2[data-sign="Pig"] {
    color: #FFB6C1;
    text-shadow: 
      0 0 5px rgba(255, 182, 193, 0.6),
      0 0 10px rgba(255, 182, 193, 0.4),
      0 0 15px rgba(255, 182, 193, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 182, 193, 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);
  }
  
  /* Atari-style Zodiac Buttons */
  .zodiac-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 0 auto 25px;
    max-width: 800px;
    padding: 0 10px;
    position: relative;
    z-index: 1;
  }

  .zodiac-button {
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 3px solid;
    border-color: #666 #333 #333 #666;
    border-radius: 0;
    padding: 12px 8px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    transition: all 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
      inset 2px 2px 4px rgba(0, 0, 0, 0.5),
      inset -2px -2px 4px rgba(255, 255, 255, 0.1);
  }

  .zodiac-button:hover {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-color: #888 #555 #555 #888;
    transform: translateY(-2px);
    box-shadow: 
      inset 2px 2px 4px rgba(0, 0, 0, 0.3),
      inset -2px -2px 4px rgba(255, 255, 255, 0.2),
      0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
  }

  .zodiac-button:active {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-color: #333 #666 #666 #333;
    transform: translateY(1px);
    box-shadow: 
      inset 2px 2px 4px rgba(0, 0, 0, 0.7),
      inset -2px -2px 4px rgba(255, 255, 255, 0.05);
  }

  .zodiac-button.selected {
    background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
    border-color: #aaa #777 #777 #aaa;
    color: #ffff00;
    text-shadow: 1px 1px 0px #000, 0 0 5px #ffff00;
  }

  .button-text {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .button-years {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #666;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 8px;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
  }

  .zodiac-button:hover .button-years {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(8px);
  }

  /* Individual button colors for variety */
  .zodiac-button[data-sign="Rat"] {
    border-color: #4A90E2 #2a5a8a #2a5a8a #4A90E2;
  }
  .zodiac-button[data-sign="Rat"]:hover {
    border-color: #6bb3ff #4A90E2 #4A90E2 #6bb3ff;
  }

  .zodiac-button[data-sign="Ox"] {
    border-color: #228B22 #1a5a1a #1a5a1a #228B22;
  }
  .zodiac-button[data-sign="Ox"]:hover {
    border-color: #32cd32 #228B22 #228B22 #32cd32;
  }

  .zodiac-button[data-sign="Tiger"] {
    border-color: #FF4500 #cc3700 #cc3700 #FF4500;
  }
  .zodiac-button[data-sign="Tiger"]:hover {
    border-color: #ff6b33 #FF4500 #FF4500 #ff6b33;
  }

  .zodiac-button[data-sign="Rabbit"] {
    border-color: #8B4513 #6b3410 #6b3410 #8B4513;
  }
  .zodiac-button[data-sign="Rabbit"]:hover {
    border-color: #a0522d #8B4513 #8B4513 #a0522d;
  }

  .zodiac-button[data-sign="Dragon"] {
    border-color: #FFD700 #ccad00 #ccad00 #FFD700;
  }
  .zodiac-button[data-sign="Dragon"]:hover {
    border-color: #ffed4e #FFD700 #FFD700 #ffed4e;
  }

  .zodiac-button[data-sign="Snake"] {
    border-color: #9D4EDD #7d3eb0 #7d3eb0 #9D4EDD;
  }
  .zodiac-button[data-sign="Snake"]:hover {
    border-color: #b366e6 #9D4EDD #9D4EDD #b366e6;
  }

  .zodiac-button[data-sign="Horse"] {
    border-color: #FF7F50 #cc6540 #cc6540 #FF7F50;
  }
  .zodiac-button[data-sign="Horse"]:hover {
    border-color: #ff9a73 #FF7F50 #FF7F50 #ff9a73;
  }

  .zodiac-button[data-sign="Goat"] {
    border-color: #90EE90 #73cc73 #73cc73 #90EE90;
  }
  .zodiac-button[data-sign="Goat"]:hover {
    border-color: #a8f0a8 #90EE90 #90EE90 #a8f0a8;
  }

  .zodiac-button[data-sign="Monkey"] {
    border-color: #C0C0C0 #999999 #999999 #C0C0C0;
  }
  .zodiac-button[data-sign="Monkey"]:hover {
    border-color: #e0e0e0 #C0C0C0 #C0C0C0 #e0e0e0;
  }

  .zodiac-button[data-sign="Rooster"] {
    border-color: #FFB347 #cc8f38 #cc8f38 #FFB347;
  }
  .zodiac-button[data-sign="Rooster"]:hover {
    border-color: #ffc266 #FFB347 #FFB347 #ffc266;
  }

  .zodiac-button[data-sign="Dog"] {
    border-color: #8B4513 #6b3410 #6b3410 #8B4513;
  }
  .zodiac-button[data-sign="Dog"]:hover {
    border-color: #a0522d #8B4513 #8B4513 #a0522d;
  }

  .zodiac-button[data-sign="Pig"] {
    border-color: #FFB6C1 #cc9299 #cc9299 #FFB6C1;
  }
  .zodiac-button[data-sign="Pig"]:hover {
    border-color: #ffc7d1 #FFB6C1 #FFB6C1 #ffc7d1;
  }
  
  #zodiac-info {
    text-align: center;
  }
  
  #zodiac-image {
    max-width: 350px;
    width: 350px;
    height: auto;
    margin: 0 auto 20px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    display: block;
    image-rendering: pixelated;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  #zodiac-image:hover {
    box-shadow: 
      0 0 20px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(255, 255, 255, 0.3),
      0 0 40px rgba(255, 255, 255, 0.2),
      0 0 50px rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
    filter: brightness(1.1);
  }
  
  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;
    }

    .zodiac-buttons-container {
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      padding: 0 5px;
    }

    .zodiac-button {
      padding: 8px 4px;
      font-size: 8px;
      min-height: 50px;
    }

    .button-text {
      font-size: 8px;
      margin-bottom: 2px;
    }

    .button-years {
      font-size: 7px;
      padding: 6px 8px;
    }

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

  @media (max-width: 480px) {
    .zodiac-buttons-container {
      grid-template-columns: repeat(2, 1fr);
      gap: 6px;
    }

    .zodiac-button {
      padding: 6px 3px;
      font-size: 7px;
      min-height: 45px;
    }

    .button-text {
      font-size: 7px;
    }

    .button-years {
      font-size: 6px;
      padding: 4px 6px;
    }

    #zodiac-image {
      max-width: 200px;
      width: 200px;
    }
  }

  .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;
    }
  }