/* Investigation Board Styles */
#investigation-board {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    /* Deep Tech Background */
    background: radial-gradient(circle at 50% 50%, #1a1a1d 0%, #050507 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animated Grid Overlay */
#investigation-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    animation: grid-move 100s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes grid-move {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-50px, -50px);
    }
}

#connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px rgba(212, 163, 115, 0.5));
}

.node {
    position: absolute;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 1.8rem;
    border-radius: 4px;
    /* Tech sharp corners */
    z-index: 2;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

/* Tech Corners for Nodes */
.node::after,
.node::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    transition: all 0.3s;
}

.node::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--accent-almond);
    border-left: 1px solid var(--accent-almond);
}

.node::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--accent-almond);
    border-right: 1px solid var(--accent-almond);
}

.node.center {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    padding: 2rem 4rem;
    color: white;
    background: radial-gradient(circle, rgba(20, 20, 25, 0.95), rgba(0, 0, 0, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 60px rgba(212, 163, 115, 0.15);
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: center-pulse 4s infinite ease-in-out;
}

@keyframes center-pulse {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(212, 163, 115, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 100px rgba(212, 163, 115, 0.3);
        border-color: var(--accent-almond);
    }
}

.node:hover {
    background: rgba(212, 163, 115, 0.1);
    border-color: var(--accent-almond);
    box-shadow: 0 0 25px rgba(212, 163, 115, 0.3);
    text-shadow: 0 0 8px rgba(212, 163, 115, 0.8);
    transform: scale(1.05);
    z-index: 10;
}

/* Contrast Text for Center Node */
.word-suns {
    color: #FFD700;
    /* Gold/Yellow */
    margin-right: 10px;
}

.word-lab {
    color: #fff;
    /* White */
}

/* Colorful Nodes */
.node:nth-child(2) {
    top: 18%;
    left: 18%;
    background: #FF6B6B;
    /* Red/Pink */
    border-color: #FF6B6B;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

.node:nth-child(3) {
    top: 18%;
    right: 18%;
    background: #4ECDC4;
    /* Teal/Cyan */
    border-color: #4ECDC4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

.node:nth-child(4) {
    bottom: 35%;
    left: 12%;
    background: #FFE66D;
    /* Yellow */
    border-color: #FFE66D;
    color: #1a1a1d;
    /* Dark text for yellow bg */
    box-shadow: 0 0 20px rgba(255, 230, 109, 0.4);
}

.node:nth-child(5) {
    bottom: 35%;
    right: 12%;
    background: #1A535C;
    /* Deep Blue/Green */
    border-color: #1A535C;
    box-shadow: 0 0 20px rgba(26, 83, 92, 0.4);
}

.node:nth-child(6) {
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    background: #9B5DE5;
    /* Purple */
    border-color: #9B5DE5;
    box-shadow: 0 0 20px rgba(155, 93, 229, 0.4);
}

/* Bottom Elements Layout */
.bottom-ui-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    /* Space between scroll and tagline */
}

.tagline {
    /* Reset absolute positioning since it's now in flex container */
    position: static;
    transform: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
    order: 2;
    /* Tagline at bottom */
}

.scroll-indicator-board {
    /* Custom scroll indicator for board */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
    order: 1;
    /* Scroll above tagline */
    animation: fade-bounce 2s infinite;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-almond);
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-almond), transparent);
}

@keyframes fade-bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(5px);
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .node {
        font-size: 0.7rem;
        padding: 0.6rem 1rem;
    }

    .node.center {
        font-size: 2rem;
        padding: 1.5rem 2.5rem;
    }

    .node:nth-child(2) {
        top: 15%;
        left: 5%;
    }

    .node:nth-child(3) {
        top: 15%;
        right: 5%;
    }

    .node:nth-child(4) {
        bottom: 30%;
        left: 5%;
    }

    .node:nth-child(5) {
        bottom: 30%;
        right: 5%;
    }

    .tagline {
        font-size: 0.7rem;
        padding: 0 1rem;
    }

    /* Mobile Header Redesign */
    .navbar {
        background: rgba(10, 10, 12, 0.65);
        /* Mirror/Glass background on mobile */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    /* Mobile Hero Layout - Linear Stack */
    #investigation-board {
        flex-direction: column;
        justify-content: flex-start;
        padding: 8rem 1.5rem 4rem;
        /* Top padding for navbar */
        height: auto;
        min-height: 100vh;
        gap: 2rem;
        background: var(--bg-primary);
        /* Simpler background */
    }

    #connections {
        display: block;
        /* Show connections */
        height: 100%;
        width: 100%;
        z-index: 0;
    }

    .node {
        position: relative;
        /* Reset from absolute */
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        /* Will be overridden by animation */

        /* Smaller "Pill" Aesthetic */
        width: auto;
        display: inline-block;
        align-self: center;
        /* Center in flex container */
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        /* Smaller font */
        margin: 0;

        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        /* Pill shape */

        /* Floating Animation */
        animation: mobile-float 4s ease-in-out infinite;
    }

    /* Stagger Animations */
    .node:nth-child(2) {
        animation-delay: 0.2s;
    }

    .node:nth-child(3) {
        animation-delay: 0.4s;
    }

    .node:nth-child(4) {
        animation-delay: 0.6s;
    }

    .node:nth-child(5) {
        animation-delay: 0.8s;
    }

    @keyframes mobile-float {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-10px);
        }
    }

    .node.center {
        order: -1;
        /* Keep at top */
        margin-bottom: 2rem;

        /* Smaller Center Node */
        font-size: 1.5rem;
        padding: 1rem 2rem;
        width: auto;
        border-radius: 8px;
        /* Slight difference for main node */

        background: radial-gradient(circle, rgba(20, 20, 25, 1), rgba(0, 0, 0, 1));
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        animation: mobile-pulse-float 5s ease-in-out infinite;
    }

    @keyframes mobile-pulse-float {

        0%,
        100% {
            transform: translateY(0) scale(1);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }

        50% {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 15px 40px rgba(212, 163, 115, 0.2);
        }
    }

    .node:hover {
        animation-play-state: paused;
        border-color: var(--accent-almond);
    }

    .bottom-ui-container {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 3rem;
        padding-bottom: 4rem;
    }

    .tagline {
        font-size: 0.8rem;
        line-height: 1.6;
        padding: 0 1rem;
        opacity: 0.6;
    }
}