body {
    background-color: black;
    color: green;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    overflow: hidden; /* Prevent scrolling during animation */
}

#crt {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
    z-index: 1000;
    pointer-events: none;
}

.scanlines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1) 50%, transparent 50%);
    background-size: 100% 4px;
    z-index: 1;
}

#start-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: crtStartup 1s ease-out forwards, fadeOut 4s 3s ease-out forwards;
}

@keyframes crtStartup {
    0% { transform: scaleY(0); }
    20% { transform: scaleY(1); }
    100% { transform: scaleY(1); }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.crt {
    filter: contrast(1.2) brightness(1.1) saturate(1.3) sepia(0.1);
}

.text-glow {
    text-shadow: 0 0 5px green, 0 0 10px green, 0 0 20px green, 0 0 40px green;
    animation: textGlow 1.5s infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 5px green, 0 0 10px green, 0 0 20px green, 0 0 40px green;
    }
    to {
        text-shadow: 0 0 20px green, 0 0 40px green, 0 0 80px green, 0 0 120px green;
    }
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid green;
    animation: typing 2.5s steps(30, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0px; }
    to { width: 170px; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: green; }
}

#terminal-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

#ascii-art {
    text-align: center;
    margin-bottom: 10px;
}

#terminal-room-name {
    font-weight: bold;
    margin-bottom: 10px;
}

#terminal {
    background-color: black;
    color: #00FF00;
    border: 2px solid #00FF00;
    padding: 20px;
    width: 600px;
    max-width: 80%;
}

#terminal-output {
    white-space: pre-wrap;
}

#terminal-input {
    display: flex;
    align-items: center;
}

#command-input {
    background-color: black;
    color: #00FF00;
    border: none;
    outline: none;
    font-family: monospace;
    font-size: 16px;
    flex: 1;
}

#chat-container {
    width: 80%;
    max-width: 800px;
    border: 2px solid #00FF00;
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 80%;
    overflow: hidden;
}

#chat-room-name {
    font-weight: bold;
    margin-bottom: 10px;
}

#messages {
    flex: 1;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.message-field {
    border: 2px solid #00FF00;
    padding: 5px;
    margin-bottom: 10px;
    background-color: black;
    color: #00FF00;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.message-content {
    flex: 1;
    min-height: 30px;
    overflow: hidden;
}

.message-input {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border: none;
    background-color: transparent;
    color: #00FF00;
    font-family: monospace;
    font-size: 16px;
    opacity: 0;
}

#user-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#username-input {
    padding: 5px;
    border: 2px solid #00FF00;
    background-color: black;
    color: #00FF00;
    font-family: monospace;
    font-size: 16px;
    margin-bottom: 10px;
}

button {
    padding: 5px 10px;
    border: 2px solid #00FF00;
    background-color: black;
    color: #00FF00;
    font-family: monospace;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #00FF00;
    color: black;
}

