:root {
    --phosphor: #4ade80; /* Softer, minty CRT green */
    --phosphor-dim: rgba(74, 222, 128, 0.4);
    --bg-color: #081a10; /* Very dark green background */
    --crt-curve: 5px;
}

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

body, html {
    height: 100%;
    background-color: var(--bg-color);
    color: var(--phosphor);
    font-family: 'Share Tech Mono', monospace;
    overflow: hidden; /* Prevent scrolling outside terminal */
}

/* CRT Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.15) 50%,
        rgba(0,0,0,0.15)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9;
    animation: scan 10s linear infinite;
}

@keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 0 100vh; }
}

/* Terminal Layout */
.terminal {
    width: 95vw;
    height: 95vh;
    margin: 2.5vh auto;
    border: 2px solid var(--phosphor);
    border-radius: var(--crt-curve);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px var(--phosphor-dim), inset 0 0 20px var(--phosphor-dim);
    position: relative;
    z-index: 1;
    background-color: var(--bg-color);
    text-shadow: 0 0 5px var(--phosphor);
}

/* Header */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.header-info {
    display: flex;
    flex-direction: column;
    font-size: 1.2rem;
}

.logo-container {
    height: 120px;
}

.studio-logo {
    height: 100%;
    /* Moving logo above the CRT overlay so the dark vignette does not darken the vibrant colors */
    position: relative;
    z-index: 20; 
}

/* Greebling */
.greeble {
    color: var(--phosphor-dim);
    font-size: 0.7em;
    margin-left: 15px;
}

.greeble-bar {
    display: flex;
    justify-content: space-between;
    border-top: 1px dashed var(--phosphor-dim);
    border-bottom: 1px dashed var(--phosphor-dim);
    padding: 5px 0;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--phosphor-dim);
}

.hex-data {
    font-size: 0.75rem;
    color: var(--phosphor-dim);
    margin-top: auto;
    margin-bottom: 20px;
    opacity: 0.7;
    border-left: 2px solid var(--phosphor-dim);
    padding-left: 10px;
}

.hex-data p {
    font-size: 0.75rem;
    margin: 2px 0;
}

.corner-crosshair {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

.corner-crosshair::before, .corner-crosshair::after {
    content: '';
    position: absolute;
    background-color: var(--phosphor);
}

.corner-crosshair::before {
    top: 50%; left: -5px; right: -5px; height: 1px;
}

.corner-crosshair::after {
    left: 50%; top: -5px; bottom: -5px; width: 1px;
}

.top-left { top: 10px; left: 10px; border-top: 1px solid var(--phosphor); border-left: 1px solid var(--phosphor); }
.top-right { top: 10px; right: 10px; border-top: 1px solid var(--phosphor); border-right: 1px solid var(--phosphor); }
.bottom-left { bottom: 10px; left: 10px; border-bottom: 1px solid var(--phosphor); border-left: 1px solid var(--phosphor); }
.bottom-right { bottom: 10px; right: 10px; border-bottom: 1px solid var(--phosphor); border-right: 1px solid var(--phosphor); }

/* Body */
.terminal-body {
    display: flex;
    flex: 1;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 250px;
    border-right: 1px solid var(--phosphor-dim);
    padding-right: 20px;
    display: flex;
    flex-direction: column;
}

.nav-links {
    list-style: none;
    flex: none;
    margin-bottom: 20px;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links a {
    color: var(--phosphor);
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
    padding: 5px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--phosphor-dim);
    border-left: 2px solid var(--phosphor);
    color: #fff;
    text-shadow: none;
}

.status-panel {
    font-size: 0.9rem;
    border-top: 1px solid var(--phosphor-dim);
    padding-top: 10px;
    flex: none;
}

.blink {
    animation: blinker 1s linear infinite;
}

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

/* Content Area */
.content-area {
    flex: 1;
    position: relative;
    padding: 40px;
    overflow-y: auto;
    border: 1px solid var(--phosphor-dim);
}

.grid-background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(var(--phosphor-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--phosphor-dim) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    perspective: 1000px;
    transform: scale(1.1) rotateX(10deg);
}

#content-container {
    position: relative;
    z-index: 1;
}

/* Typography and Animations */
h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 15px solid var(--phosphor);
    animation: typing 2s steps(40, end), blink-caret .75s step-end infinite;
}

.delayed-text {
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

.delayed-text:nth-child(2) { animation-delay: 2.5s; }
.delayed-text:nth-child(3) { animation-delay: 3s; }
.delayed-text:nth-child(4) { animation-delay: 3.5s; }
.delayed-text:nth-child(5) { animation-delay: 4s; }

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--phosphor); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid var(--phosphor-dim);
}
::-webkit-scrollbar-thumb {
    background: var(--phosphor);
}
