/* json-message display styles - 错误和成功提示 */

.json-message {
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    animation: fadeIn 0.3s ease-in-out;
}

.error-message-container {
    border: 1px solid #e74c3c;
    background: linear-gradient(135deg, #ffeaea 0%, #fff5f5 100%);
    color: #e74c3c;
}

.success-message-container {
    border: 1px solid #27ae60;
    background: linear-gradient(135deg, #e8f8f5 0%, #f0fff9 100%);
    color: #27ae60;
}

.message-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.error-message-container .message-header {
    background-color: rgba(231, 76, 60, 0.1);
}

.success-message-container .message-header {
    background-color: rgba(39, 174, 96, 0.1);
}

.message-header i {
    margin-right: 8px;
    font-size: 16px;
}

.error-message-container .message-header i {
    color: #e74c3c;
}

.success-message-container .message-header i {
    color: #27ae60;
}

.message-header strong {
    flex: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

.error-message,
.success-message {
    padding: 16px;
    font-weight: 500;
    line-height: 1.5;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.error-tips {
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.error-tips ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.error-tips li {
    margin: 4px 0;
    font-size: 12px;
    color: #666;
}

.error-tips strong {
    color: #333;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out !important;
}

/* 震动效果 */
.shake {
    animation: shake 0.5s ease-in-out !important;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* 暗色模式适配 */
body.dark-mode .error-message-container {
    background: linear-gradient(135deg, #2c1b1b 0%, #1f1515 100%);
    border-color: #c0392b;
    color: #e74c3c;
}

body.dark-mode .success-message-container {
    background: linear-gradient(135deg, #1a2e2a 0%, #1a2a25 100%);
    border-color: #229954;
    color: #27ae60;
}

body.dark-mode .error-tips {
    background: rgba(0, 0, 0, 0.3);
    color: #ddd;
}

body.dark-mode .error-tips li {
    color: #bbb;
}

body.dark-mode .error-tips strong {
    color: #fff;
}