/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

/* 图片和信息并排显示 */
.image-and-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

#image-preview-container {
    flex: 1;
    min-width: 300px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

#food-info-container {
    flex: 1;
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 食物信息卡片样式 */
.food-item {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 3px solid;
}

.food-item.high {
    border-left-color: red;
    background-color: #ffebee;
}

.food-item.medium {
    border-left-color: yellow;
    background-color: #fffde7;
}

.food-item.low {
    border-left-color: green;
    background-color: #e8f5e9;
}

.food-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.food-purine {
    font-style: italic;
    margin-bottom: 5px;
}

.food-desc {
    font-size: 0.9em;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.upload-container,
.result-container,
.error-container,
.coze-result-container {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

input[type='file'], button {
    padding: 8px 15px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button {
    background-color: #3498db;
    color: white;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
}

#image-preview-container {
    position: relative;
    margin: 15px 0;
    max-width: 100%;
    overflow: hidden;
}

#image-preview {
    max-width: 100%;
}

#image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

#image-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

#error-message {
    color: #e74c3c;
    padding: 10px;
    background-color: #fadbd8;
    border-radius: 4px;
}

pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 300px;
}