:root {
    --bg-color: #000000;
    --text-color: #e0e0e0;
    --accent-color: #ffffff;
    --dim-color: #444444;
    --font-main: 'Space Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair;
    /* Global crosshair cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    /* Prevent native scrolling */
    font-size: 14px;
    line-height: 1.5;
    height: 100vh;
    width: 100vw;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Canvas Background */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through to content if needed, but we might want to capture scroll */
}

/* HUD Layer */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    /* Allow clicking through empty spaces */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-header,
.hud-footer,
.hud-nav {
    pointer-events: auto;
    /* Re-enable pointer events for UI elements */
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--dim-color);
    padding-bottom: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.status {
    font-size: 0.8rem;
    color: var(--dim-color);
}

.hud-nav {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
}

.hud-nav ul {
    list-style: none;
    text-align: right;
}

.hud-nav li {
    margin-bottom: 1rem;
    color: var(--dim-color);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.hud-nav li:hover,
.hud-nav li.active {
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.hud-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid var(--dim-color);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--dim-color);
}

/* Content Layer */
.content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-block {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    text-align: center;
    max-width: 600px;
    pointer-events: none;
    /* Default to none, enable when active */
}

.content-block.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Typography & Elements */
h1.glitch {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--accent-color);
    position: relative;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--dim-color);
    margin-bottom: 3rem;
}

.scroll-indicator {
    font-size: 0.8rem;
    animation: bounce 2s infinite;
    color: var(--dim-color);
}

@keyframes bounce {

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

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

    60% {
        transform: translateY(-5px);
    }
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    border-bottom: 1px solid var(--dim-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.grid-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
}

.item h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.item p {
    color: var(--dim-color);
}

/* Form Styling */
.terminal-form {
    text-align: left;
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border: 1px solid var(--dim-color);
}

.input-line {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--dim-color);
}

.prompt {
    color: var(--dim-color);
    margin-right: 1rem;
    user-select: none;
}

.input-line input {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-family: var(--font-main);
    width: 100%;
    padding: 0.5rem 0;
    outline: none;
}

.glitch-btn {
    margin-top: 1rem;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.8rem 2rem;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.glitch-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Glitch Animation Keyframes (Reused) */
@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 15px, 0);
    }

    20% {
        clip: rect(50px, 9999px, 60px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    60% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    80% {
        clip: rect(70px, 9999px, 40px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 20px, 0);
    }
}

.glitch:hover::before {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    text-shadow: -1px 0 red;
    top: 0;
    color: white;
    background: black;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch:hover::after {
    content: attr(data-text);
    position: absolute;
    left: -2px;
    text-shadow: -1px 0 blue;
    top: 0;
    color: white;
    background: black;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hud-nav {
        top: auto;
        bottom: 5rem;
        right: 50%;
        transform: translateX(50%);
        width: 100%;
        text-align: center;
    }

    .hud-nav ul {
        display: flex;
        justify-content: center;
        gap: 1rem;
        text-align: center;
    }

    .hud-nav li {
        font-size: 0.8rem;
    }

    h1.glitch {
        font-size: 2.5rem;
    }
}