* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.image-recognition-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}
.image-recognition-card {
    background: white;
    border-radius: 10px;
    padding: 30px 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    display: none;
    flex-direction: row;
    align-items: flex-start;
}
.image-recognition-card {
    grid-column: 1 / span 2;
    margin-bottom: 0;
    padding-bottom: 20px;
}


.image-recognition-container {
    width: 100%;
}



.image-description {
    order: 2;
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    margin-right: 20px;
}



@media (max-width: 768px) {
    .image-recognition-card {
        flex-direction: column;
    }

    .result-image-container {
        order: 1;
        width: 100%;
        flex: none;
    }

    .image-description {
        order: 2;

    }

    .result-image {
        width: 100%;
    }

    .image-shadow {
        left: 10%;
        width: 80%;
    }
}



.result-image-container {
    position: relative;
    width: 100%;
    margin: 20px auto;
    display: flex;
    justify-content: center;

}

.result-image {
    width: 80%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-shadow {
    position: absolute;
    bottom: -8px;
    left: 10%;
    width: 30%;
    height: 15px;
    background: rgba(108, 117, 125, 0.2);
    border-radius: 50%;
    z-index: -1;
    filter: blur(4px);
}





body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-image: url("back.jpg");
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* overflow: hidden; */
    overflow-y: auto;
}

.header {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.result-header {
    padding: 0px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;

}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    padding: 40px;
}

.input-section {
    background: #f8f9fa transparent="0%";
    border-radius: 15px;
    padding: 30px;
    padding-bottom: 10px;
    /* margin-bottom: 30px; */
    border: 2px dashed #4a7c59;
}

.upload-area {
    border: 3px dashed #4a7c59;/*3像素宽的虚线边框*/
    border-radius: 10px;/*边框圆角为10像素，使外观更柔和*/
    padding-top: 25px;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 0px;
    text-align: center;
    background: white;
    margin-bottom: 20px;/*底部外边距20像素，与下方元素保持间距*/
    transition: all 0.3s ease;/*添加过渡效果，所有属性变化都会在0.3秒内平滑过渡。ease使过渡效果更自然*/
    cursor: pointer;/*鼠标悬停时显示手型光标，提示可点击*/
    position: relative;
    z-index: 1;/*堆叠顺序*/
    pointer-events: auto;/*确保元素可以响应鼠标事件*/
    min-height: 200px;
    display: flex;/*使用弹性布局*/
    flex-direction: column;/*垂直*/
    justify-content: center;/*垂直方向居中对齐*/
    align-items: center;/*水平方向居中对齐*/
}


.image-preview {
    margin-bottom: 30px;
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.uploaded-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    /* margin-top: 15px; */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    /* display: block; */
}



.upload-area:hover {
    border-color: #2d5a27;
    background: #f0f8f0;
}

.upload-area.dragover {
    border-color: #2d5a27;
    background: #e8f5e8;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #4a7c59;
    margin-bottom: 15px;
}

.coordinates-input {
    width: 100%;
    box-sizing: border-box;
}


.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: bold;
    color: #2d5a27;
    margin-bottom: 8px;
}

.input-group input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.generate-btn {
    background: linear-gradient(135deg, #4a7c59 0%, #2d5a27 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    
    display: block;
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 124, 89, 0.4);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results-section {
    display: none;
    background: #b5e3ce transparent="5%";
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

.results-grid {
    display: none;
    grid-template-columns: 1fr;
    gap: 0px;
    /* margin-bottom: 30px; */
}

.result-card {
    background: rgb(254, 255, 254);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

}

.result-card2 {
    background: rgb(254, 255, 254);
    border-radius: 10px;
    padding: 20px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

}

.bag1{
    display: none;
    padding-top: 40px;

}
.bag2{
    display: none;
    padding-top: 40px;


}



.result-card h3 {
    color: #2d5a27;
    margin-bottom: 25px;
    margin-top: 17px;
    font-size: 1.3rem;
    /* text-align: center; */
}

.result-card h4 {
    color: #1e4918;
    margin-bottom: 10px;
    font-size: 1.1rem;
}



.plan-content {
    line-height: 1.6;
    color: #333;
    padding: 15px;
    box-sizing: border-box;
}



.feedback-section {
    background: white transparent="70%";
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feedback-section h3 {
    color: #2d5a27;
    margin-bottom: 15px;
}

.feedback-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #ddd ;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.feedback-input:focus {
    outline: none;
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.improve-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.3);
}



.improve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 124, 89, 0.4);
}



.loading {
    display: none;
    text-align: center;
    padding: 40px;
    padding-bottom: 0px;
}

.local-loading {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.local-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.local-loading p {
    color: #28a745;
    font-size: 0.9rem;
    margin: 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a7c59;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



#imagePreview {
    margin-top: 20px;
    text-align: center;
}

.charts-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.charts-section h3 {
    color: #2d5a27;
    margin-bottom: 20px;
    text-align: center;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-item {
    width: 100%;
    height: 400px;
    min-height: 400px;
}

#radarChart, #pieChart, #lineChart {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {

    .coordinates-input,
    .results-grid,
    .charts-container {
        grid-template-columns: 1fr;
    }

    .image-recognition-card {
        grid-column: 1;
    }

    .header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .chart-item {
        margin-bottom: 20px;
        height: 250px;
        min-height: 250px;
    }

    #radarChart,
    #pieChart,
    #lineChart {
        height: 100% !important;
    }
}

@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr 1fr !important;
    }

    .chart-item:last-child {
        grid-column: 1 / -1;
    }
}
/* 表格markdown */
.cost-table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.5;
  }
  .cost-table th, .cost-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: top;
  }
  .cost-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
  }
  .cost-table tr:hover { background-color: #f5f5f5; }
  
