.zx-converter {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.zx-converter-container {
  /*max-width: 800px;*/
  margin: 0 auto;
}

/* 输入输出区域样式 */
.zx-io-section {
  margin-bottom: 24px;
}

.zx-textarea-wrapper {
  position: relative;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  transition: border-color 0.3s;
  background: #fff;
}

.zx-textarea-wrapper:focus-within {
  border-color: #409eff;
  box-shadow: 0 0 0 1px rgba(64, 158, 255, 0.1);
}

.zx-textarea {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 6px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
  color: #303133;
  background: transparent;
  box-sizing: border-box;
  font-family: "Consolas", "Monaco", monospace;
}

.zx-textarea:focus {
  outline: none;
}

.zx-text-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 12px;
  color: #909399;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 3px;
}

/* 控制选项区域样式 */
.zx-control-section {
  margin-bottom: 32px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #ebeef5;
}

.zx-option-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.zx-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #303133;
  user-select: none;
}

.zx-checkbox {
  display: none;
}

.zx-checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1px solid #dcdfe6;
  border-radius: 3px;
  display: inline-block;
  position: relative;
  transition: all 0.3s;
  background: #fff;
}

.zx-checkbox:checked + .zx-checkbox-custom {
  background: #409eff;
  border-color: #409eff;
}

.zx-checkbox:checked + .zx-checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
}

.zx-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e4e7ed;
  color: #909399;
  font-size: 12px;
  cursor: help;
}

.zx-tooltip:hover .zx-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.zx-tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  width: 200px;
  padding: 8px 12px;
  background: #303133;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 4px;
  z-index: 1000;
  transition: opacity 0.3s;
  white-space: normal;
  text-align: left;
}

.zx-tooltip-text::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #303133;
}

/* 按钮组样式 */
.zx-button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.zx-btn {
  padding: 10px 20px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.zx-btn-primary {
  background: #409eff;
  border-color: #409eff;
  color: white;
}

.zx-btn-primary:hover {
  background: #337ecc;
  border-color: #337ecc;
}

.zx-btn-secondary {
  background: #67c23a;
  border-color: #67c23a;
  color: white;
}

.zx-btn-secondary:hover {
  background: #529b2e;
  border-color: #529b2e;
}

.zx-btn-ghost {
  background: transparent;
  border-color: #dcdfe6;
  color: #606266;
}

.zx-btn-ghost:hover {
  background: #f5f7fa;
  border-color: #c0c4cc;
}

.zx-btn-success {
  background: #67c23a;
  border-color: #67c23a;
  color: white;
}

.zx-btn-success:hover {
  background: #529b2e;
  border-color: #529b2e;
}

.zx-btn-icon {
  font-size: 12px;
  line-height: 1;
}

/* 相关知识区域样式 */
.zx-knowledge-section {
  border-top: 1px solid #ebeef5;
  padding-top: 24px;
  margin-top: 24px;
}

.zx-knowledge-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e4e7ed;
}

.zx-knowledge-title {
  font-size: 16px;
  color: #303133;
  margin: 0 0 12px 0;
  font-weight: 600;
  line-height: 1.5;
}

.zx-knowledge-content {
  font-size: 14px;
  line-height: 1.7;
  color: #606266;
}

.zx-knowledge-content p {
  margin: 0 0 12px 0;
}

.zx-knowledge-content p:last-child {
  margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .zx-converter-container {
    padding: 0 12px;
  }
  
  .zx-button-group {
    flex-direction: column;
  }
  
  .zx-btn {
    width: 100%;
  }
  
  .zx-knowledge-card {
    padding: 16px;
  }
}