/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f8f2;
    color: #333;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #4a8c4a;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

h1, h2, h3, h4 {
    color: #3a6b3a;
}

h1 {
    margin: 0;
    font-size: 1.8rem;
}

button {
    padding: 8px 12px;
    background-color: #5ea75e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #4a8c4a;
}

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

input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

main {
    display: flex;
    gap: 20px;
}

section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#rice-experiment-area {
    flex: 4;
    min-height: 500px;
}

#operation-area {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 水稻实验区 */
#rice-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    min-height: 300px;
    width: 100%;
    position: relative;
    z-index: 2;
    background-color: #f9faf7;
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #d0e0d0;
    overflow: visible;
}

.rice-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    padding: 15px;
    margin: 5px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 160px;
    cursor: pointer;
    overflow: visible;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.rice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.rice-card.dragging {
    opacity: 0.6;
}

.rice-card.selected {
    border: 2px solid #4a8c4a;
    background-color: #eaffe4;
}

.rice-image {
    width: 100%;
    height: 150px;
    background-color: #f7fbf4;
    margin-bottom: 12px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible !important; /* 修复SVG被隐藏的问题 */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s;
    position: relative; /* 确保定位正确 */
    z-index: 1; /* 提高图像层级 */
}

.rice-image svg {
    max-width: 100%;
    max-height: 100%;
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
    display: block; /* 确保SVG显示为块级元素 */
    visibility: visible !important; /* 强制可见 */
}

.rice-card:hover .rice-image svg {
    transform: scale(1.05);
}

.rice-id {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #4a8c4a;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

/* 水稻名称样式 */
.rice-name {
    text-align: center;
    font-weight: bold;
    color: #2c5e2e;
    margin: 5px 0;
    font-size: 14px;
    padding: 2px 5px;
    background-color: #e8f5e9;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rice-attributes {
    font-size: 13px;
    padding: 5px;
    background-color: #f9fff4;
    border-radius: 5px;
}

.attribute {
    margin-bottom: 4px;
    padding: 3px 0;
    border-bottom: 1px solid #eef8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attribute:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.attribute-name {
    font-weight: 600;
    color: #2c5e2e;
}

.attribute-value {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 30px;
    text-align: center;
    background-color: #e8f5e9;
    color: #2e7d32;
    transition: all 0.2s;
}

/* 根据性能值添加不同颜色来直观展示差异 */
.attribute-value[data-value="产量"] {
    background-color: #fff8e1;
    color: #ff8f00;
}

.attribute-value[data-value="抗病性"] {
    background-color: #e3f2fd;
    color: #1976d2;
}

.attribute-value[data-value="耐旱性"] {
    background-color: #e0f2f1;
    color: #00897b;
}

.attribute-value[data-value="抗倒伏性"] {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.attribute-value[data-value="成熟期"] {
    background-color: #ffebee;
    color: #c62828;
}

.controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 工作台区 */
#workbench {
    background-color: #f8fff8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
}

#selected-rice-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 30px;
}

.rice-slot {
    width: 180px;
    height: 220px;
    border: 2px dashed #aad0aa;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.7);
    overflow: visible;
}

.rice-slot.highlight {
    background-color: rgba(74, 140, 74, 0.1);
    border-color: #4a8c4a;
    box-shadow: 0 0 15px rgba(74, 140, 74, 0.2);
    transform: scale(1.02);
}

.placeholder {
    color: #94b794;
    text-align: center;
    padding: 15px;
    font-style: italic;
}

.operation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 10px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.operation-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
}

.operation-group button {
    flex: 1 1 0;
    min-width: 0;
}

.operation-buttons button {
    padding: 10px 12px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.2s;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.operation-buttons button:hover:not(:disabled) {
    background-color: #3a7c3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#offspring-count {
    width: 60px;
    text-align: center;
    padding: 10px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex: 0 0 60px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.operation-group:nth-child(1) {
    display: grid;
    grid-template-columns: 1fr 1fr 70px;
    align-items: center;
}

.operation-group:nth-child(2) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.operation-group:nth-child(3) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.operation-group:nth-child(4) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.operation-buttons button:disabled {
    background-color: #ccddcc;
    color: #888;
    cursor: not-allowed;
}

/* 快捷指令区 */
#command-area {
    background-color: #f9fff2;
    padding: 15px;
    border-radius: 6px;
}

.command-input {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

#command-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#command-history {
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 8px 5px;
    background-color: #f9f9f9;
}

#history-list {
    list-style-type: none;
    padding-left: 10px;
    margin: 0;
}

#history-list li {
    padding: 5px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 12px;
    color: #555;
    word-break: break-word;
}

#history-list li:last-child {
    border-bottom: none;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* 帮助模态框 */
#help-modal .modal-content {
    max-width: 800px;
}

#help-content h2 {
    margin-bottom: 15px;
    color: #4a8c4a;
}

#help-content h3 {
    margin: 15px 0 10px;
    color: #5ea75e;
}

#help-content h4 {
    margin: 10px 0 5px;
    color: #6eb56e;
}

#help-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

#help-content li {
    margin-bottom: 5px;
}

/* 基因显示相关样式 */
.gene-display {
    margin-top: 15px;
    font-size: 14px;
    max-width: 1000px;
    margin: 0 auto;
}

.gene-display p {
    margin-bottom: 15px;
    color: #666;
}

.genome-overview {
    background-color: #f9fbe7;
    border: 1px solid #cddc39;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.genome-title {
    flex: 2;
}

.genome-title h3 {
    color: #558b2f;
    margin-bottom: 5px;
}

.genome-subtitle {
    color: #689f38;
    font-size: 13px;
}

.genome-stats {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 0 10px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #33691e;
}

.stat-label {
    font-size: 12px;
    color: #689f38;
}

/* 染色体视图 */
.genome-visualization {
    margin: 30px 0;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #2e7d32;
    margin-bottom: 8px;
    font-size: 18px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e8f5e9;
}

.section-desc {
    color: #757575;
    font-size: 13px;
    margin-bottom: 15px;
}

.chromosome-container {
    margin-top: 20px;
}

.chromosome-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.chromosome {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fafafa;
    padding: 10px;
    flex: 1;
    margin: 0 5px;
    min-height: 180px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chr-label {
    text-align: center;
    font-weight: bold;
    color: #33691e;
    margin-bottom: 10px;
    font-size: 13px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #e0e0e0;
}

.chr-body {
    position: relative;
    height: 140px;
}

.chr-line {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.gene-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #757575;
    z-index: 2;
    display: flex;
    align-items: center;
}

.gene-marker-label {
    position: absolute;
    left: 16px;
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.gene-marker:hover .gene-marker-label {
    opacity: 1;
}

.gene-marker.high-expressed {
    background-color: #4caf50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

.gene-marker.medium-expressed {
    background-color: #8bc34a;
}

.gene-marker.low-expressed {
    background-color: #cddc39;
}

.gene-marker.silent {
    background-color: #bdbdbd;
}

.chr-genes {
    position: absolute;
    top: 0;
    right: -180px;
    width: 180px;
    display: none;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.chromosome:hover .chr-genes {
    display: block;
}

.gene-locus {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 5px;
    font-size: 12px;
    margin-bottom: 5px;
    background-color: #fafafa;
}

.gene-locus.high-expressed {
    background-color: #e8f5e9;
    border-color: #4caf50;
    box-shadow: 0 1px 3px rgba(76, 175, 80, 0.2);
}

.gene-locus.medium-expressed {
    background-color: #f1f8e9;
    border-color: #8bc34a;
}

.gene-locus.low-expressed {
    background-color: #f9fbe7;
    border-color: #cddc39;
}

.gene-locus.silent {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #9e9e9e;
}

.gene-name {
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gene-genotype {
    font-size: 10px;
    color: #ff6f00;
    background-color: #fff8e1;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: normal;
}

.gene-description {
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
    font-style: italic;
}

.gene-rating {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
    padding: 2px 4px;
    border-radius: 3px;
    background-color: #f5f5f5;
    display: inline-block;
}

.high-expressed .gene-rating {
    color: #2e7d32;
    background-color: #e8f5e9;
}

.medium-expressed .gene-rating {
    color: #689f38;
    background-color: #f1f8e9;
}

.low-expressed .gene-rating {
    color: #afb42b;
    background-color: #f9fbe7;
}

.gene-trait {
    font-size: 10px;
    color: #757575;
}

.gene-placeholder {
    text-align: center;
    color: #9e9e9e;
    font-size: 12px;
    padding: 10px;
    font-style: italic;
}

/* 基因详细信息表格 */
.gene-details-section {
    margin: 30px 0;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gene-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gene-details-table th, 
.gene-details-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.gene-details-table th {
    background-color: #f5f5f5;
    color: #424242;
    font-weight: bold;
}

.gene-details-table tr:hover {
    background-color: #f9f9f9;
}

.gene-details-table tr.high-expressed {
    background-color: #f1f8e9;
}

.gene-details-table tr.medium-expressed {
    background-color: #f9fbe7;
}

.gene-details-table tr.low-expressed {
    background-color: #fff8e1;
}

.expression-level-bar {
    width: 100%;
    height: 16px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.expression-bar {
    height: 100%;
    background-color: #4caf50;
    border-radius: 8px;
}

.high-expressed .expression-bar {
    background-color: #4caf50;
}

.medium-expressed .expression-bar {
    background-color: #8bc34a;
}

.low-expressed .expression-bar {
    background-color: #cddc39;
}

.expression-level-bar span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 0 2px #fff;
}

/* 基因互作网络 */
.gene-interactions {
    margin: 30px 0;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gene-interactions.empty {
    background-color: #f5f5f5;
    padding: 30px;
    text-align: center;
}

.no-interactions {
    color: #757575;
    font-size: 16px;
    margin: 15px 0;
}

.hint {
    color: #9e9e9e;
    font-size: 13px;
    font-style: italic;
}

.interaction-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.interaction-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.interaction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.interaction-card.high-strength {
    border-color: #4caf50;
}

.interaction-card.medium-strength {
    border-color: #8bc34a;
}

.interaction-card.low-strength {
    border-color: #cddc39;
}

.interaction-header {
    padding: 12px 15px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.interaction-header h4 {
    margin: 0;
    color: #2e7d32;
    font-size: 15px;
}

.interaction-strength {
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.high-strength .interaction-strength {
    background-color: #2e7d32;
    color: white;
}

.medium-strength .interaction-strength {
    background-color: #689f38;
    color: white;
}

.interaction-genes {
    padding: 15px;
}

.interaction-gene {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f5f5f5;
}

.interaction-gene:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.interaction-gene .gene-name {
    color: #33691e;
    margin-bottom: 5px;
}

.gene-value-bar {
    height: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    overflow: hidden;
}

.value-bar {
    height: 100%;
    background-color: #4caf50;
}

.high-expressed .value-bar {
    background-color: #4caf50;
}

.medium-expressed .value-bar {
    background-color: #8bc34a;
}

.low-expressed .value-bar {
    background-color: #cddc39;
}

.interaction-effect {
    padding: 10px 15px;
    background-color: #f9fbe7;
    font-size: 13px;
    border-top: 1px solid #f0f4c3;
}

.effect-label {
    color: #757575;
}

.effect-value {
    font-weight: bold;
    color: #558b2f;
}

/* 表现型雷达图 */
.phenotype-visualization {
    margin: 30px 0;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 评分显示 */
.total-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.score-circle {
    display: none; /* 隐藏圆形评分显示 */
}

.score-details {
    text-align: center;
}

.score-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.score-label {
    font-weight: 500;
    color: #444;
    margin-right: 5px;
}

.score-number {
    font-weight: bold;
    font-size: 20px;
    margin-right: 10px;
}

.score-rating {
    font-weight: 600;
}

.radar-chart-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.phenotype-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    background-color: #4caf50;
}

.high-value .legend-color {
    background-color: #4caf50;
}

.medium-value .legend-color {
    background-color: #8bc34a;
}

.low-value .legend-color {
    background-color: #cddc39;
}

.legend-trait {
    margin-right: 5px;
    color: #424242;
}

.legend-value {
    font-weight: bold;
    color: #2e7d32;
}

/* 育种建议 */
.breeding-tips {
    margin: 30px 0;
    background-color: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: 8px;
    padding: 20px;
}

.breeding-tips h3 {
    color: #ff6f00;
    margin-bottom: 15px;
    font-size: 18px;
}

.breeding-tips ul {
    padding-left: 20px;
    color: #5d4037;
}

.breeding-tips li {
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 900px) {
    main {
        flex-direction: column;
    }
    
    header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .mode-control {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
        text-align: center;
        margin-bottom: 10px;
    }
    
    /* 优化水稻实验区布局 */
    #rice-experiment-area {
        padding: 15px;
    }
    
    .rice-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
        margin: 10px 0;
        justify-content: center;
    }
    
    .rice-card {
        padding: 10px;
        margin: 5px;
        width: auto;
        justify-self: center;
        align-self: start;
    }
    
    /* 让工作台中的水稻槽在移动端并排显示 */
    #selected-rice-container {
        display: flex !important;
        justify-content: space-between !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
        margin-top: 20px !important;
        margin-bottom: 25px !important;
    }

    .rice-slot {
        width: 48% !important;
        height: 200px !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    
    .operation-buttons {
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 20px;
        margin-bottom: 5px;
    }
    
    .operation-group {
        gap: 8px;
        margin-bottom: 4px;
    }
    
    /* 在移动设备上简化为流式布局 */
    .operation-group:nth-child(1),
    .operation-group:nth-child(2),
    .operation-group:nth-child(3),
    .operation-group:nth-child(4) {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .operation-group:nth-child(1) button,
    .operation-group:nth-child(4) button {
        flex: 1 1 calc(50% - 5px);
    }
    
    #offspring-count {
        flex: 0 0 40px;
        width: 40px;
        margin-left: 5px;
        margin-right: 0;
        padding: 8px 5px;
        display: inline-block;
    }
    
    .operation-group:nth-child(1) {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    .operation-group:nth-child(2) button,
    .operation-group:nth-child(3) button {
        flex: 1 1 calc(33.33% - 6px);
    }
    
    .operation-buttons button {
        font-size: 12px;
        padding: 8px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 36px;
        max-width: 100%;
    }
    
    /* 缩短捕获按钮文本 */
    #capture-btn {
        padding: 8px 10px;
    }
    
    /* 适配命令区域 */
    .command-input {
        flex-wrap: wrap;
    }
    
    #command-input {
        flex: 1 1 100%;
        margin-bottom: 8px;
    }
}

/* 添加小屏幕手机的额外适配 */
@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }
    
    section {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    .rice-card {
        padding: 8px;
        margin: 3px;
        width: 100%;
        max-width: 140px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    }
    
    .rice-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
        justify-items: center;
    }
    
    .rice-image {
        height: 110px;
        margin-bottom: 8px;
    }
    
    .rice-attributes {
        font-size: 12px;
        padding: 3px;
    }
    
    .attribute {
        margin-bottom: 2px;
        padding: 2px 0;
    }
    
    .attribute-value {
        padding: 1px 4px;
        min-width: 25px;
        font-size: 11px;
    }
    
    .rice-id {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    /* 进一步调整小屏幕手机上的植株框 */
    #selected-rice-container {
        gap: 5px !important;
    }
    
    .rice-slot {
        width: 140px !important;
        height: 190px !important;
    }
    
    .rice-slot .rice-image {
        height: 100px;
    }
    
    .placeholder {
        font-size: 12px;
        padding: 10px;
    }
    
    /* 调整控制区域 */
    .controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .controls button {
        flex-grow: 1;
        min-width: 80px;
        padding: 8px 5px;
        font-size: 13px;
    }
    
    .controls input[type="number"] {
        width: 50px;
        padding: 6px;
    }
    
    /* 调整section间距 */
    section {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    /* 调整操作区域间距 */
    #operation-area {
        gap: 15px;
    }
    
    /* 调整工作台区域 */
    #workbench {
        padding: 15px 10px;
    }
    
    .operation-buttons button {
        flex-basis: calc(50% - 10px);
        font-size: 12px;
        padding: 7px 5px;
    }
    
    #offspring-count {
        width: 40px;
        padding: 5px;
        font-size: 12px;
    }
    
    /* 调整标题大小 */
    h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
}

/* 小屏幕手机进一步优化 */
@media (max-width: 480px) {
    .operation-buttons button {
        font-size: 11px; /* 进一步减小字体 */
        padding: 7px 3px;
        min-height: 36px;
    }
    
    #offspring-count {
        flex: 0 0 40px;
        width: 40px;
        font-size: 12px;
        padding: 7px 2px;
    }
    
    .operation-group {
        gap: 6px;
    }
}

/* 电脑版优化 - 更紧凑的按钮布局 */
@media (min-width: 901px) {
    .operation-buttons button {
        font-size: 14px;
        padding: 10px 8px;
    }
}

/* 成就系统样式 */
.achievement-notification {
    position: fixed;
    top: 30px;
    right: -400px;
    width: 350px;
    background-color: #ffffff;
    border-left: 5px solid #4caf50;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: flex;
    align-items: flex-start;
    z-index: 1000;
    transition: right 0.5s ease;
    overflow: hidden;
}

.achievement-notification.achievement-show {
    right: 30px;
}

.achievement-notification.achievement-hide {
    right: -400px;
}

.achievement-icon {
    font-size: 32px;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.achievement-content {
    flex: 1;
}

.achievement-title {
    color: #4caf50;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-rice {
    background-color: #f1f8e9;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #33691e;
    margin-bottom: 5px;
}

.achievement-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.achievement-reward {
    font-size: 14px;
    color: #ff9800;
    font-weight: bold;
}

.achievement-close {
    cursor: pointer;
    font-size: 20px;
    color: #bdbdbd;
    margin-left: 10px;
}

.achievement-close:hover {
    color: #757575;
}

/* 成就列表页面样式 */
.achievements-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.achievements-container h2 {
    text-align: center;
    color: #4a8c4a;
    margin-bottom: 10px;
}

.achievements-container > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.achievements-section {
    margin-bottom: 30px;
}

.achievements-section h3 {
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: #388e3c;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.achievement-card {
    display: flex;
    border-radius: 8px;
    padding: 15px;
    background-color: #f5f5f5;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.achievement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.achievement-card-icon {
    font-size: 28px;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.achievement-card-content {
    flex: 1;
}

.achievement-card-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-card-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.achievement-card-conditions {
    font-size: 12px;
    color: #757575;
    margin-bottom: 5px;
}

.achievement-card-reward {
    font-size: 12px;
    color: #ff9800;
    font-weight: bold;
}

.achievement-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    background-color: #f1f1f1;
    color: #9e9e9e;
}

.achievement-card-status.status-unlocked {
    background-color: #2e7d32;
    color: white;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.achievement-card-status.status-locked {
    background-color: #e0e0e0;
    color: #757575;
    border: 1px solid #bdbdbd;
}

.achievement-unlocked {
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.achievement-locked {
    background-color: #f5f5f5;
    border-left: 3px solid #bdbdbd;
    opacity: 0.9;
}

.achievement-locked {
    background-color: #f5f5f5;
    border-left: 3px solid #bdbdbd;
    opacity: 0.8;
}

/* 响应式设计调整 */
@media (max-width: 600px) {
    .achievement-notification {
        width: calc(100% - 60px);
        max-width: none;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
} 

/* 分享功能样式 */
.share-container {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.share-container h2 {
    text-align: center;
    color: #4a8c4a;
    margin-bottom: 20px;
    font-weight: 500;
}

.share-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.share-preview {
    width: 100%;
    max-width: 400px;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

/* 新的头部样式 */
.share-header {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    justify-content: center;
}

/* 游戏标题样式 */
.share-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px 10px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #f8fbf4;
}

.share-title h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #4a8c4a;
    text-align: center;
}

.share-rice-code {
    font-family: monospace;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background-color: #f3f3f3;
    border-radius: 6px;
    text-align: center;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    width: fit-content;
}

/* 水稻名称容器 */
.share-rice-name-container {
    display: flex;
    justify-content: center;
    padding: 20px 20px 15px;
    background-color: #f9fcf9;
    border-bottom: 1px solid #f0f0f0;
}

#share-rice-name {
    width: 90%;
    padding: 10px 15px;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    background-color: #fafafa;
    transition: all 0.2s;
    text-align: center;
}

#share-rice-name:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 水稻图像部分 */
.share-rice-image {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #f8fbf4, #ffffff);
}

.share-rice-image svg {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.share-rice-image:hover svg {
    transform: scale(1.05);
}

/* 页脚部分 */
.share-footer {
    background-color: #f7f9f7;
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.share-rice-watermark {
    text-align: center;
    color: #999;
    font-size: 12px;
    font-style: italic;
    padding: 4px 0;
}

/* 按钮部分 */
.share-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.share-btn {
    padding: 12px 30px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: 200px;
    text-align: center;
}

.share-btn:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-btn {
    background-color: #2196f3;
}

.copy-btn:hover {
    background-color: #1976d2;
}

.copy-btn.copied {
    background-color: #4caf50;
}

.share-tip {
    font-size: 14px;
    color: #666;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .share-preview {
        max-width: 100%;
    }
    
    .share-header {
        padding: 8px;
    }
    
    .share-title {
        padding: 12px 10px 8px;
    }
    
    .share-title h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .share-rice-name-container {
        padding: 12px 15px 5px;
    }
    
    #share-rice-name {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .share-rice-image svg {
        width: 180px;
        height: 180px;
    }
    
    .share-rice-image {
        padding: 20px 0;
    }
    
    .share-rice-code {
        font-size: 11px;
        padding: 3px 6px;
        max-width: 95%;
        word-break: break-all;
        overflow-wrap: break-word;
    }
} 

/* 导入功能样式 */
.import-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.import-container h2 {
    text-align: center;
    color: #4a8c4a;
    margin-bottom: 10px;
}

.import-container p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.import-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#import-rice-code {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: monospace;
}

#import-rice-btn {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#import-rice-btn:hover {
    background-color: #388e3c;
}

.import-tip {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

#upload-rice-image-btn {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#upload-rice-image-btn:hover {
    background-color: #1976d2;
}

.import-result {
    margin-top: 20px;
    min-height: 40px;
}

.import-message {
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.import-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.import-message.error {
    background-color: #ffebee;
    color: #c62828;
}

.import-manual {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#manual-rice-code {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    font-family: monospace;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

#manual-import-btn {
    padding: 8px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.import-preview {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

@media (max-width: 600px) {
    .import-form {
        flex-direction: column;
    }
}

/* 复制按钮样式 */
.import-code-input {
    display: flex;
    gap: 5px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
}

#copy-id-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

#copy-id-btn:not(:disabled):hover {
    background-color: #e0e0e0;
}

#copy-id-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-icon {
    font-style: normal;
    font-size: 18px;
}

/* 最佳水稻高亮样式 */
.rice-card.best-rice {
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    border: 2px solid #4caf50;
    transform: translateY(-5px);
    z-index: 5;
}

.rice-card.best-trait {
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
    border: 2px solid #2196f3;
}

.attribute-value.best-value {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
    box-shadow: 0 0 4px rgba(33, 150, 243, 0.4);
    animation: pulse 2s infinite;
}

.best-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #4caf50;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 最佳水稻模态框样式 */
.best-rice-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.best-rice-container h2 {
    color: #4a8c4a;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.best-rice-container h3 {
    color: #2c5e2e;
    margin: 15px 0;
    font-size: 18px;
    border-bottom: 1px solid #e0f2e0;
    padding-bottom: 5px;
}

.best-overall {
    background-color: #f7fbf4;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.best-rice-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.best-rice-id {
    font-size: 20px;
    font-weight: bold;
    color: #4a8c4a;
    margin: 10px 0;
}

.best-rice-score {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.best-rice-preview {
    padding: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.best-rice-preview svg {
    width: 120px;
    height: 120px;
}

.best-traits {
    background-color: #f7fbf4;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.trait-item {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

.trait-item:hover {
    transform: translateY(-3px);
}

.trait-name {
    font-weight: bold;
    color: #4a8c4a;
    margin-bottom: 5px;
    text-align: center;
}

.trait-rice-id {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.trait-value {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 10px;
}

.trait-preview {
    width: 80px;
    height: 80px;
}

.trait-preview svg {
    width: 80px;
    height: 80px;
}

.best-rice-actions {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 15px;
}

.best-rice-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#highlight-best-btn {
    background-color: #4a8c4a;
    color: white;
}

#highlight-best-btn:hover {
    background-color: #3a7a3a;
}

#best-rice-cancel {
    background-color: #f0f0f0;
    color: #333;
}

#best-rice-cancel:hover {
    background-color: #e0e0e0;
}

/* 关闭按钮样式 */
#best-rice-close {
    background-color: #4a8c4a;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 15px;
}

#best-rice-close:hover {
    background-color: #3a7a3a;
}

@media (max-width: 600px) {
    .trait-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .best-rice-preview svg,
    .trait-preview svg {
        width: 100%;
        height: auto;
    }
} 

.rice-slot .rice-card {
    transform: scale(0.9);
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    position: relative;
    z-index: 1;
}

.rice-slot .rice-image {
    overflow: visible;
}

.rice-slot .rice-attributes {
    overflow: visible;
}

.quick-import-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-top: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}

.quick-import-btn:hover {
    background-color: #3e8e41;
}

/* 任务模式样式 */
.tasks-container {
    height: auto;
    padding: 15px;
    overflow: visible;
}

.task-level {
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

.task-level h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.level-description {
    margin-bottom: 15px;
    color: #666;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    display: flex;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #ccc;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #f0f0f0;
}

.task-item.task-completed {
    background-color: #f0f8f0;
    border-left-color: #4CAF50;
}

.task-status {
    font-size: 20px;
    color: #999;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.task-completed .task-status {
    color: #4CAF50;
}

.task-details {
    flex: 1;
}

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

.task-item-description {
    color: #666;
    margin-bottom: 8px;
}

.task-conditions {
    background-color: #f0f0f0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 8px;
}

.task-completed-text {
    color: #4CAF50;
    font-size: 14px;
    font-weight: bold;
}

.task-progress-text {
    color: #f57c00;
    font-size: 14px;
}

.task-item-reward {
    background-color: #fff8e1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    border-left: 3px solid #ffc107;
}

.unlocked-rice-section {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.unlocked-rice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.unlocked-rice-item {
    background-color: #e8f5e9;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #4CAF50;
}

.unlocked-rice-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unlocked-rice-score {
    font-size: 14px;
    background-color: #4a8c4a;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.unlocked-rice-description {
    color: #666;
    margin-bottom: 12px;
}

.get-rice-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.get-rice-btn:hover {
    background-color: #388e3c;
}

/* 任务完成通知 */
.task-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 300px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.task-notification.task-show {
    opacity: 1;
    transform: translateY(0);
}

.task-notification.task-hide {
    opacity: 0;
    transform: translateY(20px);
}

.task-icon {
    background-color: #4CAF50;
    color: white;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
}

.task-content {
    flex: 1;
    padding: 15px;
}

.task-title {
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

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

.task-rice {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.task-description {
    font-size: 14px;
    margin-bottom: 8px;
}

.task-reward {
    font-size: 14px;
    background-color: #fff8e1;
    padding: 5px 8px;
    border-radius: 4px;
}

.task-close {
    position: absolute;
    top: 5px;
    right: 10px;
    color: #999;
    cursor: pointer;
    font-size: 18px;
}

.task-close:hover {
    color: #555;
}

/* 新增植株浮动提示 */
.rice-feedback {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(74, 140, 74, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s, transform 0.8s;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 透明背景类 */
.transparent-bg {
    background-color: rgba(74, 140, 74, 0.85) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.rice-feedback.show {
    opacity: 1;
    animation: float-up 2.5s forwards;
}

@keyframes float-up {
    0% {
        opacity: 0;
        bottom: 20%;
        transform: translateX(-50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0;
        bottom: 70%;
        transform: translateX(-50%) scale(0.8);
    }
}

/* 连续反馈样式 */
.rice-feedback-container {
    position: fixed;
    bottom: 20%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
    height: 50%;
}

.multi-feedback {
    background-color: rgba(74, 140, 74, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 13px;
    margin: 5px 0;
    text-align: center;
    opacity: 0;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    animation: multi-feedback-float 2.5s forwards;
}

@keyframes multi-feedback-float {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-50px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.8);
    }
}

/* 水稻评分样式 */
.rice-score {
    margin-top: 8px;
    padding: 4px 0;
    border-top: 1px solid #eef8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-label {
    font-weight: 600;
    color: #2c5e2e;
}

.score-value {
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 36px;
    text-align: center;
    background-color: #4a8c4a;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    #command-area {
        padding: 12px 10px;
    }
    
    .command-input {
        flex-direction: column;
        gap: 8px;
    }
    
    #command-input {
        width: 100%;
        padding: 10px;
        border-radius: 5px;
    }
    
    #execute-btn {
        width: 100%;
        padding: 10px;
    }
    
    #command-history {
        max-height: 120px;
        margin-top: 12px;
    }
    
    #history-list li {
        font-size: 11px;
        padding: 4px 0;
    }
} 