/* 机器人信息区域 */
.bot-info {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    margin: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #333333;
}

.bot-avatar-container {
    margin-right: 15px;
}

.bot-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.bot-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.bot-details {
    flex: 1;
}

.bot-details h2 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.bot-details p {
    font-size: 14px;
    color: #666;
}

/* 日志容器 */
.log-container {
    background-color: #2b2b2b;
    border-radius: 8px;
    margin: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    border: 1px solid #3f3f3f;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #3f3f3f;
    border-radius: 8px 8px 0 0;
}

.log-header h3 {
    font-size: 14px;
    color: #cccccc;
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    user-select: none;
}

.clear-btn {
    padding: 4px 12px;
    background-color: #3f3f3f;
    color: #cccccc;
    border: 1px solid #555555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background-color: #4f4f4f;
    border-color: #666666;
}

.log-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #1e1e1e;
    color: #d4d4d4;
    position: relative;
}

.log-buffer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

/* 日志条目样式 */
.log-entry {
    margin-bottom: 8px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.log-entry.warning {
    color: #ffd700;
}

.log-entry.error {
    color: #ff6b6b;
}

/* ANSI 颜色样式 */
.ansi-black-fg { color: #000000; }
.ansi-red-fg { color: #cd0000; }
.ansi-green-fg { color: #00cd00; }
.ansi-yellow-fg { color: #cdcd00; }
.ansi-blue-fg { color: #0000ee; }
.ansi-magenta-fg { color: #cd00cd; }
.ansi-cyan-fg { color: #00cdcd; }
.ansi-white-fg { color: #e5e5e5; }

.ansi-bright-black-fg { color: #7f7f7f; }
.ansi-bright-red-fg { color: #ff0000; }
.ansi-bright-green-fg { color: #00ff00; }
.ansi-bright-yellow-fg { color: #ffff00; }
.ansi-bright-blue-fg { color: #5c5cff; }
.ansi-bright-magenta-fg { color: #ff00ff; }
.ansi-bright-cyan-fg { color: #00ffff; }
.ansi-bright-white-fg { color: #ffffff; }

.ansi-bold { font-weight: bold; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }

/* 警告消息样式 */
.warning-message {
    display: none;
}

/* 滚动条样式 */
.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: #2b2b2b;
}

.log-content::-webkit-scrollbar-thumb {
    background: #3f3f3f;
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bot-info {
        margin: 10px;
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }

    .bot-avatar-container {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .bot-details h2 {
        font-size: 16px;
    }

    .bot-details p {
        font-size: 13px;
    }

    .log-container {
        margin: 10px;
        height: calc(100vh - 260px);
    }

    .log-header {
        padding: 10px 15px;
    }

    .log-content {
        padding: 10px 15px;
        font-size: 13px;
    }

    .warning-message {
        margin: 10px;
        font-size: 13px;
        padding: 10px;
    }
    
    .warning-icon {
        width: 16px;
        height: 16px;
    }

    .clear-btn {
        padding: 3px 10px;
        font-size: 11px;
    }
}

/* 连接状态指示器 */
.connection-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.connection-status.connected {
    background-color: #d4edda;
    color: #155724;
}

.connection-status.disconnected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.connected .status-indicator {
    background-color: #28a745;
}

.disconnected .status-indicator {
    background-color: #dc3545;
}

/* 移除fadeIn动画 */
.log-entry {
    animation: none;
}

/* 系统信息样式 */
.system-info {
    margin: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.info-item {
    flex: 1;
    min-width: 200px;  /* 确保卡片最小宽度 */
    max-width: calc(33.333% - 14px);  /* 确保一行最多3个卡片，减去间距 */
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.info-content {
    width: 100%;
    overflow: hidden;
    padding-bottom: 8px;
}

.info-label {
    font-size: 14px;
    color: #666666;
    margin-bottom: 8px;
}

.info-value {
    font-size: 16px;
    color: #333333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .info-item {
        max-width: calc(50% - 10px);  /* 在中等屏幕上一行显示2个 */
    }
}

@media (max-width: 768px) {
    .system-info {
        margin: 10px;
        gap: 10px;
    }
    
    .info-grid {
        gap: 10px;
    }
    
    .info-item {
        max-width: 100%;  /* 在小屏幕上堆叠显示 */
        min-width: 100%;
        padding: 12px;
    }
    
    .info-label {
        font-size: 12px;
    }
    
    .info-value {
        font-size: 14px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* 确保动画在移动端正常工作 */
@media (prefers-reduced-motion: reduce) {
    .info-item {
        transition: none;
    }
    
    .info-value {
        transition: none;
    }
    
    .update-flash {
        animation: none;
    }
}

/* 为不同类型的信息添加特殊样式 */
.info-item[data-type="memory"],
.info-item[data-type="disk"] {
    position: relative;
    overflow: hidden;
}

.info-item[data-type="memory"]::after,
.info-item[data-type="disk"]::after {
    display: none;
}

/* 添加进度条容器 */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* 进度条填充部分 */
.progress-fill {
    height: 100%;
    width: 0;  /* 初始宽度为0，将通过JavaScript动态设置 */
    background: linear-gradient(90deg, #1a73e8, #34a853);
    transition: width 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .progress-bar {
        height: 3px;
    }
    
    .info-content {
        padding-bottom: 6px;
    }
}

/* 为 CPU 使用率添加特殊样式 */
.info-item[data-type="cpu-usage"] {
    position: relative;
    overflow: hidden;
}

.info-item[data-type="cpu-usage"] .progress-fill {
    background: linear-gradient(90deg, #1a73e8, #34a853);  /* 可以使用不同的渐变色 */
}

/* 确保 CPU 使用率框与其他框保持一致的响应式布局 */
@media (max-width: 1200px) {
    .info-item[data-type="cpu-usage"] {
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .info-item[data-type="cpu-usage"] {
        max-width: 100%;
        min-width: 100%;
    }
}

.log-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.log-loading span {
    display: inline-block;
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "正在连接日志服务"; }
    40% { content: "正在连接日志服务."; }
    60% { content: "正在连接日志服务.."; }
    80%, 100% { content: "正在连接日志服务..."; }
} 