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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-user-drag: none;
}

*::selection {
    background: transparent;
}

*::-moz-selection {
    background: transparent;
}

body {
    font-family: 'Courier New', monospace;
    background: #0c0c0c url('../img/background.png') no-repeat center center fixed;
    background-size: cover;
    color: #00ff00;
    overflow: hidden;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-user-drag: none;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.terminal-window {
    width: 100vw;
    height: 100vh;
    background: rgba(12, 12, 12, 0.85);
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-area {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-area::-webkit-scrollbar {
    display: none;
}

.message {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    animation: pixelFadeIn 0.3s ease-in-out;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

.message * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

@keyframes pixelFadeIn {
    0% { opacity: 0; transform: translateY(2px); }
    100% { opacity: 1; transform: translateY(0); }
}

.system-msg {
    color: #808080;
}

.user-msg {
    color: #00ffff;
    word-break: break-word;
}

.user-msg::before {
    content: "amb-cn.com/dos/dos.html> ";
    color: #00ff00;
}

.assistant-msg {
    color: #ffff00;
    word-break: break-word;
}

.assistant-msg h1, .assistant-msg h2, .assistant-msg h3, 
.assistant-msg h4, .assistant-msg h5, .assistant-msg h6 {
    color: #ffffff;
    margin: 8px 0 4px 0;
}

.assistant-msg p {
    margin: 4px 0;
    line-height: 1.6;
}

.assistant-msg code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    color: #00ffff;
}

.assistant-msg pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
    border-left: 3px solid #00ff00;
}

.assistant-msg pre code {
    background: transparent;
    padding: 0;
    color: #00ffff;
}

.assistant-msg ul, .assistant-msg ol {
    margin: 4px 0 4px 20px;
}

.assistant-msg li {
    margin: 2px 0;
}

.assistant-msg blockquote {
    border-left: 3px solid #ffff00;
    padding-left: 10px;
    margin: 8px 0;
    color: #cccccc;
}

.assistant-msg a {
    color: #00ffff;
    text-decoration: underline;
}

.assistant-msg strong {
    color: #ffffff;
    font-weight: bold;
}

.assistant-msg em {
    color: #cccccc;
    font-style: italic;
}

.input-line {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    position: relative;
}

.prompt {
    color: #00ff00;
    margin-right: 0;
    font-weight: bold;
}

.input-field {
    background: transparent;
    border: none;
    color: #00ffff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    flex: 1;
    margin-left: 0;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #00ff00;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.command-suggestions {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: rgba(12, 12, 12, 0.95);
    border: 1px solid #333;
    border-radius: 4px;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.command-suggestion {
    padding: 8px 12px;
    color: #00ffff;
    cursor: pointer;
    border-bottom: 1px solid #333;
    font-size: 14px;
}

.command-suggestion:last-child {
    border-bottom: none;
}

.command-suggestion:hover,
.command-suggestion.selected {
    background: rgba(0, 255, 255, 0.1);
    color: #ffffff;
}

.command-suggestion .command {
    color: #00ff00;
    font-weight: bold;
}

.command-suggestion .description {
    color: #808080;
    font-size: 12px;
    margin-left: 8px;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, transparent 20%, rgba(255,255,255,0.01) 21%, rgba(255,255,255,0.01) 34%, transparent 35%, transparent),
        linear-gradient(0deg, rgba(255,255,255,0.01), rgba(255,255,255,0.01));
    pointer-events: none;
    opacity: 0.5;
}

.security-msg {
    color: #ff0000;
}

.warning-msg {
    color: #ffff00;
}

.clickable-link {
    color: #00ffff;
    text-decoration: underline;
    cursor: pointer;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.clickable-link:hover {
    color: #ffffff;
    background-color: #003366;
}

.typing-indicator {
    color: #808080;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.error-msg {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #ff0000;
}

/* 签到相关样式 */
.signin-success {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #00ff00;
}

.signin-warning {
    color: #ffff00;
    background: rgba(255, 255, 0, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #ffff00;
}

/* 状态指示器样式 */
.status-online {
    color: #00ff00 !important;
}

.status-offline {
    color: #ff0000 !important;
}

.user-info {
    color: #00ffff;
}

.message.status-online::before {
    content: "● ";
    color: #00ff00;
}

.message.status-offline::before {
    content: "● ";
    color: #ff0000;
}

/* 签到消息特殊标记 */
.message[class*="signin"]::before {
    content: "🎯 ";
    color: inherit;
}