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

body {
    background-color: #000;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    text-transform: uppercase;
    min-height: 100vh;
    overflow-x: hidden;
}

.tui-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

.header a {
    cursor: pointer;
    padding: 5px 10px;
    text-decoration: none;
    color: #fff;
}

.header a:hover {
}

.content {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.menu {
    text-align: left;
    width: 500px;
    max-width: 100%;
    line-height: 1.3;
    min-height: 580px;
    padding-top: max(100px, calc((100vh - 500px) / 2 - 60px));
}

.menu h1 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: normal;
}

.menu .item {
    margin-bottom: 5px;
    padding: 2px 0;
    padding-left: 20px;
    position: relative;
    cursor: pointer;
}

.menu .item::before {
    content: '>';
    position: absolute;
    left: 0;
    transition: transform 0.2s ease;
}

.menu .item.open::before {
    transform: rotate(90deg);
}

.menu .item::after {
    content: '';
    position: absolute;
    left: 50%;
    right: 0;
    transform: translateX(-50%);
    width: 100vw;
    top: 0;
    bottom: 0;
    background-color: transparent;
    transition: background-color 0.1s;
    z-index: -1;
}

.menu .item:hover::after {
    background-color: rgba(255, 255, 255, 0.2);
}

.menu .details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
    padding-left: 20px;
}

.menu .details.open {
    max-height: 600px;
    opacity: 1;
}

.menu .details.open::after {
    content: '█';
    animation: cursorBlink 0.8s step-end infinite;
}

.menu .details.no-cursor::after {
    display: none;
}
@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes treeReveal {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes treeFade {
    0% { opacity: 0; }
    100% { opacity: 0.5; }
}

.menu .details .tree-line {
    opacity: 0;
    display: inline;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: #fff;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    padding: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    box-sizing: border-box;
    width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #fff;
}

.contact-form textarea {
    resize: none;
    min-height: 80px;
}

.contact-form button {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    padding: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.contact-form button:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Utility classes */
.opacity-7 { opacity: 0.7; }
.opacity-6 { opacity: 0.6; }
.opacity-5 { opacity: 0.5; }
.opacity-4 { opacity: 0.4; }
.opacity-8 { opacity: 0.8; }

.text-muted { opacity: 0.6; }

/* Call to action */
.cta-section {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 30px 20px;
}

.cta-button {
    padding: 10px 20px;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    transition: background-color 0.2s, border-color 0.2s;
}

.cta-button.primary {
    border: 1px solid #fff;
    color: #fff;
}

.cta-button.primary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cta-button.secondary {
    border: 1px solid #333;
    color: #fff;
}

.cta-button.secondary:hover {
    border-color: #fff;
}

.command {
    color: #888;
}

.copy-btn {
    border: none;
    color: #555;
    font-size: 11px;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 4px;
    background: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.copy-btn:focus {
    outline: none;
}

.copy-btn:hover {
    color: #555;
}

/* CRT Transition Overlay */
.crt-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: #000;
    opacity: 0;
}

/* Scan line that sweeps down */
.crt-overlay::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px 4px rgba(255, 255, 255, 0.08);
    top: -4px;
}

/* Page enter: overlay fades out + scan line sweeps down */
.crt-overlay.entering {
    animation: crtEnter 0.4s ease-out forwards;
}

@keyframes crtEnter {
    0% {
        opacity: 1;
    }
    5% {
        opacity: 0.6;
    }
    10% {
        opacity: 1;
    }
    30% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    70% {
        opacity: 0.85;
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.crt-overlay.entering::after {
    animation: scanSweep 0.4s ease-out forwards;
}

@keyframes scanSweep {
    0% {
        top: -4px;
    }
    100% {
        top: 100vh;
    }
}

/* Page exit: content flickers out */
.tui-container.exiting {
    animation: crtExit 0.3s ease-in forwards;
}

@keyframes crtExit {
    0% {
        opacity: 1;
        filter: brightness(1);
    }
    10% {
        opacity: 0.3;
        filter: brightness(2);
    }
    20% {
        opacity: 0.8;
        filter: brightness(0.5);
    }
    40% {
        opacity: 0.2;
        filter: brightness(1.5);
    }
    60% {
        opacity: 0.6;
        filter: brightness(0.3);
    }
    80% {
        opacity: 0.1;
        filter: brightness(2);
    }
    100% {
        opacity: 0;
        filter: brightness(0);
    }
}

/* Subtle scanline texture on the page (always on) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}


