/* Reset and Basic Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
  
body {
    background-color: #000000;
    font-family: 'Press Start 2P', cursive;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: twinkle 1.5s infinite;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 50%;
    animation: shoot 5s linear infinite;
    opacity: 0;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

@keyframes shoot {
    0% {
        transform: translateX(-100%) translateY(0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(200%) translateY(100px);
        opacity: 0;
    }
}
  
/* Container Styling */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(3px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
  
/* Hexagram Display */
#hexagram-container, .hexagram-lines {
    font-size: 2rem;
    margin: 20px 0;
}
  
#hexagram-container div, .hexagram-lines div {
    margin: 5px 0;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* Loading and Reveal Animations */
.loading-dots {
    font-size: 2rem;
    color: #87CEEB;
    animation: loadingPulse 1s infinite;
    text-shadow: 0 0 10px rgba(135, 206, 235, 0.8);
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.hexagram-line-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
    /* iOS Safari fixes */
    -webkit-transform: translateY(20px);
    -webkit-transition: all 0.6s ease-out;
}

.hexagram-line-reveal {
    opacity: 1;
    transform: translateY(0);
    animation: lineGlow 0.8s ease-out;
    /* iOS Safari fixes */
    -webkit-transform: translateY(0);
    -webkit-animation: lineGlow 0.8s ease-out;
}

@keyframes lineGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 1);
        transform: scale(1.1);
        -webkit-transform: scale(1.1);
    }
    100% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
        transform: scale(1);
        -webkit-transform: scale(1);
    }
}

@-webkit-keyframes lineGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 1);
        -webkit-transform: scale(1.1);
    }
    100% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
        -webkit-transform: scale(1);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hexagram Title Shimmer Effect */
.hexagram-title-shimmer, .second-hexagram-title-shimmer {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffd700 25%,
        #ffffff 50%,
        #ffd700 75%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hexagramShimmer 3s ease-in-out;
    -webkit-animation: hexagramShimmer 3s ease-in-out;
    font-size: 1.2rem;
    margin: 15px 0;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

@keyframes hexagramShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@-webkit-keyframes hexagramShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
  
/* Button Styling - Video Game Theme */
#throw-coins {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.7), rgba(255, 142, 142, 0.7), rgba(255, 107, 107, 0.7));
    background-size: 200% 200%;
    color: #ffffff;
    border: 2px solid rgba(255, 71, 87, 0.6);
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    margin: 30px auto;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 
        0 0 0 1px rgba(255, 71, 87, 0.4),
        0 0 15px rgba(255, 71, 87, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    display: block;
    animation: buttonPulse 2s infinite;
    text-shadow: 1px 1px 0px rgba(214, 48, 49, 0.8);
}

#throw-coins::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.5), rgba(255, 142, 142, 0.5), rgba(255, 107, 107, 0.5), rgba(255, 168, 168, 0.5));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 14px;
    animation: borderGlow 3s ease-in-out infinite;
}

#throw-coins:hover {
    background: linear-gradient(45deg, rgba(255, 82, 82, 0.8), rgba(255, 121, 121, 0.8), rgba(255, 82, 82, 0.8));
    background-size: 200% 200%;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 
        0 0 0 1px rgba(255, 71, 87, 0.6),
        0 0 30px rgba(255, 71, 87, 0.8),
        0 0 50px rgba(255, 107, 107, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    animation: none;
}

#throw-coins:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 0 0 1px rgba(255, 71, 87, 0.5),
        0 0 10px rgba(255, 71, 87, 0.4),
        0 1px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 1px rgba(255, 71, 87, 0.4),
            0 0 15px rgba(255, 71, 87, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 1px rgba(255, 71, 87, 0.6),
            0 0 20px rgba(255, 71, 87, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* FAQ Button - Top Left Corner */
.faq-button {
    background: linear-gradient(45deg, rgba(70, 130, 180, 0.7), rgba(100, 149, 237, 0.7), rgba(70, 130, 180, 0.7));
    background-size: 200% 200%;
    color: #ffffff;
    border: 2px solid rgba(70, 130, 180, 0.6);
    border-radius: 12px;
    padding: 6px 12px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: fixed;
    top: 3.5rem;
    left: 0.5rem;
    z-index: 1000;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 
        0 0 0 1px rgba(70, 130, 180, 0.4),
        0 0 15px rgba(70, 130, 180, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    animation: faqButtonPulse 2s infinite;
    text-shadow: 1px 1px 0px rgba(70, 130, 180, 0.8);
    display: inline-block;
    opacity: 0.75;
}

.faq-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(70, 130, 180, 0.5), rgba(100, 149, 237, 0.5), rgba(70, 130, 180, 0.5), rgba(65, 105, 225, 0.5));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 14px;
    animation: faqBorderGlow 3s ease-in-out infinite;
}

.faq-button:hover {
    background: linear-gradient(45deg, rgba(70, 130, 180, 0.8), rgba(100, 149, 237, 0.8), rgba(70, 130, 180, 0.8));
    background-size: 200% 200%;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 
        0 0 0 1px rgba(70, 130, 180, 0.6),
        0 0 20px rgba(70, 130, 180, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    animation: none;
    text-decoration: none;
    color: #ffffff;
    opacity: 1;
}

.faq-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 0 0 1px rgba(70, 130, 180, 0.5),
        0 0 10px rgba(70, 130, 180, 0.4),
        0 1px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

@keyframes faqButtonPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 1px rgba(70, 130, 180, 0.4),
            0 0 15px rgba(70, 130, 180, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 1px rgba(70, 130, 180, 0.6),
            0 0 20px rgba(70, 130, 180, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

@keyframes faqBorderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* History Button - Top Left Corner */
.history-button {
    background: linear-gradient(45deg, rgba(65, 105, 225, 0.7), rgba(100, 149, 237, 0.7), rgba(65, 105, 225, 0.7));
    background-size: 200% 200%;
    color: #ffffff;
    border: 2px solid rgba(65, 105, 225, 0.6);
    border-radius: 12px;
    padding: 6px 12px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: fixed;
    top: 6rem;
    left: 0.5rem;
    z-index: 1000;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 
        0 0 0 1px rgba(65, 105, 225, 0.4),
        0 0 15px rgba(65, 105, 225, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    animation: historyButtonPulse 2s infinite;
    text-shadow: 1px 1px 0px rgba(25, 25, 112, 0.8);
    display: inline-block;
    opacity: 0.75;
}

.history-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(65, 105, 225, 0.5), rgba(100, 149, 237, 0.5), rgba(65, 105, 225, 0.5), rgba(72, 61, 139, 0.5));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 14px;
    animation: historyBorderGlow 3s ease-in-out infinite;
}

.history-button:hover {
    background: linear-gradient(45deg, rgba(65, 105, 225, 0.8), rgba(100, 149, 237, 0.8), rgba(65, 105, 225, 0.8));
    background-size: 200% 200%;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 
        0 0 0 1px rgba(65, 105, 225, 0.6),
        0 0 20px rgba(65, 105, 225, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    animation: none;
    text-decoration: none;
    color: #ffffff;
    opacity: 1;
}

.history-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 0 0 1px rgba(65, 105, 225, 0.5),
        0 0 10px rgba(65, 105, 225, 0.4),
        0 1px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

@keyframes historyButtonPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 1px rgba(65, 105, 225, 0.4),
            0 0 15px rgba(65, 105, 225, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 1px rgba(65, 105, 225, 0.6),
            0 0 20px rgba(65, 105, 225, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

@keyframes historyBorderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Interpretations Button - Top Left Corner */
.interpretations-button {
    background: linear-gradient(45deg, rgba(135, 206, 235, 0.7), rgba(173, 216, 230, 0.7), rgba(135, 206, 235, 0.7));
    background-size: 200% 200%;
    color: #ffffff;
    border: 2px solid rgba(135, 206, 235, 0.6);
    border-radius: 12px;
    padding: 6px 12px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: fixed;
    top: 1rem;
    left: 0.5rem;
    z-index: 1000;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 
        0 0 0 1px rgba(135, 206, 235, 0.4),
        0 0 15px rgba(135, 206, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    animation: interpretationsButtonPulse 2s infinite;
    text-shadow: 1px 1px 0px rgba(70, 130, 180, 0.8);
    display: inline-block;
    opacity: 0.75;
}

.interpretations-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(135, 206, 235, 0.5), rgba(173, 216, 230, 0.5), rgba(135, 206, 235, 0.5), rgba(176, 224, 230, 0.5));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 14px;
    animation: interpretationsBorderGlow 3s ease-in-out infinite;
}

.interpretations-button:hover {
    background: linear-gradient(45deg, rgba(135, 206, 235, 0.8), rgba(173, 216, 230, 0.8), rgba(135, 206, 235, 0.8));
    background-size: 200% 200%;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 
        0 0 0 1px rgba(135, 206, 235, 0.6),
        0 0 20px rgba(135, 206, 235, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    animation: none;
    text-decoration: none;
    color: #ffffff;
    opacity: 1;
}

.interpretations-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 0 0 1px rgba(135, 206, 235, 0.5),
        0 0 10px rgba(135, 206, 235, 0.4),
        0 1px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

@keyframes interpretationsButtonPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 1px rgba(135, 206, 235, 0.4),
            0 0 15px rgba(135, 206, 235, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 1px rgba(135, 206, 235, 0.6),
            0 0 20px rgba(135, 206, 235, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

@keyframes interpretationsBorderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Back to Generator Button - Fixed Upper Left */
.back-to-generator {
    position: fixed;
    top: 1rem;
    left: 0.5rem;
    z-index: 999;
    padding: 6px 12px;
    background: linear-gradient(45deg, rgba(135, 206, 235, 0.7), rgba(173, 216, 230, 0.7));
    border: 2px solid rgba(135, 206, 235, 0.6);
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 
        0 0 0 1px rgba(135, 206, 235, 0.4),
        0 0 10px rgba(135, 206, 235, 0.3);
}

.back-to-generator:hover {
    background: linear-gradient(45deg, rgba(135, 206, 235, 0.9), rgba(173, 216, 230, 0.9));
    transform: translateY(-2px);
    box-shadow: 
        0 0 0 1px rgba(135, 206, 235, 0.6),
        0 0 15px rgba(135, 206, 235, 0.5);
}

@media (max-width: 600px) {
    .back-to-generator {
        font-size: 0.45rem;
        padding: 5px 10px;
        top: 0.75rem;
    }
}

@media (max-width: 1024px) and (min-width: 601px) {
    .back-to-generator {
        font-size: 0.48rem;
        padding: 5px 12px;
        top: 0.75rem;
    }
}

/* Pixel Oracle Home Button - Top Right Corner */
.home-button {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0.35rem;
    transition: all 0.3s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
    gap: 0.25rem;
    opacity: 0.6;
}

.home-button:hover {
    background: transparent;
    transform: scale(1.05);
    box-shadow: none;
    opacity: 0.8;
}

.home-crystal {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.home-button:hover .home-crystal {
    transform: scale(1.1);
    filter: brightness(1.2);
    opacity: 0.8;
}

.home-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #87CEEB;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.3);
}

.home-button:hover .home-tooltip {
    opacity: 1;
}

.home-url {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    color: #87CEEB;
    text-shadow: 
        0 0 3px rgba(135, 206, 235, 0.8),
        0 0 6px rgba(135, 206, 235, 0.6);
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-button:hover .home-url {
    color: #FFFFFF;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 1),
        0 0 10px rgba(135, 206, 235, 0.8);
}
  
/* Hexagram Info Styling */
#hexagram-info {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(2px);
}

#hexagram-description {
    font-size: 0.9rem;
    margin: 20px 0;
    line-height: 1.8;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#changing-lines {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    border-radius: 5px;
    backdrop-filter: blur(2px);
}

#changing-lines h3 {
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#changing-lines ul {
    list-style-type: none;
}

#changing-lines li {
    margin: 15px 0;
    font-size: 0.8rem;
    line-height: 1.6;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#second-hexagram {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

#second-hexagram h3 {
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#second-hexagram h4 {
    margin: 15px 0;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#second-hexagram p {
    font-size: 0.9rem;
    line-height: 1.8;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
  
.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  transform: translateX(-30px);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

h1 {
  font-size: 28px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  line-height: 1.3;
  display: inline-block;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.title-coin {
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5)) !important;
  margin-right: -8px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  align-self: center !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  image-rendering: pixelated !important;
  -ms-interpolation-mode: nearest-neighbor !important;
  vertical-align: middle !important;
}

/* Responsive title sizing for longer text */
@media (max-width: 1024px) {
  .title-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: none;
  }
  
  .title-coin {
    height: 40px !important;
    max-height: 40px !important;
    max-width: 40px !important;
    margin-right: 0 !important;
  }
  
  h1 {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .title-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: none;
  }
  
  .title-coin {
    height: 40px !important;
    max-height: 40px !important;
    max-width: 40px !important;
    margin-right: 0 !important;
  }
  
  h1 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .title-container {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: none;
  }
  
  .title-coin {
    height: 35px !important;
    max-height: 35px !important;
    max-width: 35px !important;
    margin-right: 0 !important;
  }
  
  h1 {
    font-size: 16px;
  }
}

h2 {
    margin: 20px 0;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #87CEEB 25%,
        #ffffff 50%,
        #87CEEB 75%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s ease-in-out;
}

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

/* Shimmer for description */
.shimmer-description {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #87CEEB 25%,
        #ffffff 50%,
        #87CEEB 75%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s ease-in-out 0.5s;
}
  
/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    #hexagram-container, .hexagram-lines {
        font-size: 1.5rem;
    }

    #hexagram-description, #changing-lines li, #second-hexagram p {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2, h3, h4 {
        font-size: 1rem;
    }
    
    /* Mobile adjustments for video game button */
    #throw-coins {
        padding: 10px 20px;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        border-radius: 10px;
    }
    
    /* Mobile adjustments for site description */
    .site-description {
        font-size: 11px !important;
        line-height: 1.5;
        margin-top: 15px !important;
        padding: 0 10px;
    }
    
    /* Ensure footer is visible on mobile */
    footer {
        margin-top: 30px;
        padding: 15px 0;
    }
    
    footer p {
        font-size: 11px;
        margin: 8px 0;
    }
    
    /* Mobile adjustments for interpretations button (Largest) */
    .interpretations-button {
        padding: 3px 6px;
        font-size: 0.3rem;
        letter-spacing: 0.2px;
        border-radius: 8px;
        top: 0.75rem;
        left: 0.5rem;
        border-width: 1.5px;
        opacity: 0.75;
    }
    
    /* Mobile adjustments for FAQ button (Medium) */
    .faq-button {
        padding: 3px 6px;
        font-size: 0.3rem;
        letter-spacing: 0.2px;
        border-radius: 8px;
        top: 1.85rem;
        left: 0.5rem;
        border-width: 1.5px;
        opacity: 0.75;
    }
    
    /* Mobile adjustments for History button (Smallest) */
    .history-button {
        padding: 3px 6px;
        font-size: 0.3rem;
        letter-spacing: 0.2px;
        border-radius: 8px;
        top: 2.95rem;
        left: 0.5rem;
        border-width: 1.5px;
        opacity: 0.75;
    }
    
    /* Mobile adjustments for home button */
    .home-button {
        padding: 0.15rem;
        top: 0.5rem;
        right: 0.5rem;
        border-width: 1px;
        border-radius: 4px;
        opacity: 0.6;
        gap: 0.15rem;
    }

    .home-crystal {
        width: 20px;
        height: 20px;
        opacity: 0.6;
    }

    .home-tooltip {
        font-size: 0.4rem;
        padding: 0.25rem 0.4rem;
    }

    .home-url {
        font-size: 0.25rem;
        opacity: 0.9;
    }
}

/* iPad and tablet responsive design */
@media (max-width: 1024px) and (min-width: 601px) {
    .site-description {
        font-size: 11px !important;
        line-height: 1.4;
        margin-top: 12px !important;
        padding: 0 20px;
    }
    
    footer {
        margin-top: 35px;
        padding: 18px 0;
    }
    
    footer p {
        font-size: 12px;
        margin: 6px 0;
    }
    
    /* iPad adjustments for interpretations button (Largest) */
    .interpretations-button {
        padding: 5px 12px;
        font-size: 0.48rem;
        top: 0.75rem;
        left: 0.5rem;
        opacity: 0.6;
    }
    
    /* iPad adjustments for FAQ button (Medium) */
    .faq-button {
        padding: 5px 12px;
        font-size: 0.48rem;
        top: 3.25rem;
        left: 0.5rem;
        opacity: 0.6;
    }
    
    /* iPad adjustments for History button (Smallest) */
    .history-button {
        padding: 5px 12px;
        font-size: 0.48rem;
        top: 5.75rem;
        left: 0.5rem;
        opacity: 0.6;
    }
    
    /* iPad adjustments for home button */
    .home-button {
        padding: 0.25rem;
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.2rem;
        opacity: 0.6;
    }

    .home-crystal {
        width: 32px;
        height: 32px;
        opacity: 0.6;
    }

    .home-tooltip {
        font-size: 0.5rem;
        padding: 0.3rem 0.5rem;
    }

    .home-url {
        font-size: 0.35rem;
        opacity: 0.8;
    }
}

/* Footer Styling */
footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
}

footer p {
    font-size: 12px;
    color: #87CEEB;
    margin: 5px 0;
}

footer a {
    color: #87CEEB;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(135, 206, 235, 0.5);
}

.site-description {
    font-size: 10px !important;
    color: #87CEEB !important;
    opacity: 0.8;
    margin-top: 10px !important;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}