* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

body {
    background: #0a0a0a;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.terminal {
    width: 100%;
    max-width: 800px;
    background: #000000;
    border: 1px solid #333333;
    overflow: hidden;
}

.terminal-header {
    background: #1a1a1a;
    padding: 12px 16px;
    border-bottom: 1px solid #333333;
    font-size: 13px;
    color: #cccccc;
    font-weight: 500;
}

.terminal-body {
    padding: 20px;
    line-height: 1.4;
    height: 400px;
    overflow-y: auto;
    background: #000000;
    color: #ffffff;
    font-size: 14px;
}

/* 文本样式 */
.log-line {
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.prompt {
    color: #00ff00;
}

.error {
    color: #ff6b6b;
}

.warn {
    color: #ffd93d;
}

.info {
    color: #4ecdc4;
}

.input {
    color: #2bff00;
    font-weight: 500;
}

/* 菜单系统 */
.menu-container {
    margin-top: 15px;
    margin-left: 0;
}

.menu-item {
    padding: 6px 12px;
    cursor: pointer;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.menu-item.selected {
    background: #2a2a2a;
    border: 1px solid #555555;
}

.menu-item:hover {
    background: #1a1a1a;
}

.menu-item::before {
    content: ">";
    color: #00ff00;
    margin-right: 8px;
    font-weight: bold;
}

.menu-item.selected::before {
    content: ">";
    color: #ffffff;
    animation: pulse 1s infinite;
}

/* 对话样式 */
.dialogue {
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.dialogue-tag.character {
    color: #ffc0cb;
    font-weight: 600;
}

.dialogue-tag.demiuge_0 {
    color: #ffffff;
    font-weight: 600;
}

.dialogue-tag.demiuge_1 {
    color: #fffcfc;
    font-weight: 600;
}

.dialogue-content {
    color: #ffffff;
}

/* 旋转光标 - 类似 npm 安装时的样式 */
.loading-cursor {
    display: inline-block;
    width: 12px;
    height: 16px;
    background: #00ff00;
    margin-left: 4px;
    animation: rotateRect 1.2s infinite ease-in-out;
    vertical-align: middle;
}

/* 菜单旋转指示器 */
.menu-spinner {
    display: inline-block;
    width: 12px;
    height: 16px;
    background: #00ff00;
    margin-left: 8px;
    animation: rotateRect 1.2s infinite ease-in-out;
    vertical-align: middle;
}

/* 关键帧动画 */
@keyframes rotateRect {
    0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: perspective(120px) rotateX(180deg) rotateY(0deg);
    }
    50% {
        transform: perspective(120px) rotateX(180deg) rotateY(180deg);
    }
    75% {
        transform: perspective(120px) rotateX(0deg) rotateY(180deg);
    }
    100% {
        transform: perspective(120px) rotateX(0deg) rotateY(360deg);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 滚动条 */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 0;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* 音量控制 */
.volume-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #333333;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.volume-btn:hover {
    background: #2a2a2a;
    border-color: #555555;
}

.volume-btn.muted {
    opacity: 0.5;
}