/* 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;
}

/* Oracle Links */
.oracle-links {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.oracle-link {
    display: block;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-family: 'VT323', monospace;
    font-size: 0.75rem;
    text-decoration: none;
    color: #1e90ff;
    text-shadow: 
        0 0 3px rgba(30, 144, 255, 0.8),
        0 0 6px rgba(30, 144, 255, 0.6);
    transition: all 0.3s ease;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.oracle-link:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
    color: #00BFFF;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 1),
        0 0 10px rgba(0, 191, 255, 0.8);
    transform: scale(1.05);
}

/* Home Button */
.home-button {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 100;
    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.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #00FFFF;
    font-family: 'VT323', monospace;
    font-size: 0.85rem;
    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(0, 255, 255, 0.3);
}

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

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

/* Title */
.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.7rem;
    text-align: center;
    position: absolute;
    top: 4rem;
    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;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 1rem;
    z-index: 200;
}

.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;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Button-specific colors - Simplified to prevent tracer effect */
.nav-button:nth-child(1) span {
    color: #DC143C;
    text-shadow: 0 0 5px rgba(220, 20, 60, 0.6);
}

.nav-button:nth-child(2) span {
    color: #0066ff;
    text-shadow: 0 0 5px rgba(0, 102, 255, 0.6);
}

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

/* Tools/Games button text styling */
.nav-button:nth-child(3) .tools-text {
    color: #8A2BE2;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.6);
}

.nav-button:nth-child(3) .games-text {
    color: #daa520;
    text-shadow: 0 0 5px rgba(218, 165, 32, 0.6);
}

.nav-button:nth-child(3):hover .tools-text {
    color: #9370DB;
    text-shadow: 0 0 8px rgba(147, 112, 219, 0.8);
}

.nav-button:nth-child(3):hover .games-text {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

/* Cards/Spreads button - split text colors */
.nav-button:nth-child(1) .cards-text {
    color: #DC143C !important;
    text-shadow: 0 0 5px rgba(220, 20, 60, 0.8) !important;
}

.nav-button:nth-child(1) .spreads-text {
    color: #ff6347 !important;
    text-shadow: 0 0 5px rgba(255, 99, 71, 0.8) !important;
}

.nav-button:nth-child(1):hover .cards-text {
    color: #ff1744 !important;
    text-shadow: 0 0 8px rgba(255, 23, 68, 1) !important;
}

.nav-button:nth-child(1):hover .spreads-text {
    color: #ff4500 !important;
    text-shadow: 0 0 8px rgba(255, 69, 0, 1) !important;
}

/* Library/Horoscopes button - split text colors */
.nav-button:nth-child(2) .library-text {
    color: #1e90ff !important;
    text-shadow: 0 0 5px rgba(30, 144, 255, 0.8) !important;
}

.nav-button:nth-child(2) .horoscopes-text {
    color: #20b2aa !important;
    text-shadow: 0 0 5px rgba(32, 178, 170, 0.8) !important;
}

.nav-button:nth-child(2):hover .library-text {
    color: #4169e1 !important;
    text-shadow: 0 0 8px rgba(65, 105, 225, 1) !important;
}

.nav-button:nth-child(2):hover .horoscopes-text {
    color: #00ced1 !important;
    text-shadow: 0 0 8px rgba(0, 206, 209, 1) !important;
}

/* Style the forward slash between Tools and Games */
.nav-button:nth-child(3) {
    color: #8A2BE2;
    text-shadow: 0 0 3px rgba(138, 43, 226, 0.5);
}

/* Style the forward slash between Cards and Spreads */
.nav-button:nth-child(1) {
    color: #DC143C;
    text-shadow: 0 0 3px rgba(220, 20, 60, 0.5);
}

/* Style the forward slash between Library and Horoscopes */
.nav-button:nth-child(2) {
    color: #1e90ff;
    text-shadow: 0 0 3px rgba(30, 144, 255, 0.5);
}

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

.nav-button:hover span {
    /* Removed brightness filter to prevent tracer effect */
}

.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 - Base */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-radius: 0;
    margin-top: 0.7rem;
    padding: 0.7rem;
    opacity: 0;
    visibility: hidden;
    transition: none;
    z-index: 2000;
    pointer-events: none;
    transform-origin: top center;
    transform: scaleY(0) translateY(-30px) rotateX(-15deg);
    overflow: visible;
    /* Ensure all dropdowns always open downward */
    bottom: auto !important;
}

/* Cards/Spreads Dropdown - Bright Red - Centered Popup */
.nav-button:nth-child(1) .dropdown-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    background: 
        linear-gradient(90deg, rgba(220, 20, 60, 0.1) 0%, rgba(220, 20, 60, 0.05) 50%, rgba(220, 20, 60, 0.1) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(220, 20, 60, 0.03) 2px, rgba(220, 20, 60, 0.03) 4px),
        radial-gradient(circle at 20% 20%, rgba(220, 20, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(220, 20, 60, 0.08) 0%, transparent 50%),
        rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(220, 20, 60, 0.6);
    box-shadow: 
        0 0 20px rgba(220, 20, 60, 0.3),
        inset 0 0 20px rgba(220, 20, 60, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(1).active .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

/* Library/Horoscopes Dropdown - Blue - Centered Popup */
.nav-button:nth-child(2) .dropdown-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 95vw;
    height: auto;
    max-height: none;
    background: 
        linear-gradient(90deg, rgba(30, 144, 255, 0.1) 0%, rgba(30, 144, 255, 0.05) 50%, rgba(30, 144, 255, 0.1) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(30, 144, 255, 0.03) 2px, rgba(30, 144, 255, 0.03) 4px),
        radial-gradient(circle at 20% 20%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(30, 144, 255, 0.08) 0%, transparent 50%),
        rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(30, 144, 255, 0.6);
    box-shadow: 
        0 0 20px rgba(30, 144, 255, 0.3),
        inset 0 0 20px rgba(30, 144, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2000;
    overflow: visible;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(2).active .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

/* Adventure Dropdown - Deep Pink - Centered Popup */
.nav-button:nth-child(4) .dropdown-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    background: 
        linear-gradient(90deg, rgba(255, 20, 147, 0.1) 0%, rgba(255, 20, 147, 0.05) 50%, rgba(255, 20, 147, 0.1) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 20, 147, 0.03) 2px, rgba(255, 20, 147, 0.03) 4px),
        radial-gradient(circle at 20% 20%, rgba(255, 20, 147, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 20, 147, 0.08) 0%, transparent 50%),
        rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 20, 147, 0.6);
    box-shadow: 
        0 0 20px rgba(255, 20, 147, 0.3),
        inset 0 0 20px rgba(255, 20, 147, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(4).active .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

/* Tools/Games Dropdown - Purple and Yellow Combined - Centered Popup */
.nav-button:nth-child(3) .dropdown-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 95vw;
    height: auto;
    max-height: none;
    background: 
        linear-gradient(90deg, rgba(138, 43, 226, 0.1) 0%, rgba(138, 43, 226, 0.05) 50%, rgba(218, 165, 32, 0.05) 50%, rgba(218, 165, 32, 0.1) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(138, 43, 226, 0.03) 2px, rgba(138, 43, 226, 0.03) 4px),
        radial-gradient(circle at 20% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(218, 165, 32, 0.08) 0%, transparent 50%),
        rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(138, 43, 226, 0.6);
    box-shadow: 
        0 0 20px rgba(138, 43, 226, 0.3),
        inset 0 0 20px rgba(138, 43, 226, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2000;
    overflow: visible;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(3).active .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

/* About Dropdown - Gold */
.nav-button:nth-child(5) .dropdown-content {
    background: 
        linear-gradient(90deg, rgba(218, 165, 32, 0.1) 0%, rgba(218, 165, 32, 0.05) 50%, rgba(218, 165, 32, 0.1) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(218, 165, 32, 0.03) 2px, rgba(218, 165, 32, 0.03) 4px),
        radial-gradient(circle at 20% 20%, rgba(218, 165, 32, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(218, 165, 32, 0.08) 0%, transparent 50%),
        rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(218, 165, 32, 0.6);
    box-shadow: 
        0 0 20px rgba(218, 165, 32, 0.3),
        inset 0 0 20px rgba(218, 165, 32, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
}

/* Scan Bar - Cards/Spreads (Bright Red) - Disabled for centered popup */
.nav-button:nth-child(1) .dropdown-content::before {
    display: none;
}

/* Scan Bar - Library/Horoscopes (Blue) - Disabled for centered popup */
.nav-button:nth-child(2) .dropdown-content::before {
    display: none;
}

/* Scan Bar - Adventure (Deep Pink) - Disabled for centered popup */
.nav-button:nth-child(4) .dropdown-content::before {
    display: none;
}

/* Scan Bar - Tools (Purple) - Disabled for centered popup */
.nav-button:nth-child(3) .dropdown-content::before {
    display: none;
}

/* Scan Bar - About (Gold) - Disabled (no 5th button) */
.nav-button:nth-child(5) .dropdown-content::before {
    display: none;
}

/* Grid Overlay - Cards/Spreads (Bright Red) */
.nav-button:nth-child(1) .dropdown-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(220, 20, 60, 0.1) 8px, 
            rgba(220, 20, 60, 0.1) 9px),
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(220, 20, 60, 0.1) 8px, 
            rgba(220, 20, 60, 0.1) 9px);
    pointer-events: none;
    opacity: 0.3;
}

/* Grid Overlay - Library/Horoscopes (Blue) */
.nav-button:nth-child(2) .dropdown-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(30, 144, 255, 0.1) 8px, 
            rgba(30, 144, 255, 0.1) 9px),
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(30, 144, 255, 0.1) 8px, 
            rgba(30, 144, 255, 0.1) 9px);
    pointer-events: none;
    opacity: 0.3;
}

/* Grid Overlay - Adventure (Deep Pink) */
.nav-button:nth-child(4) .dropdown-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(255, 20, 147, 0.1) 8px, 
            rgba(255, 20, 147, 0.1) 9px),
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(255, 20, 147, 0.1) 8px, 
            rgba(255, 20, 147, 0.1) 9px);
    pointer-events: none;
    opacity: 0.3;
}

/* Grid Overlay - Tools (Purple) */
.nav-button:nth-child(3) .dropdown-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(138, 43, 226, 0.1) 8px, 
            rgba(138, 43, 226, 0.1) 9px),
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(138, 43, 226, 0.1) 8px, 
            rgba(138, 43, 226, 0.1) 9px);
    pointer-events: none;
    opacity: 0.3;
}

/* Grid Overlay - About (Gold) */
.nav-button:nth-child(5) .dropdown-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(218, 165, 32, 0.1) 8px, 
            rgba(218, 165, 32, 0.1) 9px),
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 8px, 
            rgba(218, 165, 32, 0.1) 8px, 
            rgba(218, 165, 32, 0.1) 9px);
    pointer-events: none;
    opacity: 0.3;
}

@keyframes mechanicalScan {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

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

/* Specific styles for Cards/Spreads dropdown links – different red/orange shades */
/* Pixel Heart Deck */
.nav-button:nth-child(1) .dropdown-content a[href="https://pixelheart.pixel-oracle.com/"] {
    color: #ff1744 !important; /* vivid red */
    text-shadow: 0 0 5px rgba(255, 23, 68, 0.9) !important;
}

/* The Animal Oracle */
.nav-button:nth-child(1) .dropdown-content a[href="https://theanimaloracle.pixel-oracle.com/"] {
    color: #ff7043 !important; /* soft orange-red */
    text-shadow: 0 0 4px rgba(255, 112, 67, 0.8) !important;
}

/* The Gemstone Oracle */
.nav-button:nth-child(1) .dropdown-content a[href="https://thegemstoneoracle.pixel-oracle.com/"] {
    color: #ff8f00 !important; /* amber/orange */
    text-shadow: 0 0 4px rgba(255, 143, 0, 0.8) !important;
}

/* Pixel Tarot Deck */
.nav-button:nth-child(1) .dropdown-content a[href="https://tarot.pixel-oracle.com/"] {
    color: #ff5722 !important; /* deep orange-red */
    text-shadow: 0 0 4px rgba(255, 87, 34, 0.85) !important;
}

/* 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: none;
    background: transparent;
}

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

/* Specific styling for Cards/Spreads dropdown links */
.nav-button:nth-child(1) .dropdown-content a {
    color: #DC143C !important;
    text-shadow: 0 0 3px rgba(220, 20, 60, 0.6) !important;
}

.nav-button:nth-child(1) .dropdown-content a:hover {
    color: #ff6347 !important;
    text-shadow: 0 0 5px rgba(255, 99, 71, 0.8) !important;
    background-color: rgba(255, 99, 71, 0.1) !important;
}

/* Main dropdown submenu triggers - Title colors */
.nav-button:nth-child(3) .dropdown-content .submenu-trigger:first-child {
    color: #8A2BE2 !important;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.6) !important;
}

.nav-button:nth-child(3) .dropdown-content .submenu-trigger:first-child:hover {
    color: #9370DB !important;
    text-shadow: 0 0 8px rgba(147, 112, 219, 0.8) !important;
    background-color: rgba(138, 43, 226, 0.1) !important;
}

.nav-button:nth-child(3) .dropdown-content .submenu-trigger:last-child {
    color: #daa520 !important;
    text-shadow: 0 0 5px rgba(218, 165, 32, 0.6) !important;
}

.nav-button:nth-child(3) .dropdown-content .submenu-trigger:last-child:hover {
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8) !important;
    background-color: rgba(218, 165, 32, 0.1) !important;
}

/* Specific styling for Tools submenu - PURPLE - Centered Popup */
.nav-button:nth-child(3) .dropdown-item-with-submenu:first-child .submenu-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 95vw;
    max-height: 90vh;
    background: 
        linear-gradient(90deg, rgba(138, 43, 226, 0.15) 0%, rgba(138, 43, 226, 0.1) 50%, rgba(138, 43, 226, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(138, 43, 226, 0.05) 2px, rgba(138, 43, 226, 0.05) 4px),
        radial-gradient(circle at 20% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.12) 0%, transparent 50%),
        rgba(0, 0, 0, 0.98);
    border: 2px solid rgba(138, 43, 226, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    box-shadow: 
        0 0 25px rgba(138, 43, 226, 0.4),
        inset 0 0 25px rgba(138, 43, 226, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.9);
    z-index: 3001;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:first-child .submenu-content.show {
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:first-child .submenu-content a {
    color: #8A2BE2 !important;
    text-shadow: 0 0 3px rgba(138, 43, 226, 0.6) !important;
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:first-child .submenu-content a:hover {
    color: #9370DB !important;
    text-shadow: 0 0 5px rgba(147, 112, 219, 0.8) !important;
    background-color: rgba(138, 43, 226, 0.1) !important;
}

/* Specific styling for Oracle Games submenu - YELLOW - Centered Popup */
.nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 95vw;
    max-height: 90vh;
    background: 
        linear-gradient(90deg, rgba(218, 165, 32, 0.15) 0%, rgba(218, 165, 32, 0.1) 50%, rgba(218, 165, 32, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(218, 165, 32, 0.05) 2px, rgba(218, 165, 32, 0.05) 4px),
        radial-gradient(circle at 20% 20%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(218, 165, 32, 0.12) 0%, transparent 50%),
        rgba(0, 0, 0, 0.98);
    border: 2px solid rgba(218, 165, 32, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    box-shadow: 
        0 0 25px rgba(218, 165, 32, 0.4),
        inset 0 0 25px rgba(218, 165, 32, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.9);
    z-index: 3001;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-content.show {
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-content a {
    color: #daa520 !important;
    text-shadow: 0 0 3px rgba(218, 165, 32, 0.6) !important;
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-content a:hover {
    color: #ffd700 !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.8) !important;
    background-color: rgba(218, 165, 32, 0.1) !important;
}

/* Cosmic Code link - Override with darker blue glow */
.dropdown-content a[href*="cosmic-code"] {
    color: #0066CC !important;
    text-shadow: 0 0 5px rgba(0, 102, 204, 0.8), 0 0 10px rgba(0, 102, 204, 0.6), 0 0 15px rgba(0, 102, 204, 0.4) !important;
    transition: none !important;
}

.dropdown-content a[href*="cosmic-code"]:hover {
    color: #0080FF !important;
    text-shadow: 0 0 6px rgba(0, 128, 255, 1), 0 0 12px rgba(0, 128, 255, 0.8), 0 0 18px rgba(0, 128, 255, 0.6) !important;
}

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

/* Backdrop overlay for all popups */
.nav-button.active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 1;
    pointer-events: auto;
}

/* Enable transitions after page load */
.page-loaded .dropdown-content {
    transition: all 0.8s linear;
}

.page-loaded .dropdown-content a {
    transition: all 0.3s ease;
}

.page-loaded .dropdown-content a[href*="cosmic-code"] {
    transition: text-shadow 0.3s ease !important;
}

/* 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;
    cursor: pointer;
    user-select: none;
}

.crystal-ball:hover {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    transform: scale(1.05);
}

.crystal-ball:active {
    transform: scale(0.95);
}



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

/* Contact Email Link */
.contact-email-container {
    position: fixed;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
}

.contact-email {
    font-family: 'VT323', monospace;
    font-size: 0.75rem;
    color: rgba(0, 191, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 3px rgba(0, 191, 255, 0.5);
}

.contact-email:hover {
    color: rgba(0, 191, 255, 1);
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.8);
    transform: scale(1.05);
}

.copy-email-btn {
    background: transparent;
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 4px;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 191, 255, 0.7);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.copy-email-btn:hover {
    background: rgba(0, 191, 255, 0.1);
    border-color: rgba(0, 191, 255, 0.6);
    color: rgba(0, 191, 255, 1);
    transform: scale(1.1);
}

.copy-email-btn:active {
    transform: scale(0.95);
}

.copy-email-btn svg {
    display: block;
}

/* Tablet/iPad Styles */
@media (max-width: 1024px) and (min-width: 481px) {
    .home-button {
        padding: 0.15rem;
        top: 0.5rem;
        right: 0.5rem;
    }

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

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

    .home-url {
        font-size: 0.55rem;
    }

    .galaxy-container {
        left: 50% !important;
        top: 9rem !important;
        transform: translate(-50%, -50%) !important;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .oracle-links {
        top: auto;
        bottom: 0.5rem;
        left: 0.5rem;
        gap: 0.3rem;
    }

    .oracle-link {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
        border-width: 1px;
    }

    .home-button {
        padding: 0.15rem;
        top: 0.5rem;
        right: 0.5rem;
        border-width: 1px;
        border-radius: 4px;
        opacity: 0.6;
    }

    .home-crystal {
        width: 24px;
        height: 24px;
        opacity: 0.7;
    }

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

    .home-url {
        font-size: 0.45rem;
        opacity: 0.7;
    }
    
    .home-button:hover {
        opacity: 0.85;
    }

    .contact-email-container {
        bottom: 0.3rem;
        right: 0.3rem;
        gap: 0.3rem;
    }
    
    .contact-email {
        font-size: 0.65rem;
    }
    
    .copy-email-btn {
        padding: 0.2rem;
    }
    
    .copy-email-btn svg {
        width: 10px;
        height: 10px;
    }
    
    .home-button:hover .home-crystal {
        opacity: 0.95;
    }
    
    .home-button:hover .home-url {
        opacity: 0.95;
    }

    .title {
        font-size: 1.5rem;
        top: 2.5rem;
        text-shadow: 0 0 5px #00F;
    }

    .galaxy-container {
        left: 50% !important;
        top: 5.5rem !important;
        transform: translate(-50%, -50%) !important;
        width: 120px !important;
        height: 120px !important;
    }

    .nav-buttons {
        top: 8rem;
        gap: 0.8rem;
        padding: 0 0.5rem;
        flex-direction: column;
        align-items: center;
    }

    .nav-button {
        width: 180px;
        height: 45px;
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Simplify mobile button text shadows to prevent tracer effect */
    .nav-button span {
        text-shadow: none !important;
    }
    
    .nav-button .tools-text,
    .nav-button .games-text {
        text-shadow: none !important;
    }
    
    /* Restore mobile button colors without complex effects */
    .nav-button:nth-child(1) span {
        color: #DC143C !important;
    }
    
    .nav-button:nth-child(2) span {
        color: #0066ff !important;
    }
    
    .nav-button:nth-child(3) .tools-text {
        color: #8A2BE2 !important;
    }
    
    .nav-button:nth-child(3) .games-text {
        color: #daa520 !important;
    }
    
    .nav-button:nth-child(4) span {
        color: #ff1493 !important;
    }
    
    .nav-button:nth-child(5) span {
        color: #daa520 !important;
    }

    /* Match mobile dropdown box sizing to Earth Oracle */
    .nav-button:nth-child(1) .dropdown-content,
    .nav-button:nth-child(2) .dropdown-content,
    .nav-button:nth-child(3) .dropdown-content,
    .nav-button:nth-child(4) .dropdown-content {
        min-width: 280px;
        max-width: 90vw;
        padding: 0.8rem;
    }

    /* Make Library/Horoscope dropdown box a bit wider on mobile
       so its longer buttons fit comfortably */
    .nav-button:nth-child(2) .dropdown-content {
        min-width: 320px;
        max-width: 95vw;
    }

    .dropdown-content {
        margin-top: 0.5rem;
        padding: 0.5rem;
        z-index: 2000 !important;
        /* Removed transition to prevent tracer effect */
    }

    .dropdown-content a {
        padding: 0.4rem 0.2rem;
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
        z-index: 2001 !important;
        /* Text-link look on mobile as well */
        background: transparent !important;
        border-radius: 0 !important;
        border: none !important;
        text-shadow: none !important;
        box-shadow: none !important;
        transition: none !important;
    }

    /* All dropdowns open downward on mobile - removed upward opening styles */

    /* Mobile-specific introduction text styles */
    .site-description {
        top: 1.5rem !important;
        font-size: 0.6rem !important;
        line-height: 1.2 !important;
        margin: 0.5rem auto !important;
        max-width: 90% !important;
    }

    /* Move Oracle Games diamond to the right on mobile */
    .nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-trigger::after {
        right: 2px !important;
    }

}



/* 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);
}

/* Nested dropdown styles */
.dropdown-item-with-submenu {
    position: static;
}

.submenu-trigger {
    position: relative;
    color: #20b2aa;
    text-shadow: 0 0 2px rgba(32, 178, 170, 0.8), 0 0 4px rgba(32, 178, 170, 0.6);
    transition: text-shadow 0.3s ease;
}

.submenu-trigger:hover {
    color: #48d1cc;
    text-shadow: 0 0 3px rgba(72, 209, 204, 1), 0 0 6px rgba(72, 209, 204, 0.8);
}

.submenu-trigger::after {
    content: '✦';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: #ff6347;
    text-shadow: 0 0 5px rgba(255, 99, 71, 0.6);
}

.submenu-trigger.active::after {
    transform: translateY(-50%) rotate(45deg);
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
}

/* Specific styling for Tarot Spreads submenu diamond */
.nav-button:nth-child(1) .submenu-trigger::after {
    color: #20b2aa;
    text-shadow: 0 0 5px rgba(32, 178, 170, 0.6);
    right: 5px;
}

.nav-button:nth-child(1) .submenu-trigger.active::after {
    color: #00ced1;
    text-shadow: 0 0 8px rgba(0, 206, 209, 0.8);
}

/* Specific styling for Astrology submenu diamond */
.nav-button:nth-child(2) .submenu-trigger::after {
    color: #32cd32;
    text-shadow: 0 0 5px rgba(50, 205, 50, 0.6);
}

.nav-button:nth-child(2) .submenu-trigger.active::after {
    color: #32cd32;
    text-shadow: 0 0 8px rgba(50, 205, 50, 0.8);
}

/* Specific styling for Tools submenu diamond - PURPLE */
.nav-button:nth-child(3) .dropdown-item-with-submenu:first-child .submenu-trigger::after {
    color: #8A2BE2;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.6);
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:first-child .submenu-trigger.active::after {
    color: #9370DB;
    text-shadow: 0 0 8px rgba(147, 112, 219, 0.8);
}

/* Specific styling for Oracle Games submenu diamond - YELLOW */
.nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-trigger::after {
    color: #daa520;
    text-shadow: 0 0 5px rgba(218, 165, 32, 0.6);
}

.nav-button:nth-child(3) .dropdown-item-with-submenu:last-child .submenu-trigger.active::after {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.submenu-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 95vw;
    max-height: 90vh;
    background: 
        linear-gradient(90deg, rgba(32, 178, 170, 0.15) 0%, rgba(32, 178, 170, 0.1) 50%, rgba(32, 178, 170, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(32, 178, 170, 0.05) 2px, rgba(32, 178, 170, 0.05) 4px),
        radial-gradient(circle at 20% 20%, rgba(32, 178, 170, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(32, 178, 170, 0.12) 0%, transparent 50%),
        rgba(0, 0, 0, 0.98);
    border: 2px solid rgba(32, 178, 170, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3001;
    box-shadow: 
        0 0 25px rgba(32, 178, 170, 0.4),
        inset 0 0 25px rgba(32, 178, 170, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.submenu-content.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1) !important;
    pointer-events: auto;
    top: 50% !important;
    left: 50% !important;
}

/* Submenu links – text + emoji, no button box */
.submenu-content a {
    display: block;
    padding: 0.4rem 0.2rem;
    text-decoration: none;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #20b2aa;
    position: relative;
    z-index: 3002;
    text-align: center;
    border: none;
}

.submenu-content a:hover {
    background: transparent;
    filter: none;
    color: #00ff00;
}

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

/* Submenu Back Link - Simple and Small */
.submenu-back-link {
    margin-top: auto;
    padding: 0.3rem 0.6rem;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-family: 'VT323', monospace;
    font-size: 0.65rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.submenu-back-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Specific styling for Astrology submenu box - Centered Popup - Like Tarot Spreads */
.nav-button:nth-child(2) .submenu-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 550px;
    max-width: 95vw;
    max-height: 90vh;
    background: 
        linear-gradient(90deg, rgba(50, 205, 50, 0.15) 0%, rgba(50, 205, 50, 0.1) 50%, rgba(50, 205, 50, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(50, 205, 50, 0.05) 2px, rgba(50, 205, 50, 0.05) 4px),
        radial-gradient(circle at 20% 20%, rgba(50, 205, 50, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(50, 205, 50, 0.12) 0%, transparent 50%),
        rgba(0, 0, 0, 0.98);
    border: 2px solid rgba(50, 205, 50, 0.7);
    border-radius: 12px;
    padding: 3.5rem 2rem;
    margin: 0;
    box-shadow: 
        0 0 25px rgba(50, 205, 50, 0.4),
        inset 0 0 25px rgba(50, 205, 50, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.9);
    z-index: 3001;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(2) .submenu-content.show {
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

/* Specific styling for Astrology submenu links */
.nav-button:nth-child(2) .submenu-content a {
    color: #32cd32;
    text-shadow: 0 0 3px rgba(50, 205, 50, 0.6);
}

.nav-button:nth-child(2) .submenu-content a:hover {
    color: #00ff7f;
    text-shadow: 0 0 5px rgba(0, 255, 127, 0.8);
    background-color: rgba(50, 205, 50, 0.1);
}

/* Specific styling for Tarot Spreads submenu links */
.nav-button:nth-child(1) .submenu-content a {
    color: #ff6347;
    text-shadow: 0 0 3px rgba(255, 99, 71, 0.6);
}

.nav-button:nth-child(1) .submenu-content a:hover {
    color: #ff6347;
    text-shadow: 0 0 5px rgba(255, 99, 71, 0.8);
    background-color: rgba(255, 99, 71, 0.1);
}

/* Specific styling for Tarot Spreads submenu box - Centered Popup */
.nav-button:nth-child(1) .submenu-content {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    width: auto;
    min-width: 400px;
    max-width: 95vw;
    max-height: 90vh;
    background: 
        linear-gradient(90deg, rgba(255, 99, 71, 0.15) 0%, rgba(255, 99, 71, 0.1) 50%, rgba(255, 99, 71, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 99, 71, 0.05) 2px, rgba(255, 99, 71, 0.05) 4px),
        radial-gradient(circle at 20% 20%, rgba(255, 99, 71, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 99, 71, 0.12) 0%, transparent 50%),
        rgba(0, 0, 0, 0.98);
    border: 2px solid rgba(255, 99, 71, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
    box-shadow: 
        0 0 25px rgba(255, 99, 71, 0.4),
        inset 0 0 25px rgba(255, 99, 71, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.9);
    z-index: 3001;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-button:nth-child(1) .submenu-content.show {
    transform: translate(-50%, -50%) scale(1) !important;
    top: 50% !important;
    left: 50% !important;
}

/* Specific styling for Oracle Games submenu box */
.nav-button:nth-child(4) .submenu-content:last-child {
    background: 
        linear-gradient(90deg, rgba(218, 165, 32, 0.15) 0%, rgba(218, 165, 32, 0.1) 50%, rgba(218, 165, 32, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(218, 165, 32, 0.05) 2px, rgba(218, 165, 32, 0.05) 4px),
        radial-gradient(circle at 20% 20%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(218, 165, 32, 0.12) 0%, transparent 50%),
        rgba(0, 0, 0, 0.98);
    border: 2px solid rgba(218, 165, 32, 0.7);
    box-shadow: 
        0 0 25px rgba(218, 165, 32, 0.4),
        inset 0 0 25px rgba(218, 165, 32, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.9);
}

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

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