* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background-color: #1e1e1e;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 10px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #2d2d2d;
    border-radius: 5px;
    margin-bottom: 10px;
}

h1 {
    color: #4e9a06;
    font-family: 'Courier New', monospace;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

button {
    padding: 5px 10px;
    background-color: #4e9a06;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

button:hover:not(:disabled) {
    background-color: #73d216;
}

button:disabled {
    background-color: #555753;
    cursor: not-allowed;
}

#status {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.status-connected {
    background-color: #4e9a06;
    color: white;
}

.status-disconnected {
    background-color: #cc0000;
    color: white;
}

.status-connecting {
    background-color: #c4a000;
    color: white;
}

.terminal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #000;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #555753;
}

#terminal {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #000;
    color: #d3d7cf;
}

.terminal-line {
    margin: 2px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    min-height: 1.2em;
}

.terminal-input {
    color: #8ae234;
    font-weight: bold;
}

.terminal-output {
    color: #d3d7cf;
}

.terminal-error {
    color: #ef2929;
}

.terminal-info {
    color: #729fcf;
}

.input-area {
    display: flex;
    padding: 10px;
    background-color: #2d2d2d;
    border-top: 1px solid #555753;
    gap: 10px;
}

#commandInput {
    flex: 1;
    padding: 8px;
    background-color: #000;
    color: #d3d7cf;
    border: 1px solid #555753;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

#commandInput:focus {
    outline: none;
    border-color: #4e9a06;
}

#sendBtn {
    padding: 8px 15px;
}

.session-info {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: #2d2d2d;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* 滚动条样式 */
#terminal::-webkit-scrollbar {
    width: 8px;
}

#terminal::-webkit-scrollbar-track {
    background: #2d2d2d;
}

#terminal::-webkit-scrollbar-thumb {
    background: #555753;
    border-radius: 4px;
}

#terminal::-webkit-scrollbar-thumb:hover {
    background: #888a85;
}

/* ANSI颜色样式 */
.ansi-reset {
    all: initial;
}

.ansi-bold {
    font-weight: bold !important;
}

.ansi-italic {
    font-style: italic !important;
}

.ansi-underline {
    text-decoration: underline !important;
}

/* 前景色 */
.ansi-black { color: #000000 !important; }
.ansi-red { color: #cc0000 !important; }
.ansi-green { color: #4e9a06 !important; }
.ansi-yellow { color: #c4a000 !important; }
.ansi-blue { color: #3465a4 !important; }
.ansi-magenta { color: #75507b !important; }
.ansi-cyan { color: #06989a !important; }
.ansi-white { color: #d3d7cf !important; }

.ansi-bright-black { color: #555753 !important; }
.ansi-bright-red { color: #ef2929 !important; }
.ansi-bright-green { color: #8ae234 !important; }
.ansi-bright-yellow { color: #fce94f !important; }
.ansi-bright-blue { color: #729fcf !important; }
.ansi-bright-magenta { color: #ad7fa8 !important; }
.ansi-bright-cyan { color: #34e2e2 !important; }
.ansi-bright-white { color: #eeeeec !important; }

/* 背景色 */
.ansi-bg-black { background-color: #000000 !important; }
.ansi-bg-red { background-color: #cc0000 !important; }
.ansi-bg-green { background-color: #4e9a06 !important; }
.ansi-bg-yellow { background-color: #c4a000 !important; }
.ansi-bg-blue { background-color: #3465a4 !important; }
.ansi-bg-magenta { background-color: #75507b !important; }
.ansi-bg-cyan { background-color: #06989a !important; }
.ansi-bg-white { background-color: #d3d7cf !important; }

.ansi-bg-bright-black { background-color: #555753 !important; }
.ansi-bg-bright-red { background-color: #ef2929 !important; }
.ansi-bg-bright-green { background-color: #8ae234 !important; }
.ansi-bg-bright-yellow { background-color: #fce94f !important; }
.ansi-bg-bright-blue { background-color: #729fcf !important; }
.ansi-bg-bright-magenta { background-color: #ad7fa8 !important; }
.ansi-bg-bright-cyan { background-color: #34e2e2 !important; }
.ansi-bg-bright-white { background-color: #eeeeec !important; }

/* 组合样式 */
.ansi-bold.ansi-red { color: #ff6b6b !important; }
.ansi-bold.ansi-green { color: #51cf66 !important; }
.ansi-bold.ansi-yellow { color: #ffd43b !important; }
.ansi-bold.ansi-blue { color: #339af0 !important; }