body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #ffffff;
}

body {
    position: relative;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

#canvas-container {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-shell {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 32px), 980px);
    pointer-events: none;
    z-index: 3;
}

.neural-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 18px 20px;
    padding: 0;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(10px);
    transition:
        opacity 1.1s ease,
        transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 1.1s ease;
}

.neural-nav.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.neural-button {
    --line: rgba(12, 12, 12, 0.42);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 0 24px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 20px;
    color: #111111;
    text-decoration: none;
    letter-spacing: 0.16em;
    font-size: 0.94rem;
    text-indent: 0.16em;
    background:
        radial-gradient(circle at 18% 24%, rgba(0, 0, 0, 0.06), transparent 26%),
        radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.04), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 242, 242, 0.84));
    box-shadow:
        inset 0 0 24px rgba(0, 0, 0, 0.04),
        0 12px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    isolation: isolate;
    backdrop-filter: blur(10px);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        color 0.35s ease;
}

.neural-button::before,
.neural-button::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.neural-button::before {
    background:
        linear-gradient(117deg, transparent 15%, var(--line) 16%, transparent 17%) 16% 18% / 34% 2px no-repeat,
        linear-gradient(26deg, transparent 15%, var(--line) 16%, transparent 17%) 66% 26% / 28% 2px no-repeat,
        linear-gradient(-29deg, transparent 15%, var(--line) 16%, transparent 17%) 58% 70% / 34% 2px no-repeat,
        linear-gradient(24deg, transparent 15%, var(--line) 16%, transparent 17%) 18% 72% / 34% 2px no-repeat;
    opacity: 0.9;
}

.neural-button::after {
    inset: 9px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background:
        linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)) 0 50% / 100% 1px no-repeat,
        linear-gradient(90deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)) 50% 0 / 1px 100% no-repeat,
        radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.05) 100%);
}

.neural-button:hover,
.neural-button:focus-visible {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(0, 0, 0, 0.34);
    color: #000000;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.05),
        0 16px 32px rgba(0, 0, 0, 0.12);
    outline: none;
}

.neural-button:active {
    transform: translateY(-2px) scale(0.99);
}

.ticker-shell {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 248, 248, 0.86));
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

.ticker-track {
    display: flex;
    width: max-content;
    min-width: 100%;
    animation: ticker-scroll 44s linear infinite;
}

.ticker-track span {
    flex: 0 0 auto;
    padding: 11px 24px;
    color: #111111;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 720px) {
    .nav-shell {
        top: 16px;
        width: min(calc(100% - 24px), 300px);
    }

    .neural-nav {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0;
        justify-items: center;
    }

    .neural-button {
        min-height: 60px;
        width: 100%;
        max-width: 132px;
        padding: 0 10px;
        letter-spacing: 0.08em;
        font-size: 0.84rem;
        text-indent: 0.08em;
    }

    .neural-button:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
        max-width: 132px;
    }

    .ticker-track span {
        padding: 10px 18px;
        font-size: 0.72rem;
        letter-spacing: 0.02em;
    }
}
