@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

:root {
    --aperture-orange: #FF9F00;
    --bg-black: #080808;
}

/* Base Setup */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    color: var(--aperture-orange);
    font-family: 'Fira Code', monospace;
    overflow: hidden; /* Prevent body scrollbars */
}

body {
    display: flex;
    justify-content: center;
}

/* CRT Overlays */
.scanlines, .vignette {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100;
}

.scanlines {
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
}

.vignette {
    background: radial-gradient(circle, transparent 50%, black 150%);
}

/* Layout Wrapper */
.terminal-wrapper {
    width: 95%;
    max-width: 800px;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    z-index: 10;
    text-shadow: 0 0 10px var(--aperture-orange);
    animation: flicker 0.2s infinite;
}

/* Fixed Elements */
.fixed-element {
    flex-shrink: 0;
    text-align: center;
}

/* Logo Scaling for Mobile */
.logo-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.logo {
    font-size: 1.2vw; /* Scales with screen width */
    line-height: 1.1;
    white-space: pre;
    text-align: left;
    display: inline-block;
    margin: 10px 0;
}

@media (min-width: 800px) {
    .logo { font-size: 8px; } /* Caps logo size on desktop */
}

/* Typography */
.domain-header {
    font-size: clamp(1.2rem, 5vw, 2rem); /* Fluid sizing */
    letter-spacing: 4px;
    border-top: 1px solid var(--aperture-orange);
    border-bottom: 1px solid var(--aperture-orange);
    padding: 8px;
    margin: 5px 0;
}

.status-line {
    font-size: 0.7rem;
    opacity: 0.8;
}

.online { color: #fff; font-weight: bold; }

/* The Typing Zone */
.console-area {
    flex-grow: 1;
    overflow-y: auto; /* Allows vertical scroll ONLY here if needed */
    margin: 15px 0;
    padding: 10px;
    font-size: clamp(0.8rem, 3.5vw, 1rem);
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.console-area::-webkit-scrollbar { display: none; } /* Hide scrollbar for Chrome/Safari */

#typed-text p {
    margin: 0 0 8px 0;
    line-height: 1.4;
    word-break: break-word; /* Prevents long text from pushing width */
}

.prompt { color: #fff; }

.cursor {
    animation: blink 1s infinite;
}

/* Footer & Buttons */
.links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* Wraps buttons on narrow screens */
    margin-bottom: 15px;
}

.btn {
    color: var(--aperture-orange);
    text-decoration: none;
    border: 1px solid var(--aperture-orange);
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--aperture-orange);
    color: var(--bg-black);
    box-shadow: 0 0 15px var(--aperture-orange);
}

.disclaimer {
    font-size: 0.6rem;
    opacity: 0.5;
    margin-bottom: 10px;
}

/* Animations */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes flicker {
    0% { opacity: 0.99; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}

/* Final Mobile Tweak */
@media (max-width: 450px) {
    .logo { font-size: 1.8vw; } /* Slightly bigger for tiny screens */
    .links { gap: 5px; }
    .btn { width: 100%; } /* Stacks buttons for better thumb targets */
}
