/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #0a0a24;
    color: #0F0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background object {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Title */
.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.7rem;
    text-align: center;
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #00F;
    text-shadow: 
        -2px -2px 0 #000066,
        2px -2px 0 #000066,
        -2px 2px 0 #000066,
        2px 2px 0 #000066,
        0 0 5px #00F,
        0 0 10px #00F;
    width: 100%;
    padding: 0 1rem;
    z-index: 10;
}

/* Navigation Buttons */
.nav-buttons {
    position: absolute;
    top: 14rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1400px;
    padding: 0 1rem;
    z-index: 50;
}

.nav-button {
    position: relative;
    width: 220px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    -webkit-tap-highlight-color: transparent;
}

.nav-button.active {
    z-index: 100;
}

/* Button-specific colors */
.nav-button:nth-child(1) span {
    color: #8a2be2;
    text-shadow: 0 0 5px #9932cc;
}

.nav-button:nth-child(2) span {
    color: #20b2aa;
    text-shadow: 0 0 5px #48d1cc;
}

.nav-button:nth-child(3) span {
    color: #1e90ff;
    text-shadow: 0 0 5px #4169e1;
}

.nav-button:nth-child(4) span {
    color: #ff4500;
    text-shadow: 0 0 5px #ff6347;
}

.nav-button:nth-child(5) span {
    color: #daa520;
    text-shadow: 0 0 5px #b8860b;
}

.nav-button:hover span {
    filter: brightness(1.2);
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-button:hover::before {
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown Content */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-top: 0.7rem;
    padding: 0.7rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 2000;
    pointer-events: none;
    transform-origin: top center;
    transform: scaleY(0);
}

.nav-button.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1);
}

.dropdown-content a {
    display: block;
    padding: 0.7rem;
    text-decoration: none;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    position: relative;
    z-index: 52;
}

/* Specific style for Pixel Heart Deck link */
.dropdown-content a[href="https://pixelheart.pixel-oracle.com/"] {
    color: #B22222;
    text-shadow: 0 0 5px #DC143C;
}

/* Specific style for Animal Medicine Cards link */
.dropdown-content a[href="https://www.animalmedicine.pixel-oracle.com/"] {
    color: #2E8B57;
}

/* Specific style for Gemstone Medicine Deck link */
.dropdown-content a[href="https://gemstonemedicine.pixel-oracle.com/"] {
    color: #1E90FF;
}

/* Specific style for Pixel Oracle link */
.dropdown-content a[href="https://www.pixeloracle.pixel-oracle.com/"] {
    color: #FF69B4;
    text-shadow: 0 0 5px #FF1493, 0 0 10px #FF69B4;
}

.dropdown-content a:active {
    transform: scale(0.98);
    background: rgba(0, 0, 0, 0.8);
}

.dropdown-content a:last-child {
    margin-bottom: 0;
}

.dropdown-content a:hover {
    background: rgba(0, 0, 0, 0.9);
    filter: brightness(1.3);
}

/* Add a new overlay to help with iPad touch events */
.nav-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.nav-button.active::after {
    display: none;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.crystal-ball {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    background: transparent;
    padding: 0;
    overflow: hidden;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.crystal-ball:hover {
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}



.footer-text {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: lowercase;
    letter-spacing: 1px;
}

/* Mobile Styles */
@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
        top: 1rem;
        text-shadow: 
            -1px -1px 0 #000066,
            1px -1px 0 #000066,
            -1px 1px 0 #000066,
            1px 1px 0 #000066,
            0 0 3px #00F,
            0 0 6px #00F;
    }

    .nav-buttons {
        top: 8rem;
        gap: 0.8rem;
        padding: 0 0.5rem;
    }

    .nav-button {
        width: 180px;
        height: 45px;
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .dropdown-content {
        margin-top: 0.5rem;
        padding: 0.5rem;
        z-index: 2000 !important;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .dropdown-content a {
        padding: 0.6rem;
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
        z-index: 2001 !important;
    }

    /* Specific style for Divination Tools dropdown on mobile */
    .nav-button:nth-child(4) .dropdown-content {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 0.7rem;
        transform-origin: bottom center;
    }

    /* Specific style for Oracle Games dropdown on mobile */
    .nav-button:nth-child(5) .dropdown-content {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 0.7rem;
        transform-origin: bottom center;
    }


}



/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.3);
}

/* Galaxy Animation */
.galaxy-container {
    width: 150px;
    height: 150px;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: transparent;
}

#galaxyCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}