.code-runner {
    position: relative;
    margin: 10px 0;
}

.run-button {
    display: block;
    margin: 8px 0;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
    min-width: 120px;
}

.run-button:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.run-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.run-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.code-output {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.code-output.error {
    background: #ffe6e6;
    border-color: #ffcccc;
    color: #d32f2f;
}

.code-output.loading {
    color: #666;
    font-style: italic;
}

.code-output.success {
    background: #f0f8f0;
    border-color: #c8e6c8;
}

/* 代码块样式优化 */
.code-runner pre {
    margin-bottom: 0;
}

/* 隐藏输出区域直到运行代码 */
.code-output.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .run-button {
        width: 100%;
        margin: 8px 0;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .code-output {
        font-size: 12px;
        max-height: 200px;
    }
}

/* 为代码块容器添加一些样式 */
.code-runner {
    border-radius: 8px;
    overflow: hidden;
}

/* 确保复制按钮不被影响 */
.code-runner .md-clipboard {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
}
