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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #050505;
    color: #0F0;
    min-height: 100vh;
    width: 100%;
}

/* Background */
.background {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: #050505;
}

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

/* Home Button */
.home-button {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0.35rem;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

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

.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-radius: 4px;
    color: #00FFFF;
    font-family: 'VT323', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

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

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

/* Oracle Links (upper left on desktop, bottom left on mobile) */
.oracle-links {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oracle-link {
    display: block;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    font-family: 'VT323', monospace;
    font-size: 0.85rem;
    text-decoration: none;
    color: #1e90ff;
    text-align: center;
    transition: all 0.3s ease;
}

.oracle-link:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.7);
    color: #00BFFF;
}

/* Title */
.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2rem;
    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;
}

.title-gif {
    position: absolute;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: 240px;
    height: auto;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* Nav */
.nav-container {
    width: 100%;
}

.nav-buttons {
    position: absolute;
    top: 14rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 1rem;
    z-index: 20;
}

.nav-button {
    position: relative;
    width: 220px;
    height: 50px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-button span {
    pointer-events: none;
}

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

/* Dropdown base */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 0.7rem;
    padding: 0.7rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2000;
}

.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.7);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    text-align: center;
}

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

/* Centered popup style shared by all buttons (desktop) */
.nav-button .dropdown-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: auto;
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-button.active .dropdown-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Color theming per button */
.nav-button:nth-child(1) span { color: #FF1493; }
.nav-button:nth-child(2) span { color: #1e90ff; }
.nav-button:nth-child(3) span { color: #FFD700; }
.nav-button:nth-child(4) span { color: #20B2AA; }

.nav-button:nth-child(1) .dropdown-content a { color: #FF1493; }
.nav-button:nth-child(2) .dropdown-content a { color: #1e90ff; }
.nav-button:nth-child(3) .dropdown-content a { color: #FFD700; }
.nav-button:nth-child(4) .dropdown-content a { color: #20B2AA; }

/* Backdrop for any active popup */
.nav-button.active::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 19;
}

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

.crystal-ball {
    width: 100px;
    height: 100px;
    image-rendering: pixelated;
    border-radius: 50%;
}

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

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

.contact-email {
    font-family: 'VT323', monospace;
    font-size: 0.75rem;
    color: rgba(0, 255, 255, 0.7);
    text-decoration: none;
}

.copy-email-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 481px) {
    .home-crystal {
        width: 32px;
        height: 32px;
    }

    .title {
        font-size: 1.8rem;
    }

    .nav-button .dropdown-content {
        min-width: 320px;
    }
}

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

    .oracle-link {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        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;
    }

    .title {
        font-size: 1.4rem;
        top: 2.5rem;
    }

    .title-gif {
        top: 2.8rem;
        max-width: 180px;
    }

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

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

    /* Mobile: all dropdowns use same centered popup size */
    .nav-button .dropdown-content {
        min-width: 260px;
        max-width: 90vw;
        max-height: 70vh;
        padding: 0.8rem;
    }

    .nav-button .dropdown-content a {
        font-size: 1rem;
        padding: 0.6rem;
    }
}



