/* MetaOS Web Terminal —— 样式复用主页 https://metaos.org.cn/ 的深色终端绿字风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    padding: 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.terminal-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}
.terminal-header h1 {
    font-size: 3.5rem;
    text-shadow: 0 0 8px #00ff40;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: #4afc4a;
}
.company-name {
    font-size: 1.8rem;
    color: #66ff66;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px #00ff40;
}
.terminal-header p { color: #66ff66; font-size: 1.1rem; }
/* 顶部英文致谢：提供方署名 */
.terminal-header .credit {
    color: #8be9fd;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-top: 0.6rem;
    text-shadow: 0 0 6px rgba(139, 233, 253, 0.35);
}
/* ORCID iD 绿色标识 */
.credit .orcid-link {
    display: inline-block;
    margin-left: 6px;
    line-height: 1;
    vertical-align: -0.15em;
    border-radius: 50%;
    transition: filter 0.2s ease, transform 0.2s ease;
}
.credit .orcid-icon { display: block; }
.credit .orcid-link:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 6px rgba(166, 206, 57, 0.95));
}

.terminal-container {
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #0d0d0d;
    box-shadow: 0 0 20px rgba(0, 100, 0, 0.2);
    overflow: hidden;
}

.terminal-bar {
    background-color: #222;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}
.terminal-buttons { display: flex; gap: 8px; }
.terminal-btn { width: 14px; height: 14px; border-radius: 50%; }
.close-btn { background-color: #ff5f56; }
.min-btn { background-color: #ffbd2e; }
.max-btn { background-color: #27c93f; }
.terminal-title { color: #999; font-size: 0.9rem; margin-left: 10px; }
.terminal-bar .spacer { flex: 1; }

.terminal-content { padding: 25px; min-height: 420px; }

/* 输出区（终端页） */
#output {
    font-size: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 6px;
}
#output .line { white-space: pre-wrap; word-break: break-word; }
#output .cmd-echo { margin-top: 14px; }
#output .stdout { color: #d7ffd7; white-space: pre-wrap; word-break: break-word; }
#output .stderr { color: #ff6b6b; white-space: pre-wrap; word-break: break-word; }
#output .meta-line { color: #7a7a7a; font-size: 0.85rem; margin-top: 4px; }
#output .hint { color: #888; }

.user { color: #4afc4a; font-weight: bold; }
.host { color: #ff79c6; }
.path { color: #8be9fd; }

/* 输入行 */
.input-line { display: flex; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.input-line .prompt { white-space: nowrap; }
#cmd-input {
    flex: 1;
    min-width: 200px;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    caret-color: #00ff00;
}
#cmd-input::placeholder { color: #3a5a3a; }
#cmd-input:disabled { color: #4a7a4a; }

.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background-color: #00ff00;
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: middle;
}
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

/* 登录页 */
.login-card { max-width: 480px; }
.login-body { padding: 30px 25px; }
.login-body .line-label { color: #8be9fd; margin-bottom: 6px; font-size: 0.95rem; }
.login-field { margin-bottom: 18px; }
.login-field input {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    padding: 10px 12px;
    border-radius: 3px;
    outline: none;
}
.login-field input:focus { border-color: #4afc4a; box-shadow: 0 0 8px rgba(74, 252, 74, 0.25); }
.btn {
    display: inline-block;
    background: rgba(74, 252, 74, 0.12);
    border: 1px solid #4afc4a;
    color: #4afc4a;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.25s;
}
.btn:hover { background: rgba(74, 252, 74, 0.25); text-shadow: 0 0 8px #00ff40; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: #555; color: #999; padding: 5px 12px; font-size: 0.85rem; }
.btn-ghost:hover { border-color: #999; color: #ccc; }
.login-msg { margin-top: 14px; color: #ff6b6b; min-height: 1.2em; font-size: 0.9rem; }
.login-msg.ok { color: #4afc4a; }

.terminal-footer {
    text-align: center;
    margin-top: 2rem;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.beian-container {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    background: rgba(13, 13, 13, 0.85);
    border-top: 1px solid #333;
    z-index: 1000;
    box-shadow: 0 -3px 10px rgba(0, 100, 0, 0.3);
}
.beian-link {
    color: #4afc4a;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    padding: 4px 10px;
    border-radius: 3px;
    display: inline-block;
}
.beian-link:hover { background: rgba(74, 252, 74, 0.15); text-shadow: 0 0 8px #00ff40; }

@media (max-width: 768px) {
    body { padding: 1rem; }
    .terminal-header h1 { font-size: 2.5rem; }
    .company-name { font-size: 1.5rem; }
    .terminal-content { padding: 15px; }
}
