/* Calculator specific styles */

/* 变异按钮样式 */
.mutation-btn {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.mutation-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mutation-btn.selected {
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* 作物选择下拉菜单样式 */
#crop-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* 输入框样式 */
.calculator-input {
    transition: all 0.2s ease;
}

.calculator-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 计算结果卡片样式 */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.result-multiplier {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* 工具/作物项目样式 */
.tool-item, .crop-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.tool-item:hover, .crop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 加载动画 */
.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-value {
        font-size: 2rem;
    }
    
    .mutation-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .tool-item, .crop-item {
        padding: 0.75rem;
    }
}

/* 自定义滚动条 */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 变异分类颜色编码 */
.growth-mutation.selected {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
}

.temperature-mutation.selected {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

.environmental-mutation.selected {
    border-color: #8b5cf6 !important;
    background-color: #f5f3ff !important;
}

/* 计算器面板动画 */
.calculator-panel {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 结果显示动画 */
.result-display {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 按钮禁用状态 */
.mutation-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 高亮提示 */
.highlight-tip {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* 工具提示样式 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 作物卡片样式 */
.crop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    text-align: center;
}

.crop-card:hover {
    border-color: #22c55e;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.crop-card.selected {
    border-color: #22c55e;
    background: #dcfce7;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.crop-card .crop-icon {
    font-size: 2rem;
    margin-bottom: 4px;
    line-height: 1;
}

.crop-card .crop-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 2px;
    line-height: 1.2;
}

.crop-card .crop-value {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.crop-card.selected .crop-name {
    color: #166534;
}

.crop-card.selected .crop-value {
    color: #059669;
}

/* 搜索框增强样式 */
#crop-search {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z'/%3e%3c/svg%3e");
    background-position: left 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
    padding-left: 2.5rem;
}