/* General Styles - v1.9 - Cache Buster - Button Positioning Update - Updated 2024-12-21 */
body {
    font-family: 'VT323', monospace;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
    padding-bottom: 120px;
}

/* Stars Background */
.stars {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background: black;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    opacity: 0.8;
    animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    opacity: 0.8;
    box-shadow: 0 0 10px white;
    animation: shooting 2s linear infinite;
}

@keyframes shooting {
    0% {
        transform: translate(100vw, 0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translate(-100vw, 100vh) rotate(45deg);
        opacity: 0;
    }
}

/* Container and Content */
.container {
    text-align: center;
    padding: 20px;
    padding-bottom: 200px;
    max-width: 500px;
    width: 100%;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
  
h1 {
    font-size: 24px;
    margin-top: 3rem;
    margin-bottom: 20px;
    color: #fff5cc;
    text-shadow: 0 0 15px rgba(255, 245, 204, 0.7);
}
  
button {
    background-color: rgba(2, 71, 145, 0.7);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'VT323', monospace;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
  
button:hover {
    background-color: rgba(18, 4, 94, 0.8);
    transform: scale(1.05);
}
  
#card-display {
    margin-top: 20px;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
  
#card-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: transform 0.5s ease;
    position: relative;
    width: 100%;
    display: block;
    margin: 0 auto;
    clear: both;
}
  
#card-interpretation {
    font-size: 20px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    line-height: 1.4;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    clear: both;
}

#card-interpretation span {
    display: block;
    text-align: center;
    margin: 0;
    padding: 0;
}

#card-interpretation span:first-child {
    font-size: 24px;
    margin-bottom: 5px;
}

.zodiac-text {
    font-size: 20px !important;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    font-style: italic;
    font-weight: bold;
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(5px);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
}

.interpretation-text {
    font-size: 20px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    margin-top: 5px;
    text-align: center;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    display: block;
    margin: 10px 0;
}

.spread-link {
    color: #daa520;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

.spread-link.love-spread {
    color: #b76e79;
    text-shadow: 0 0 10px rgba(183, 110, 121, 0.5);
}

.spread-link.love-spread:hover {
    color: #e3a5ad;
    text-shadow: 0 0 15px rgba(227, 165, 173, 0.6);
}

.spread-link.two-choices {
    color: #4a9eff;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.spread-link.two-choices:hover {
    color: #6bb3ff;
    text-shadow: 0 0 15px rgba(107, 179, 255, 0.6);
}

.spread-link:hover {
    color: #cd7f32;
    text-shadow: 0 0 15px rgba(205, 127, 50, 0.6);
}

/* Encyclopedia Button Styles */
.encyclopedia-button {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 12px 20px;
    background-color: rgba(255, 215, 0, 0.7);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.encyclopedia-button:hover {
    background-color: rgba(255, 215, 0, 0.9);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    color: #000;
}

/* Card Suit Colors */
.major-arcana {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    text-align: center;
}

.wands-suit {
    color: #ff4444 !important;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    text-align: center;
}

.pentacles-suit {
    color: #44ff44 !important;
    text-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
    text-align: center;
}

.swords-suit {
    color: #89cff0 !important;
    text-shadow: 0 0 10px rgba(137, 207, 240, 0.5);
    text-align: center;
}

.cups-suit {
    color: #4444ff !important;
    text-shadow: 0 0 10px rgba(68, 68, 255, 0.5);
    text-align: center;
}

/* Element Colors */
.element-fire {
    color: #ff4444 !important;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.element-water {
    color: #4444ff !important;
    text-shadow: 0 0 10px rgba(68, 68, 255, 0.5);
}

.element-air {
    color: #89cff0 !important;
    text-shadow: 0 0 10px rgba(137, 207, 240, 0.5);
}

.element-earth {
    color: #44ff44 !important;
    text-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
}

.reversed-title {
    display: block;
    color: #b76e79;
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(183, 110, 121, 0.3);
    text-align: center;
}

.view-upright-btn {
    background-color: rgba(183, 110, 121, 0.7);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.view-upright-btn:hover {
    background-color: rgba(183, 110, 121, 0.9);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(183, 110, 121, 0.4);
}

.interpretation-titles {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    justify-content: center;
}

.upright-title, .reversed-title {
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.upright-title {
    color: #daa520;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.reversed-title {
    color: #b76e79;
    text-shadow: 0 0 10px rgba(183, 110, 121, 0.3);
}

.upright-title:hover, .reversed-title:hover {
    transform: scale(1.05);
}

.upright-title.active {
    background-color: rgba(218, 165, 32, 0.2);
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.3);
}

.reversed-title.active {
    background-color: rgba(183, 110, 121, 0.2);
    box-shadow: 0 0 15px rgba(183, 110, 121, 0.3);
}

/* Desktop Layout - Only affects screens wider than 1024px */
@media screen and (min-width: 1024px) {
    html {
        width: 100%;
        overflow-x: hidden;
    }

    body {
        width: 100%;
        margin: 0;
        padding: 0;
        position: relative;
    }

    .container {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
        box-sizing: border-box;
        padding-bottom: 250px;
    }

    /* Base container setup */
    .container {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }

    /* Title styling */
    h1 {
        text-align: center;
        margin-bottom: 30px;
    }

    /* Draw card button */
    #draw-card {
        display: block;
        width: 200px;
        margin: 0 auto 30px;
    }

    /* Card display area */
    #card-display {
        width: 100%;
        margin: 0 auto 30px;
    }

    /* Card image */
    #card-image {
        width: 100%;
        max-width: 500px;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    /* Card interpretation text */
    #card-interpretation {
        width: 100%;
        max-width: 500px;
        margin: 20px auto;
        padding: 20px;
    }

    /* Encyclopedia button */
    .encyclopedia-button {
        width: 250px;
        margin: 30px auto;
        font-size: 18px;
        padding: 15px 25px;
    }

    /* Spread links */
    .spread-link {
        display: block;
        text-align: center;
        margin: 10px auto;
    }

    .container > a:last-child {
        margin-bottom: 150px;
    }
}

/* Existing mobile/tablet styles remain unchanged below this point */

.card-back {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    transition: opacity 0.5s ease;
    position: relative;
    margin-bottom: 20px;
}

.card-back-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: transform 0.5s ease;
    display: block;
}

#anticipation-text {
    position: relative;
    margin: 10px 0;
    display: block;
}

/* Remove the Android-specific fixes that might be causing issues */
@supports not (-webkit-touch-callout: none) {
    body {
        -webkit-overflow-scrolling: touch;
        position: relative;
        width: 100%;
        height: auto;
        background-color: black;
    }

    .container {
        height: auto;
        position: relative;
        background-color: black;
    }
}

/* Add specific margin to the last link */
.container > a:last-child {
    margin-bottom: 100px;
    display: inline-block;
}

/* Site Description Footer */
.site-description {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.site-description p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

/* Loading State Styles */
button.loading {
    background-color: rgba(218, 165, 32, 0.7) !important;
    cursor: not-allowed;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.loading-message {
    text-align: center;
    padding: 20px;
    color: #fff5cc;
    text-shadow: 0 0 15px rgba(255, 245, 204, 0.7);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #daa520;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message p {
    font-size: 18px;
    margin: 0;
    color: #fff5cc;
    text-shadow: 0 0 15px rgba(255, 245, 204, 0.7);
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Card Blur Animations */
@keyframes blurOut {
    0% {
        filter: blur(0px);
        opacity: 1;
    }
    50% {
        filter: blur(5px);
        opacity: 0.5;
    }
    100% {
        filter: blur(10px);
        opacity: 0;
    }
}

@keyframes blurIn {
    0% {
        filter: blur(10px);
        opacity: 0;
    }
    50% {
        filter: blur(5px);
        opacity: 0.5;
    }
    100% {
        filter: blur(0px);
        opacity: 1;
    }
}

.card-blur-out {
    animation: blurOut 1s ease-in-out;
}

.card-blur-in {
    animation: blurIn 1s ease-in-out;
}

/* Text Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, #ffffff, #daa520, #ffffff);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2.5s ease-in-out infinite;
}

/* Home button styling - Fixed position top-right */
.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;
}

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

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

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

.home-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.4rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 0.3rem;
    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(255, 255, 255, 0.3);
}

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

.home-url {
    font-family: 'VT323', monospace;
    font-size: 0.28rem;
    color: #ffffff;
    text-shadow: 
        0 0 3px rgba(255, 255, 255, 0.8),
        0 0 6px rgba(255, 255, 255, 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(255, 255, 255, 0.8);
}

/* Mobile styles for home button */
@media (max-width: 768px) {
    .home-button {
        top: 0.1rem;
        right: 0.1rem;
        padding: 0.25rem;
        gap: 0.15rem;
    }
    
    .home-crystal {
        width: 32px;
        height: 32px;
    }
    
    .home-tooltip {
        font-size: 0.25rem;
        padding: 0.2rem 0.3rem;
        margin-bottom: 0.2rem;
    }
    
  .home-url {
      font-size: 0.22rem;
  }
}

/* What is Tarot Page Styles */
.what-is-tarot-container {
    max-width: 800px;
    padding: 40px 20px;
    text-align: left;
}

.what-is-tarot-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #fff5cc;
    text-shadow: 0 0 15px rgba(255, 245, 204, 0.7);
}

.content-section {
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.content-section h2 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    font-size: 24px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

.content-section p {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.navigation-links {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
    color: #daa520;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    border: 1px solid rgba(218, 165, 32, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.nav-link:hover {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.8);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
}

.nav-link.encyclopedia-link {
    color: #4a9eff;
    border-color: rgba(74, 158, 255, 0.5);
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.nav-link.encyclopedia-link:hover {
    color: #6bb3ff;
    border-color: rgba(107, 179, 255, 0.8);
    text-shadow: 0 0 15px rgba(107, 179, 255, 0.8);
}

/* What is Tarot Button - Upper Left */
.what-is-tarot-button {
    position: absolute;
    top: 1rem;
    left: 0.2rem;
    z-index: 1000;
    background: rgba(218, 165, 32, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    font-family: 'VT323', monospace;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
    backdrop-filter: blur(5px);
}

.what-is-tarot-button:hover {
    background: rgba(255, 215, 0, 0.8);
    border-color: rgba(255, 215, 0, 0.9);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Mobile styles for What is Tarot button */
@media (max-width: 768px) {
    .what-is-tarot-button {
        top: 0.5rem;
        left: 0.1rem;
        padding: 3px 6px;
        font-size: 8px;
    }
    
    .what-is-tarot-container {
        padding: 20px 15px;
    }
    
    .what-is-tarot-container h1 {
        font-size: 24px;
    }
    
    .content-section h2 {
        font-size: 20px;
    }
    
    .content-section p {
        font-size: 16px;
    }
    
    .navigation-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-link {
        text-align: center;
    }
    
    .how-to-read-button {
        top: 0.5rem;
        left: 5rem;
        padding: 3px 6px;
        font-size: 8px;
    }
    
    h1 {
        margin-top: 2.5rem;
    }
}

/* How to Read Tarot Button - Next to What is Tarot button */
.how-to-read-button {
    position: absolute;
    top: 1rem;
    left: 6.5rem;
    z-index: 1000;
    background: rgba(74, 158, 255, 0.7);
    color: #ffffff;
    border: 1px solid rgba(107, 179, 255, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    font-family: 'VT323', monospace;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
    backdrop-filter: blur(5px);
}

.how-to-read-button:hover {
    background: rgba(107, 179, 255, 0.8);
    border-color: rgba(107, 179, 255, 0.9);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(107, 179, 255, 0.5);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}
