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

body {
    font-family: 'VT323', monospace;
    background: #0a0a0a;
    color: #00ff00;
    font-size: 18px;
    overflow: hidden;
}

#game-container {
    display: flex;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-bottom: 2px solid #00ff00;
    padding: 10px 20px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header h1 {
    font-size: 28px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

#status-bar {
    display: flex;
    gap: 20px;
    align-items: center;
}

#status-bar span {
    color: #00ff00;
    font-size: 20px;
}

#connection-status {
    font-size: 12px;
}

#connection-status.connected {
    color: #00ff00;
}

#connection-status.disconnected {
    color: #ff0000;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 60px;
    padding: 20px;
}

#terminal-output {
    flex: 1;
    background: #0d0d0d;
    border: 2px solid #00ff00;
    padding: 20px;
    overflow-y: auto;
    font-size: 20px;
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: #00ff00 #0d0d0d;
}

#terminal-output::-webkit-scrollbar {
    width: 10px;
}

#terminal-output::-webkit-scrollbar-track {
    background: #0d0d0d;
}

#terminal-output::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 5px;
}

.ascii-art {
    color: #00ff00;
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
    text-shadow: 0 0 5px #00ff00;
}

.welcome-text {
    text-align: center;
    margin: 20px 0;
    color: #00ff00;
}

#output-messages {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message {
    margin-bottom: 10px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.system {
    color: #ffff00;
}

.message.error {
    color: #ff0000;
}

.message.combat {
    color: #ff6600;
}

.message.room {
    color: #00ffff;
}

.message.chat {
    color: #ffffff;
}

.message.whisper {
    color: #ff00ff;
}

.message.yell {
    color: #ffff00;
    font-weight: bold;
}

#input-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    background: #0d0d0d;
    border: 2px solid #00ff00;
    padding: 10px;
}

#prompt {
    color: #00ff00;
    margin-right: 10px;
    font-size: 22px;
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 22px;
    outline: none;
}

#command-input::placeholder {
    color: #006600;
}

#sidebar {
    width: 300px;
    background: #0d0d0d;
    border-left: 2px solid #00ff00;
    padding: 20px;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#sidebar h3 {
    color: #00ff00;
    margin-bottom: 15px;
    text-shadow: 0 0 5px #00ff00;
}

.action-btn, .compass-btn, .channel-btn {
    background: #1a1a1a;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px 12px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover, .compass-btn:hover, .channel-btn:hover {
    background: #00ff00;
    color: #0a0a0a;
    box-shadow: 0 0 10px #00ff00;
}

.action-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.compass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.compass-btn.center {
    background: #00ff00;
    color: #0a0a0a;
    cursor: default;
}

.vertical-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.vertical-nav .compass-btn {
    flex: 1;
}

#chat-channels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-btn.active {
    background: #00ff00;
    color: #0a0a0a;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #0d0d0d;
    border: 2px solid #00ff00;
    padding: 30px;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    color: #00ff00;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px #00ff00;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background: #1a1a1a;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 18px;
}

.modal-content input::placeholder {
    color: #006600;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.auth-buttons button {
    flex: 1;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-buttons button:hover {
    background: #00ff00;
    color: #0a0a0a;
}

.auth-alternatives {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

#create-character,
#guest-login {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #666;
    color: #666;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

#create-character {
    border-color: #00ff00;
    color: #00ff00;
    font-weight: bold;
}

#create-character:hover {
    background: #00ff00;
    color: #0a0a0a;
}

#guest-login:hover {
    border-color: #00ff00;
    color: #00ff00;
}

/* Modal Visibility Control */
.modal {
    display: none;
}

.modal.show {
    display: flex !important;
}

/* Connection Status Indicator */
#connection-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
}

#connection-status.connected {
    background-color: #00ff00;
    box-shadow: 0 0 5px #00ff00;
}

#connection-status.disconnected {
    background-color: #ff0000;
    box-shadow: 0 0 5px #ff0000;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #game-container {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        border-left: none;
        border-top: 2px solid #00ff00;
        margin-top: 0;
        padding: 10px;
        flex-direction: row;
        overflow-x: auto;
    }
    
    #sidebar > div {
        min-width: 200px;
    }
    
    #main-content {
        padding: 10px;
    }
}